
(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 17 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 (* z (pow (- b y) 2.0))))
(if (or (<= z -3.6e+34) (not (<= z 0.00132)))
(-
(fma t (- (/ 1.0 (- b y)) (/ y t_1)) (* (/ x z) (/ y (- b y))))
(fma -1.0 (/ a (/ t_1 y)) (/ 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 t_1 = z * pow((b - y), 2.0);
double tmp;
if ((z <= -3.6e+34) || !(z <= 0.00132)) {
tmp = fma(t, ((1.0 / (b - y)) - (y / t_1)), ((x / z) * (y / (b - y)))) - fma(-1.0, (a / (t_1 / y)), (a / (b - y)));
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(z * (Float64(b - y) ^ 2.0)) tmp = 0.0 if ((z <= -3.6e+34) || !(z <= 0.00132)) tmp = Float64(fma(t, Float64(Float64(1.0 / Float64(b - y)) - Float64(y / t_1)), Float64(Float64(x / z) * Float64(y / Float64(b - y)))) - fma(-1.0, Float64(a / Float64(t_1 / y)), Float64(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
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -3.6e+34], N[Not[LessEqual[z, 0.00132]], $MachinePrecision]], N[(N[(t * N[(N[(1.0 / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(a / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $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}
t_1 := z \cdot {\left(b - y\right)}^{2}\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{+34} \lor \neg \left(z \leq 0.00132\right):\\
\;\;\;\;\mathsf{fma}\left(t, \frac{1}{b - y} - \frac{y}{t_1}, \frac{x}{z} \cdot \frac{y}{b - y}\right) - \mathsf{fma}\left(-1, \frac{a}{\frac{t_1}{y}}, \frac{a}{b - y}\right)\\
\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 < -3.6e34 or 0.00132 < z Initial program 37.2%
Taylor expanded in z around inf 66.9%
associate--r+66.9%
+-commutative66.9%
associate--l+66.9%
*-commutative66.9%
times-frac71.1%
div-sub71.1%
*-commutative71.1%
times-frac92.7%
Simplified92.7%
Taylor expanded in t around 0 72.1%
fma-def72.1%
times-frac84.6%
fma-def84.6%
associate-/l*96.3%
Simplified96.3%
if -3.6e34 < z < 0.00132Initial program 88.0%
Final simplification91.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -800000.0) (not (<= z 0.00132)))
(+
(+ (* (/ y z) (/ x (- b y))) (/ (- t a) (- b y)))
(* (/ y (pow (- b y) 2.0)) (/ (- a t) z)))
(/ (+ (* 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 <= -800000.0) || !(z <= 0.00132)) {
tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / pow((b - y), 2.0)) * ((a - t) / z));
} 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 <= (-800000.0d0)) .or. (.not. (z <= 0.00132d0))) then
tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / ((b - y) ** 2.0d0)) * ((a - t) / z))
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 <= -800000.0) || !(z <= 0.00132)) {
tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / Math.pow((b - y), 2.0)) * ((a - t) / z));
} 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 <= -800000.0) or not (z <= 0.00132): tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / math.pow((b - y), 2.0)) * ((a - t) / z)) 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 <= -800000.0) || !(z <= 0.00132)) tmp = Float64(Float64(Float64(Float64(y / z) * Float64(x / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(Float64(y / (Float64(b - y) ^ 2.0)) * Float64(Float64(a - t) / z))); 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 <= -800000.0) || ~((z <= 0.00132))) tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / ((b - y) ^ 2.0)) * ((a - t) / z)); 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, -800000.0], N[Not[LessEqual[z, 0.00132]], $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 / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $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 -800000 \lor \neg \left(z \leq 0.00132\right):\\
\;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) + \frac{y}{{\left(b - y\right)}^{2}} \cdot \frac{a - t}{z}\\
\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 < -8e5 or 0.00132 < z Initial program 40.9%
Taylor expanded in z around inf 68.0%
associate--r+68.0%
+-commutative68.0%
associate--l+68.0%
*-commutative68.0%
times-frac72.0%
div-sub72.0%
*-commutative72.0%
times-frac93.1%
Simplified93.1%
if -8e5 < z < 0.00132Initial program 87.4%
Final simplification90.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ z (/ y (- (- t a) (* b x)))))) (t_2 (/ (- t a) (- b y))))
(if (<= z -1.02e-7)
t_2
(if (<= z -5e-60)
(- x (* a (/ z y)))
(if (<= z -4.1e-81)
(/ (- (+ t (/ (* y x) z)) a) b)
(if (<= z 3.6e-262)
t_1
(if (<= z 7.8e-185)
(/ (* y x) (+ y (* z (- b y))))
(if (<= z 5.6e-8) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z / (y / ((t - a) - (b * x))));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.02e-7) {
tmp = t_2;
} else if (z <= -5e-60) {
tmp = x - (a * (z / y));
} else if (z <= -4.1e-81) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if (z <= 3.6e-262) {
tmp = t_1;
} else if (z <= 7.8e-185) {
tmp = (y * x) / (y + (z * (b - y)));
} else if (z <= 5.6e-8) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (z / (y / ((t - a) - (b * x))))
t_2 = (t - a) / (b - y)
if (z <= (-1.02d-7)) then
tmp = t_2
else if (z <= (-5d-60)) then
tmp = x - (a * (z / y))
else if (z <= (-4.1d-81)) then
tmp = ((t + ((y * x) / z)) - a) / b
else if (z <= 3.6d-262) then
tmp = t_1
else if (z <= 7.8d-185) then
tmp = (y * x) / (y + (z * (b - y)))
else if (z <= 5.6d-8) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z / (y / ((t - a) - (b * x))));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.02e-7) {
tmp = t_2;
} else if (z <= -5e-60) {
tmp = x - (a * (z / y));
} else if (z <= -4.1e-81) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if (z <= 3.6e-262) {
tmp = t_1;
} else if (z <= 7.8e-185) {
tmp = (y * x) / (y + (z * (b - y)));
} else if (z <= 5.6e-8) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z / (y / ((t - a) - (b * x)))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.02e-7: tmp = t_2 elif z <= -5e-60: tmp = x - (a * (z / y)) elif z <= -4.1e-81: tmp = ((t + ((y * x) / z)) - a) / b elif z <= 3.6e-262: tmp = t_1 elif z <= 7.8e-185: tmp = (y * x) / (y + (z * (b - y))) elif z <= 5.6e-8: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z / Float64(y / Float64(Float64(t - a) - Float64(b * x))))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.02e-7) tmp = t_2; elseif (z <= -5e-60) tmp = Float64(x - Float64(a * Float64(z / y))); elseif (z <= -4.1e-81) tmp = Float64(Float64(Float64(t + Float64(Float64(y * x) / z)) - a) / b); elseif (z <= 3.6e-262) tmp = t_1; elseif (z <= 7.8e-185) tmp = Float64(Float64(y * x) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 5.6e-8) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z / (y / ((t - a) - (b * x)))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.02e-7) tmp = t_2; elseif (z <= -5e-60) tmp = x - (a * (z / y)); elseif (z <= -4.1e-81) tmp = ((t + ((y * x) / z)) - a) / b; elseif (z <= 3.6e-262) tmp = t_1; elseif (z <= 7.8e-185) tmp = (y * x) / (y + (z * (b - y))); elseif (z <= 5.6e-8) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z / N[(y / N[(N[(t - a), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e-7], t$95$2, If[LessEqual[z, -5e-60], N[(x - N[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.1e-81], N[(N[(N[(t + N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 3.6e-262], t$95$1, If[LessEqual[z, 7.8e-185], N[(N[(y * x), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e-8], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z}{\frac{y}{\left(t - a\right) - b \cdot x}}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{-7}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-60}:\\
\;\;\;\;x - a \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-81}:\\
\;\;\;\;\frac{\left(t + \frac{y \cdot x}{z}\right) - a}{b}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-262}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-185}:\\
\;\;\;\;\frac{y \cdot x}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.02e-7 or 5.5999999999999999e-8 < z Initial program 42.9%
Taylor expanded in z around inf 77.5%
if -1.02e-7 < z < -5.0000000000000001e-60Initial program 99.8%
Taylor expanded in z around 0 78.2%
Taylor expanded in a around inf 74.0%
associate-*r/74.0%
mul-1-neg74.0%
Simplified74.0%
Taylor expanded in x around 0 76.8%
mul-1-neg76.8%
*-commutative76.8%
sub-neg76.8%
associate-/l*76.7%
associate-/r/76.8%
Simplified76.8%
if -5.0000000000000001e-60 < z < -4.09999999999999984e-81Initial program 99.3%
Taylor expanded in z around inf 85.5%
associate--r+85.5%
+-commutative85.5%
associate--l+85.5%
*-commutative85.5%
times-frac59.9%
div-sub59.9%
*-commutative59.9%
times-frac45.6%
Simplified45.6%
Taylor expanded in b around inf 86.0%
if -4.09999999999999984e-81 < z < 3.5999999999999998e-262 or 7.7999999999999999e-185 < z < 5.5999999999999999e-8Initial program 84.9%
Taylor expanded in z around 0 57.9%
Taylor expanded in y around 0 69.0%
associate-/l*66.7%
associate--r+66.7%
*-commutative66.7%
Simplified66.7%
if 3.5999999999999998e-262 < z < 7.7999999999999999e-185Initial program 88.2%
Taylor expanded in x around inf 65.8%
*-commutative65.8%
Simplified65.8%
Final simplification72.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (* y x) (* z a)) (+ y (* z (- b y)))))
(t_2 (/ (- t a) (- b y))))
(if (<= z -1.35e-5)
t_2
(if (<= z -1.55e-87)
t_1
(if (<= z -2.9e-211) (+ x (* z (/ t y))) (if (<= z 0.0012) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * x) - (z * a)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.35e-5) {
tmp = t_2;
} else if (z <= -1.55e-87) {
tmp = t_1;
} else if (z <= -2.9e-211) {
tmp = x + (z * (t / y));
} else if (z <= 0.0012) {
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 = ((y * x) - (z * a)) / (y + (z * (b - y)))
t_2 = (t - a) / (b - y)
if (z <= (-1.35d-5)) then
tmp = t_2
else if (z <= (-1.55d-87)) then
tmp = t_1
else if (z <= (-2.9d-211)) then
tmp = x + (z * (t / y))
else if (z <= 0.0012d0) 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 = ((y * x) - (z * a)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.35e-5) {
tmp = t_2;
} else if (z <= -1.55e-87) {
tmp = t_1;
} else if (z <= -2.9e-211) {
tmp = x + (z * (t / y));
} else if (z <= 0.0012) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * x) - (z * a)) / (y + (z * (b - y))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.35e-5: tmp = t_2 elif z <= -1.55e-87: tmp = t_1 elif z <= -2.9e-211: tmp = x + (z * (t / y)) elif z <= 0.0012: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * x) - Float64(z * a)) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.35e-5) tmp = t_2; elseif (z <= -1.55e-87) tmp = t_1; elseif (z <= -2.9e-211) tmp = Float64(x + Float64(z * Float64(t / y))); elseif (z <= 0.0012) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * x) - (z * a)) / (y + (z * (b - y))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.35e-5) tmp = t_2; elseif (z <= -1.55e-87) tmp = t_1; elseif (z <= -2.9e-211) tmp = x + (z * (t / y)); elseif (z <= 0.0012) 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[(y * x), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e-5], t$95$2, If[LessEqual[z, -1.55e-87], t$95$1, If[LessEqual[z, -2.9e-211], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0012], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot x - z \cdot a}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{-5}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-211}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{elif}\;z \leq 0.0012:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.3499999999999999e-5 or 0.00119999999999999989 < z Initial program 42.9%
Taylor expanded in z around inf 77.5%
if -1.3499999999999999e-5 < z < -1.54999999999999999e-87 or -2.90000000000000014e-211 < z < 0.00119999999999999989Initial program 89.0%
Taylor expanded in t around 0 72.9%
+-commutative72.9%
mul-1-neg72.9%
unsub-neg72.9%
*-commutative72.9%
*-commutative72.9%
Simplified72.9%
if -1.54999999999999999e-87 < z < -2.90000000000000014e-211Initial program 79.4%
Taylor expanded in z around 0 57.8%
Taylor expanded in t around inf 75.6%
Final simplification75.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (+ x (* z (/ t y)))))
(if (<= z -3.2e-8)
t_1
(if (<= z -1.45e-101)
(- x (* a (/ z y)))
(if (<= z 1.3e-271)
t_2
(if (<= z 1.3e-87)
(- x (/ a (/ y z)))
(if (<= z 5.4e-55)
t_2
(if (or (<= z 7e+18) (not (<= z 2.45e+27)))
t_1
(/ (- x) z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = x + (z * (t / y));
double tmp;
if (z <= -3.2e-8) {
tmp = t_1;
} else if (z <= -1.45e-101) {
tmp = x - (a * (z / y));
} else if (z <= 1.3e-271) {
tmp = t_2;
} else if (z <= 1.3e-87) {
tmp = x - (a / (y / z));
} else if (z <= 5.4e-55) {
tmp = t_2;
} else if ((z <= 7e+18) || !(z <= 2.45e+27)) {
tmp = t_1;
} else {
tmp = -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) :: t_2
real(8) :: tmp
t_1 = (t - a) / (b - y)
t_2 = x + (z * (t / y))
if (z <= (-3.2d-8)) then
tmp = t_1
else if (z <= (-1.45d-101)) then
tmp = x - (a * (z / y))
else if (z <= 1.3d-271) then
tmp = t_2
else if (z <= 1.3d-87) then
tmp = x - (a / (y / z))
else if (z <= 5.4d-55) then
tmp = t_2
else if ((z <= 7d+18) .or. (.not. (z <= 2.45d+27))) then
tmp = t_1
else
tmp = -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 t_2 = x + (z * (t / y));
double tmp;
if (z <= -3.2e-8) {
tmp = t_1;
} else if (z <= -1.45e-101) {
tmp = x - (a * (z / y));
} else if (z <= 1.3e-271) {
tmp = t_2;
} else if (z <= 1.3e-87) {
tmp = x - (a / (y / z));
} else if (z <= 5.4e-55) {
tmp = t_2;
} else if ((z <= 7e+18) || !(z <= 2.45e+27)) {
tmp = t_1;
} else {
tmp = -x / z;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = x + (z * (t / y)) tmp = 0 if z <= -3.2e-8: tmp = t_1 elif z <= -1.45e-101: tmp = x - (a * (z / y)) elif z <= 1.3e-271: tmp = t_2 elif z <= 1.3e-87: tmp = x - (a / (y / z)) elif z <= 5.4e-55: tmp = t_2 elif (z <= 7e+18) or not (z <= 2.45e+27): tmp = t_1 else: tmp = -x / z return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(x + Float64(z * Float64(t / y))) tmp = 0.0 if (z <= -3.2e-8) tmp = t_1; elseif (z <= -1.45e-101) tmp = Float64(x - Float64(a * Float64(z / y))); elseif (z <= 1.3e-271) tmp = t_2; elseif (z <= 1.3e-87) tmp = Float64(x - Float64(a / Float64(y / z))); elseif (z <= 5.4e-55) tmp = t_2; elseif ((z <= 7e+18) || !(z <= 2.45e+27)) tmp = t_1; else tmp = Float64(Float64(-x) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = x + (z * (t / y)); tmp = 0.0; if (z <= -3.2e-8) tmp = t_1; elseif (z <= -1.45e-101) tmp = x - (a * (z / y)); elseif (z <= 1.3e-271) tmp = t_2; elseif (z <= 1.3e-87) tmp = x - (a / (y / z)); elseif (z <= 5.4e-55) tmp = t_2; elseif ((z <= 7e+18) || ~((z <= 2.45e+27))) tmp = t_1; else tmp = -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]}, Block[{t$95$2 = N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e-8], t$95$1, If[LessEqual[z, -1.45e-101], N[(x - N[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-271], t$95$2, If[LessEqual[z, 1.3e-87], N[(x - N[(a / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e-55], t$95$2, If[Or[LessEqual[z, 7e+18], N[Not[LessEqual[z, 2.45e+27]], $MachinePrecision]], t$95$1, N[((-x) / z), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := x + z \cdot \frac{t}{y}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-101}:\\
\;\;\;\;x - a \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-271}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-87}:\\
\;\;\;\;x - \frac{a}{\frac{y}{z}}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-55}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+18} \lor \neg \left(z \leq 2.45 \cdot 10^{+27}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{z}\\
\end{array}
\end{array}
if z < -3.2000000000000002e-8 or 5.40000000000000008e-55 < z < 7e18 or 2.45000000000000007e27 < z Initial program 46.2%
Taylor expanded in z around inf 76.7%
if -3.2000000000000002e-8 < z < -1.45e-101Initial program 95.1%
Taylor expanded in z around 0 52.9%
Taylor expanded in a around inf 56.8%
associate-*r/56.8%
mul-1-neg56.8%
Simplified56.8%
Taylor expanded in x around 0 58.1%
mul-1-neg58.1%
*-commutative58.1%
sub-neg58.1%
associate-/l*58.0%
associate-/r/58.1%
Simplified58.1%
if -1.45e-101 < z < 1.3e-271 or 1.30000000000000001e-87 < z < 5.40000000000000008e-55Initial program 83.8%
Taylor expanded in z around 0 59.4%
Taylor expanded in t around inf 69.2%
if 1.3e-271 < z < 1.30000000000000001e-87Initial program 88.1%
Taylor expanded in z around 0 47.7%
Taylor expanded in a around inf 59.8%
mul-1-neg59.8%
associate-/l*59.9%
distribute-neg-frac59.9%
Simplified59.9%
if 7e18 < z < 2.45000000000000007e27Initial program 27.0%
Taylor expanded in y around inf 100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
associate-*r/100.0%
mul-1-neg100.0%
Simplified100.0%
Final simplification71.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5e+63) (not (<= z 2.9e+30))) (/ (- 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 <= -5e+63) || !(z <= 2.9e+30)) {
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 <= (-5d+63)) .or. (.not. (z <= 2.9d+30))) 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 <= -5e+63) || !(z <= 2.9e+30)) {
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 <= -5e+63) or not (z <= 2.9e+30): 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 <= -5e+63) || !(z <= 2.9e+30)) 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 <= -5e+63) || ~((z <= 2.9e+30))) 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, -5e+63], N[Not[LessEqual[z, 2.9e+30]], $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 -5 \cdot 10^{+63} \lor \neg \left(z \leq 2.9 \cdot 10^{+30}\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 < -5.00000000000000011e63 or 2.8999999999999998e30 < z Initial program 32.8%
Taylor expanded in z around inf 81.7%
if -5.00000000000000011e63 < z < 2.8999999999999998e30Initial program 86.5%
Final simplification84.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (/ (* z a) y))) (t_2 (/ (- t a) (- b y))))
(if (<= z -3.2e-8)
t_2
(if (<= z -8.6e-61)
(- x (* a (/ z y)))
(if (<= z -8.2e-82)
(/ (- (+ t (/ (* y x) z)) a) b)
(if (<= z -1.85e-104)
t_1
(if (<= z -9e-264)
(+ x (* z (/ t y)))
(if (<= z 3.5e-11) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - ((z * a) / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.2e-8) {
tmp = t_2;
} else if (z <= -8.6e-61) {
tmp = x - (a * (z / y));
} else if (z <= -8.2e-82) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if (z <= -1.85e-104) {
tmp = t_1;
} else if (z <= -9e-264) {
tmp = x + (z * (t / y));
} else if (z <= 3.5e-11) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - ((z * a) / y)
t_2 = (t - a) / (b - y)
if (z <= (-3.2d-8)) then
tmp = t_2
else if (z <= (-8.6d-61)) then
tmp = x - (a * (z / y))
else if (z <= (-8.2d-82)) then
tmp = ((t + ((y * x) / z)) - a) / b
else if (z <= (-1.85d-104)) then
tmp = t_1
else if (z <= (-9d-264)) then
tmp = x + (z * (t / y))
else if (z <= 3.5d-11) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - ((z * a) / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.2e-8) {
tmp = t_2;
} else if (z <= -8.6e-61) {
tmp = x - (a * (z / y));
} else if (z <= -8.2e-82) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if (z <= -1.85e-104) {
tmp = t_1;
} else if (z <= -9e-264) {
tmp = x + (z * (t / y));
} else if (z <= 3.5e-11) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - ((z * a) / y) t_2 = (t - a) / (b - y) tmp = 0 if z <= -3.2e-8: tmp = t_2 elif z <= -8.6e-61: tmp = x - (a * (z / y)) elif z <= -8.2e-82: tmp = ((t + ((y * x) / z)) - a) / b elif z <= -1.85e-104: tmp = t_1 elif z <= -9e-264: tmp = x + (z * (t / y)) elif z <= 3.5e-11: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(Float64(z * a) / y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.2e-8) tmp = t_2; elseif (z <= -8.6e-61) tmp = Float64(x - Float64(a * Float64(z / y))); elseif (z <= -8.2e-82) tmp = Float64(Float64(Float64(t + Float64(Float64(y * x) / z)) - a) / b); elseif (z <= -1.85e-104) tmp = t_1; elseif (z <= -9e-264) tmp = Float64(x + Float64(z * Float64(t / y))); elseif (z <= 3.5e-11) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - ((z * a) / y); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.2e-8) tmp = t_2; elseif (z <= -8.6e-61) tmp = x - (a * (z / y)); elseif (z <= -8.2e-82) tmp = ((t + ((y * x) / z)) - a) / b; elseif (z <= -1.85e-104) tmp = t_1; elseif (z <= -9e-264) tmp = x + (z * (t / y)); elseif (z <= 3.5e-11) 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[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e-8], t$95$2, If[LessEqual[z, -8.6e-61], N[(x - N[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.2e-82], N[(N[(N[(t + N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, -1.85e-104], t$95$1, If[LessEqual[z, -9e-264], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e-11], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{z \cdot a}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-8}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-61}:\\
\;\;\;\;x - a \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-82}:\\
\;\;\;\;\frac{\left(t + \frac{y \cdot x}{z}\right) - a}{b}\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-264}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-11}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -3.2000000000000002e-8 or 3.50000000000000019e-11 < z Initial program 42.9%
Taylor expanded in z around inf 77.5%
if -3.2000000000000002e-8 < z < -8.6000000000000007e-61Initial program 99.8%
Taylor expanded in z around 0 78.2%
Taylor expanded in a around inf 74.0%
associate-*r/74.0%
mul-1-neg74.0%
Simplified74.0%
Taylor expanded in x around 0 76.8%
mul-1-neg76.8%
*-commutative76.8%
sub-neg76.8%
associate-/l*76.7%
associate-/r/76.8%
Simplified76.8%
if -8.6000000000000007e-61 < z < -8.19999999999999992e-82Initial program 99.3%
Taylor expanded in z around inf 85.5%
associate--r+85.5%
+-commutative85.5%
associate--l+85.5%
*-commutative85.5%
times-frac59.9%
div-sub59.9%
*-commutative59.9%
times-frac45.6%
Simplified45.6%
Taylor expanded in b around inf 86.0%
if -8.19999999999999992e-82 < z < -1.85e-104 or -9.0000000000000001e-264 < z < 3.50000000000000019e-11Initial program 88.0%
Taylor expanded in z around 0 54.1%
Taylor expanded in a around inf 57.0%
associate-*r/57.0%
mul-1-neg57.0%
Simplified57.0%
Taylor expanded in z around 0 60.1%
associate-*r/60.1%
associate-*r*60.1%
neg-mul-160.1%
Simplified60.1%
if -1.85e-104 < z < -9.0000000000000001e-264Initial program 79.7%
Taylor expanded in z around 0 54.0%
Taylor expanded in t around inf 70.2%
Final simplification71.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))) (t_2 (/ x (- 1.0 z))))
(if (<= y -6.5e-88)
t_2
(if (<= y -3e-193)
(/ (- a) b)
(if (<= y 6.5e+28)
t_1
(if (<= y 2.2e+56) x (if (<= y 7.2e+124) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -6.5e-88) {
tmp = t_2;
} else if (y <= -3e-193) {
tmp = -a / b;
} else if (y <= 6.5e+28) {
tmp = t_1;
} else if (y <= 2.2e+56) {
tmp = x;
} else if (y <= 7.2e+124) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t / (b - y)
t_2 = x / (1.0d0 - z)
if (y <= (-6.5d-88)) then
tmp = t_2
else if (y <= (-3d-193)) then
tmp = -a / b
else if (y <= 6.5d+28) then
tmp = t_1
else if (y <= 2.2d+56) then
tmp = x
else if (y <= 7.2d+124) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -6.5e-88) {
tmp = t_2;
} else if (y <= -3e-193) {
tmp = -a / b;
} else if (y <= 6.5e+28) {
tmp = t_1;
} else if (y <= 2.2e+56) {
tmp = x;
} else if (y <= 7.2e+124) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) t_2 = x / (1.0 - z) tmp = 0 if y <= -6.5e-88: tmp = t_2 elif y <= -3e-193: tmp = -a / b elif y <= 6.5e+28: tmp = t_1 elif y <= 2.2e+56: tmp = x elif y <= 7.2e+124: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -6.5e-88) tmp = t_2; elseif (y <= -3e-193) tmp = Float64(Float64(-a) / b); elseif (y <= 6.5e+28) tmp = t_1; elseif (y <= 2.2e+56) tmp = x; elseif (y <= 7.2e+124) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -6.5e-88) tmp = t_2; elseif (y <= -3e-193) tmp = -a / b; elseif (y <= 6.5e+28) tmp = t_1; elseif (y <= 2.2e+56) tmp = x; elseif (y <= 7.2e+124) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e-88], t$95$2, If[LessEqual[y, -3e-193], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 6.5e+28], t$95$1, If[LessEqual[y, 2.2e+56], x, If[LessEqual[y, 7.2e+124], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{-88}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-193}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+56}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+124}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -6.50000000000000006e-88 or 7.19999999999999972e124 < y Initial program 59.7%
Taylor expanded in y around inf 60.2%
mul-1-neg60.2%
unsub-neg60.2%
Simplified60.2%
if -6.50000000000000006e-88 < y < -2.9999999999999999e-193Initial program 78.5%
Taylor expanded in y around 0 75.1%
Taylor expanded in t around 0 53.5%
associate-*r/53.5%
neg-mul-153.5%
Simplified53.5%
if -2.9999999999999999e-193 < y < 6.5000000000000001e28 or 2.20000000000000016e56 < y < 7.19999999999999972e124Initial program 68.9%
Taylor expanded in t around inf 31.9%
*-commutative31.9%
Simplified31.9%
Taylor expanded in z around inf 43.4%
if 6.5000000000000001e28 < y < 2.20000000000000016e56Initial program 78.9%
Taylor expanded in z around 0 47.6%
Final simplification51.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (* a (/ z y)))) (t_2 (/ (- t a) (- b y))))
(if (<= z -3.4e-8)
t_2
(if (<= z -2.5e-100)
t_1
(if (<= z 1.1e-269) (+ x (* z (/ t y))) (if (<= z 5.2e-12) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (a * (z / y));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.4e-8) {
tmp = t_2;
} else if (z <= -2.5e-100) {
tmp = t_1;
} else if (z <= 1.1e-269) {
tmp = x + (z * (t / y));
} else if (z <= 5.2e-12) {
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 - (a * (z / y))
t_2 = (t - a) / (b - y)
if (z <= (-3.4d-8)) then
tmp = t_2
else if (z <= (-2.5d-100)) then
tmp = t_1
else if (z <= 1.1d-269) then
tmp = x + (z * (t / y))
else if (z <= 5.2d-12) 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 - (a * (z / y));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.4e-8) {
tmp = t_2;
} else if (z <= -2.5e-100) {
tmp = t_1;
} else if (z <= 1.1e-269) {
tmp = x + (z * (t / y));
} else if (z <= 5.2e-12) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - (a * (z / y)) t_2 = (t - a) / (b - y) tmp = 0 if z <= -3.4e-8: tmp = t_2 elif z <= -2.5e-100: tmp = t_1 elif z <= 1.1e-269: tmp = x + (z * (t / y)) elif z <= 5.2e-12: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(a * Float64(z / y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.4e-8) tmp = t_2; elseif (z <= -2.5e-100) tmp = t_1; elseif (z <= 1.1e-269) tmp = Float64(x + Float64(z * Float64(t / y))); elseif (z <= 5.2e-12) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - (a * (z / y)); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.4e-8) tmp = t_2; elseif (z <= -2.5e-100) tmp = t_1; elseif (z <= 1.1e-269) tmp = x + (z * (t / y)); elseif (z <= 5.2e-12) 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[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e-8], t$95$2, If[LessEqual[z, -2.5e-100], t$95$1, If[LessEqual[z, 1.1e-269], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-12], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot \frac{z}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{-8}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-269}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-12}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -3.4e-8 or 5.19999999999999965e-12 < z Initial program 42.9%
Taylor expanded in z around inf 77.5%
if -3.4e-8 < z < -2.5e-100 or 1.09999999999999992e-269 < z < 5.19999999999999965e-12Initial program 90.6%
Taylor expanded in z around 0 51.1%
Taylor expanded in a around inf 54.9%
associate-*r/54.9%
mul-1-neg54.9%
Simplified54.9%
Taylor expanded in x around 0 56.4%
mul-1-neg56.4%
*-commutative56.4%
sub-neg56.4%
associate-/l*55.2%
associate-/r/56.4%
Simplified56.4%
if -2.5e-100 < z < 1.09999999999999992e-269Initial program 82.8%
Taylor expanded in z around 0 56.8%
Taylor expanded in t around inf 67.2%
Final simplification68.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -3.2e-8)
t_1
(if (<= z -1.45e-101)
(- x (* a (/ z y)))
(if (<= z -7.2e-264)
(+ x (* z (/ t y)))
(if (<= z 1.9e-12) (- x (/ (* z a) y)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.2e-8) {
tmp = t_1;
} else if (z <= -1.45e-101) {
tmp = x - (a * (z / y));
} else if (z <= -7.2e-264) {
tmp = x + (z * (t / y));
} else if (z <= 1.9e-12) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-3.2d-8)) then
tmp = t_1
else if (z <= (-1.45d-101)) then
tmp = x - (a * (z / y))
else if (z <= (-7.2d-264)) then
tmp = x + (z * (t / y))
else if (z <= 1.9d-12) then
tmp = x - ((z * a) / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.2e-8) {
tmp = t_1;
} else if (z <= -1.45e-101) {
tmp = x - (a * (z / y));
} else if (z <= -7.2e-264) {
tmp = x + (z * (t / y));
} else if (z <= 1.9e-12) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -3.2e-8: tmp = t_1 elif z <= -1.45e-101: tmp = x - (a * (z / y)) elif z <= -7.2e-264: tmp = x + (z * (t / y)) elif z <= 1.9e-12: tmp = x - ((z * a) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.2e-8) tmp = t_1; elseif (z <= -1.45e-101) tmp = Float64(x - Float64(a * Float64(z / y))); elseif (z <= -7.2e-264) tmp = Float64(x + Float64(z * Float64(t / y))); elseif (z <= 1.9e-12) tmp = Float64(x - Float64(Float64(z * a) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.2e-8) tmp = t_1; elseif (z <= -1.45e-101) tmp = x - (a * (z / y)); elseif (z <= -7.2e-264) tmp = x + (z * (t / y)); elseif (z <= 1.9e-12) tmp = x - ((z * a) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e-8], t$95$1, If[LessEqual[z, -1.45e-101], N[(x - N[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.2e-264], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e-12], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-101}:\\
\;\;\;\;x - a \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-264}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-12}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.2000000000000002e-8 or 1.89999999999999998e-12 < z Initial program 42.9%
Taylor expanded in z around inf 77.5%
if -3.2000000000000002e-8 < z < -1.45e-101Initial program 95.1%
Taylor expanded in z around 0 52.9%
Taylor expanded in a around inf 56.8%
associate-*r/56.8%
mul-1-neg56.8%
Simplified56.8%
Taylor expanded in x around 0 58.1%
mul-1-neg58.1%
*-commutative58.1%
sub-neg58.1%
associate-/l*58.0%
associate-/r/58.1%
Simplified58.1%
if -1.45e-101 < z < -7.2000000000000004e-264Initial program 79.7%
Taylor expanded in z around 0 54.0%
Taylor expanded in t around inf 70.2%
if -7.2000000000000004e-264 < z < 1.89999999999999998e-12Initial program 88.5%
Taylor expanded in z around 0 53.7%
Taylor expanded in a around inf 55.4%
associate-*r/55.4%
mul-1-neg55.4%
Simplified55.4%
Taylor expanded in z around 0 58.6%
associate-*r/58.6%
associate-*r*58.6%
neg-mul-158.6%
Simplified58.6%
Final simplification69.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -6.6e+135)
t_1
(if (<= z -3.6e+28)
(/ (- a) b)
(if (or (<= z -1e-7) (not (<= z 1.9e-54))) t_1 (+ x (* z x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -6.6e+135) {
tmp = t_1;
} else if (z <= -3.6e+28) {
tmp = -a / b;
} else if ((z <= -1e-7) || !(z <= 1.9e-54)) {
tmp = t_1;
} else {
tmp = x + (z * x);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-6.6d+135)) then
tmp = t_1
else if (z <= (-3.6d+28)) then
tmp = -a / b
else if ((z <= (-1d-7)) .or. (.not. (z <= 1.9d-54))) then
tmp = t_1
else
tmp = x + (z * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -6.6e+135) {
tmp = t_1;
} else if (z <= -3.6e+28) {
tmp = -a / b;
} else if ((z <= -1e-7) || !(z <= 1.9e-54)) {
tmp = t_1;
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -6.6e+135: tmp = t_1 elif z <= -3.6e+28: tmp = -a / b elif (z <= -1e-7) or not (z <= 1.9e-54): tmp = t_1 else: tmp = x + (z * x) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -6.6e+135) tmp = t_1; elseif (z <= -3.6e+28) tmp = Float64(Float64(-a) / b); elseif ((z <= -1e-7) || !(z <= 1.9e-54)) tmp = t_1; else tmp = Float64(x + Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -6.6e+135) tmp = t_1; elseif (z <= -3.6e+28) tmp = -a / b; elseif ((z <= -1e-7) || ~((z <= 1.9e-54))) tmp = t_1; else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e+135], t$95$1, If[LessEqual[z, -3.6e+28], N[((-a) / b), $MachinePrecision], If[Or[LessEqual[z, -1e-7], N[Not[LessEqual[z, 1.9e-54]], $MachinePrecision]], t$95$1, N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{+28}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-7} \lor \neg \left(z \leq 1.9 \cdot 10^{-54}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if z < -6.5999999999999998e135 or -3.5999999999999999e28 < z < -9.9999999999999995e-8 or 1.9000000000000001e-54 < z Initial program 43.1%
Taylor expanded in t around inf 22.1%
*-commutative22.1%
Simplified22.1%
Taylor expanded in z around inf 48.9%
if -6.5999999999999998e135 < z < -3.5999999999999999e28Initial program 63.7%
Taylor expanded in y around 0 44.0%
Taylor expanded in t around 0 43.8%
associate-*r/43.8%
neg-mul-143.8%
Simplified43.8%
if -9.9999999999999995e-8 < z < 1.9000000000000001e-54Initial program 87.0%
Taylor expanded in y around inf 45.5%
mul-1-neg45.5%
unsub-neg45.5%
Simplified45.5%
Taylor expanded in z around 0 45.4%
Final simplification46.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -2.5e-86)
t_1
(if (<= y 1.55e+29)
(/ (- t a) b)
(if (<= y 1.02e+65)
(+ x (* z x))
(if (<= y 6.2e+96) (/ t (- b y)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.5e-86) {
tmp = t_1;
} else if (y <= 1.55e+29) {
tmp = (t - a) / b;
} else if (y <= 1.02e+65) {
tmp = x + (z * x);
} else if (y <= 6.2e+96) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-2.5d-86)) then
tmp = t_1
else if (y <= 1.55d+29) then
tmp = (t - a) / b
else if (y <= 1.02d+65) then
tmp = x + (z * x)
else if (y <= 6.2d+96) then
tmp = t / (b - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.5e-86) {
tmp = t_1;
} else if (y <= 1.55e+29) {
tmp = (t - a) / b;
} else if (y <= 1.02e+65) {
tmp = x + (z * x);
} else if (y <= 6.2e+96) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -2.5e-86: tmp = t_1 elif y <= 1.55e+29: tmp = (t - a) / b elif y <= 1.02e+65: tmp = x + (z * x) elif y <= 6.2e+96: tmp = t / (b - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.5e-86) tmp = t_1; elseif (y <= 1.55e+29) tmp = Float64(Float64(t - a) / b); elseif (y <= 1.02e+65) tmp = Float64(x + Float64(z * x)); elseif (y <= 6.2e+96) tmp = Float64(t / Float64(b - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -2.5e-86) tmp = t_1; elseif (y <= 1.55e+29) tmp = (t - a) / b; elseif (y <= 1.02e+65) tmp = x + (z * x); elseif (y <= 6.2e+96) tmp = t / (b - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e-86], t$95$1, If[LessEqual[y, 1.55e+29], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 1.02e+65], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e+96], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{-86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+29}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+65}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+96}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.4999999999999999e-86 or 6.1999999999999996e96 < y Initial program 59.4%
Taylor expanded in y around inf 59.0%
mul-1-neg59.0%
unsub-neg59.0%
Simplified59.0%
if -2.4999999999999999e-86 < y < 1.5499999999999999e29Initial program 72.2%
Taylor expanded in y around 0 60.7%
if 1.5499999999999999e29 < y < 1.02000000000000005e65Initial program 76.0%
Taylor expanded in y around inf 43.9%
mul-1-neg43.9%
unsub-neg43.9%
Simplified43.9%
Taylor expanded in z around 0 44.5%
if 1.02000000000000005e65 < y < 6.1999999999999996e96Initial program 56.5%
Taylor expanded in t around inf 35.0%
*-commutative35.0%
Simplified35.0%
Taylor expanded in z around inf 56.5%
Final simplification59.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -2.5e-86)
t_1
(if (<= y 1.6e+27)
(/ (- t a) b)
(if (<= y 2.1e+56)
(+ x (* z (/ t y)))
(if (<= y 7.2e+124) (/ t (- b y)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.5e-86) {
tmp = t_1;
} else if (y <= 1.6e+27) {
tmp = (t - a) / b;
} else if (y <= 2.1e+56) {
tmp = x + (z * (t / y));
} else if (y <= 7.2e+124) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-2.5d-86)) then
tmp = t_1
else if (y <= 1.6d+27) then
tmp = (t - a) / b
else if (y <= 2.1d+56) then
tmp = x + (z * (t / y))
else if (y <= 7.2d+124) then
tmp = t / (b - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.5e-86) {
tmp = t_1;
} else if (y <= 1.6e+27) {
tmp = (t - a) / b;
} else if (y <= 2.1e+56) {
tmp = x + (z * (t / y));
} else if (y <= 7.2e+124) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -2.5e-86: tmp = t_1 elif y <= 1.6e+27: tmp = (t - a) / b elif y <= 2.1e+56: tmp = x + (z * (t / y)) elif y <= 7.2e+124: tmp = t / (b - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.5e-86) tmp = t_1; elseif (y <= 1.6e+27) tmp = Float64(Float64(t - a) / b); elseif (y <= 2.1e+56) tmp = Float64(x + Float64(z * Float64(t / y))); elseif (y <= 7.2e+124) tmp = Float64(t / Float64(b - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -2.5e-86) tmp = t_1; elseif (y <= 1.6e+27) tmp = (t - a) / b; elseif (y <= 2.1e+56) tmp = x + (z * (t / y)); elseif (y <= 7.2e+124) tmp = t / (b - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e-86], t$95$1, If[LessEqual[y, 1.6e+27], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 2.1e+56], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e+124], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{-86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+27}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+56}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+124}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.4999999999999999e-86 or 7.19999999999999972e124 < y Initial program 59.7%
Taylor expanded in y around inf 60.2%
mul-1-neg60.2%
unsub-neg60.2%
Simplified60.2%
if -2.4999999999999999e-86 < y < 1.60000000000000008e27Initial program 72.2%
Taylor expanded in y around 0 60.7%
if 1.60000000000000008e27 < y < 2.10000000000000017e56Initial program 78.9%
Taylor expanded in z around 0 66.8%
Taylor expanded in t around inf 68.8%
if 2.10000000000000017e56 < y < 7.19999999999999972e124Initial program 57.2%
Taylor expanded in t around inf 27.2%
*-commutative27.2%
Simplified27.2%
Taylor expanded in z around inf 52.7%
Final simplification60.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.85e-89)
x
(if (<= y -2.7e-192)
(/ (- a) b)
(if (<= y 5.8e+27) (/ t b) (+ x (* z x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.85e-89) {
tmp = x;
} else if (y <= -2.7e-192) {
tmp = -a / b;
} else if (y <= 5.8e+27) {
tmp = t / b;
} else {
tmp = x + (z * x);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.85d-89)) then
tmp = x
else if (y <= (-2.7d-192)) then
tmp = -a / b
else if (y <= 5.8d+27) then
tmp = t / b
else
tmp = x + (z * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.85e-89) {
tmp = x;
} else if (y <= -2.7e-192) {
tmp = -a / b;
} else if (y <= 5.8e+27) {
tmp = t / b;
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.85e-89: tmp = x elif y <= -2.7e-192: tmp = -a / b elif y <= 5.8e+27: tmp = t / b else: tmp = x + (z * x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.85e-89) tmp = x; elseif (y <= -2.7e-192) tmp = Float64(Float64(-a) / b); elseif (y <= 5.8e+27) tmp = Float64(t / b); else tmp = Float64(x + Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.85e-89) tmp = x; elseif (y <= -2.7e-192) tmp = -a / b; elseif (y <= 5.8e+27) tmp = t / b; else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.85e-89], x, If[LessEqual[y, -2.7e-192], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 5.8e+27], N[(t / b), $MachinePrecision], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.85 \cdot 10^{-89}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-192}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+27}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if y < -2.8500000000000001e-89Initial program 66.3%
Taylor expanded in z around 0 34.1%
if -2.8500000000000001e-89 < y < -2.69999999999999991e-192Initial program 78.5%
Taylor expanded in y around 0 75.1%
Taylor expanded in t around 0 53.5%
associate-*r/53.5%
neg-mul-153.5%
Simplified53.5%
if -2.69999999999999991e-192 < y < 5.8000000000000002e27Initial program 70.8%
Taylor expanded in t around inf 32.7%
*-commutative32.7%
Simplified32.7%
Taylor expanded in y around 0 38.9%
if 5.8000000000000002e27 < y Initial program 54.5%
Taylor expanded in y around inf 58.1%
mul-1-neg58.1%
unsub-neg58.1%
Simplified58.1%
Taylor expanded in z around 0 43.8%
Final simplification40.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.8e-88) x (if (<= y -1.2e-192) (/ (- a) b) (if (<= y 1.6e+27) (/ t b) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.8e-88) {
tmp = x;
} else if (y <= -1.2e-192) {
tmp = -a / b;
} else if (y <= 1.6e+27) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.8d-88)) then
tmp = x
else if (y <= (-1.2d-192)) then
tmp = -a / b
else if (y <= 1.6d+27) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.8e-88) {
tmp = x;
} else if (y <= -1.2e-192) {
tmp = -a / b;
} else if (y <= 1.6e+27) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.8e-88: tmp = x elif y <= -1.2e-192: tmp = -a / b elif y <= 1.6e+27: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.8e-88) tmp = x; elseif (y <= -1.2e-192) tmp = Float64(Float64(-a) / b); elseif (y <= 1.6e+27) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.8e-88) tmp = x; elseif (y <= -1.2e-192) tmp = -a / b; elseif (y <= 1.6e+27) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.8e-88], x, If[LessEqual[y, -1.2e-192], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 1.6e+27], N[(t / b), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-88}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-192}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+27}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.8e-88 or 1.60000000000000008e27 < y Initial program 60.7%
Taylor expanded in z around 0 38.5%
if -1.8e-88 < y < -1.2e-192Initial program 78.5%
Taylor expanded in y around 0 75.1%
Taylor expanded in t around 0 53.5%
associate-*r/53.5%
neg-mul-153.5%
Simplified53.5%
if -1.2e-192 < y < 1.60000000000000008e27Initial program 70.8%
Taylor expanded in t around inf 32.7%
*-commutative32.7%
Simplified32.7%
Taylor expanded in y around 0 38.9%
Final simplification40.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6e-87) x (if (<= y 8e+28) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6e-87) {
tmp = x;
} else if (y <= 8e+28) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-6d-87)) then
tmp = x
else if (y <= 8d+28) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6e-87) {
tmp = x;
} else if (y <= 8e+28) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6e-87: tmp = x elif y <= 8e+28: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6e-87) tmp = x; elseif (y <= 8e+28) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6e-87) tmp = x; elseif (y <= 8e+28) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6e-87], x, If[LessEqual[y, 8e+28], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-87}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+28}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.00000000000000033e-87 or 7.99999999999999967e28 < y Initial program 60.7%
Taylor expanded in z around 0 38.5%
if -6.00000000000000033e-87 < y < 7.99999999999999967e28Initial program 72.2%
Taylor expanded in t around inf 29.5%
*-commutative29.5%
Simplified29.5%
Taylor expanded in y around 0 36.3%
Final simplification37.5%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 66.2%
Taylor expanded in z around 0 24.9%
Final simplification24.9%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2023275
(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)))))