
(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 (+ y (* z (- b y)))))
(if (or (<= z -4e+18) (not (<= z 5.2e+17)))
(fma
-1.0
(/ (fma -1.0 (/ y (/ (- b y) x)) (* (/ y (pow (- b y) 2.0)) (- t a))) z)
(/ (- t a) (- b y)))
(+ (/ (* y x) t_1) (/ (* z (- t a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -4e+18) || !(z <= 5.2e+17)) {
tmp = fma(-1.0, (fma(-1.0, (y / ((b - y) / x)), ((y / pow((b - y), 2.0)) * (t - a))) / z), ((t - a) / (b - y)));
} else {
tmp = ((y * x) / t_1) + ((z * (t - a)) / t_1);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if ((z <= -4e+18) || !(z <= 5.2e+17)) tmp = fma(-1.0, Float64(fma(-1.0, Float64(y / Float64(Float64(b - y) / x)), Float64(Float64(y / (Float64(b - y) ^ 2.0)) * Float64(t - a))) / z), Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(Float64(Float64(y * x) / t_1) + Float64(Float64(z * Float64(t - a)) / t_1)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -4e+18], N[Not[LessEqual[z, 5.2e+17]], $MachinePrecision]], N[(-1.0 * N[(N[(-1.0 * N[(y / N[(N[(b - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -4 \cdot 10^{+18} \lor \neg \left(z \leq 5.2 \cdot 10^{+17}\right):\\
\;\;\;\;\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{y}{\frac{b - y}{x}}, \frac{y}{{\left(b - y\right)}^{2}} \cdot \left(t - a\right)\right)}{z}, \frac{t - a}{b - y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{t_1} + \frac{z \cdot \left(t - a\right)}{t_1}\\
\end{array}
\end{array}
if z < -4e18 or 5.2e17 < z Initial program 40.7%
Taylor expanded in z around -inf 72.0%
associate--l+72.0%
div-sub72.0%
fma-def72.0%
Simplified96.9%
if -4e18 < z < 5.2e17Initial program 93.7%
Taylor expanded in x around 0 93.8%
Final simplification95.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -7.2e+56) (not (<= z 1.14e+55)))
(+
(+ (/ (- t a) (- b y)) (* (/ y z) (/ x (- b y))))
(/ (/ (- a t) (/ z y)) (pow (- b y) 2.0)))
(+ (/ (* y x) t_1) (/ (* z (- t a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -7.2e+56) || !(z <= 1.14e+55)) {
tmp = (((t - a) / (b - y)) + ((y / z) * (x / (b - y)))) + (((a - t) / (z / y)) / pow((b - y), 2.0));
} else {
tmp = ((y * x) / t_1) + ((z * (t - a)) / 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 = y + (z * (b - y))
if ((z <= (-7.2d+56)) .or. (.not. (z <= 1.14d+55))) then
tmp = (((t - a) / (b - y)) + ((y / z) * (x / (b - y)))) + (((a - t) / (z / y)) / ((b - y) ** 2.0d0))
else
tmp = ((y * x) / t_1) + ((z * (t - a)) / 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 = y + (z * (b - y));
double tmp;
if ((z <= -7.2e+56) || !(z <= 1.14e+55)) {
tmp = (((t - a) / (b - y)) + ((y / z) * (x / (b - y)))) + (((a - t) / (z / y)) / Math.pow((b - y), 2.0));
} else {
tmp = ((y * x) / t_1) + ((z * (t - a)) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if (z <= -7.2e+56) or not (z <= 1.14e+55): tmp = (((t - a) / (b - y)) + ((y / z) * (x / (b - y)))) + (((a - t) / (z / y)) / math.pow((b - y), 2.0)) else: tmp = ((y * x) / t_1) + ((z * (t - a)) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if ((z <= -7.2e+56) || !(z <= 1.14e+55)) tmp = Float64(Float64(Float64(Float64(t - a) / Float64(b - y)) + Float64(Float64(y / z) * Float64(x / Float64(b - y)))) + Float64(Float64(Float64(a - t) / Float64(z / y)) / (Float64(b - y) ^ 2.0))); else tmp = Float64(Float64(Float64(y * x) / t_1) + Float64(Float64(z * Float64(t - a)) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); tmp = 0.0; if ((z <= -7.2e+56) || ~((z <= 1.14e+55))) tmp = (((t - a) / (b - y)) + ((y / z) * (x / (b - y)))) + (((a - t) / (z / y)) / ((b - y) ^ 2.0)); else tmp = ((y * x) / t_1) + ((z * (t - a)) / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -7.2e+56], N[Not[LessEqual[z, 1.14e+55]], $MachinePrecision]], N[(N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(a - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+56} \lor \neg \left(z \leq 1.14 \cdot 10^{+55}\right):\\
\;\;\;\;\left(\frac{t - a}{b - y} + \frac{y}{z} \cdot \frac{x}{b - y}\right) + \frac{\frac{a - t}{\frac{z}{y}}}{{\left(b - y\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{t_1} + \frac{z \cdot \left(t - a\right)}{t_1}\\
\end{array}
\end{array}
if z < -7.19999999999999996e56 or 1.1399999999999999e55 < z Initial program 36.7%
Taylor expanded in z around inf 70.6%
associate--r+70.6%
+-commutative70.6%
associate--l+70.6%
*-commutative70.6%
times-frac78.1%
div-sub78.1%
associate-/r*78.3%
*-commutative78.3%
associate-/l*94.2%
Simplified94.2%
if -7.19999999999999996e56 < z < 1.1399999999999999e55Initial program 89.9%
Taylor expanded in x around 0 90.0%
Final simplification91.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -6.8e+54) (not (<= z 6.5e+18)))
(/ (- t a) (- b y))
(+ (/ (* y x) t_1) (/ (* z (- t a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -6.8e+54) || !(z <= 6.5e+18)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) / t_1) + ((z * (t - a)) / 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 = y + (z * (b - y))
if ((z <= (-6.8d+54)) .or. (.not. (z <= 6.5d+18))) then
tmp = (t - a) / (b - y)
else
tmp = ((y * x) / t_1) + ((z * (t - a)) / 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 = y + (z * (b - y));
double tmp;
if ((z <= -6.8e+54) || !(z <= 6.5e+18)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) / t_1) + ((z * (t - a)) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if (z <= -6.8e+54) or not (z <= 6.5e+18): tmp = (t - a) / (b - y) else: tmp = ((y * x) / t_1) + ((z * (t - a)) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if ((z <= -6.8e+54) || !(z <= 6.5e+18)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(y * x) / t_1) + Float64(Float64(z * Float64(t - a)) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); tmp = 0.0; if ((z <= -6.8e+54) || ~((z <= 6.5e+18))) tmp = (t - a) / (b - y); else tmp = ((y * x) / t_1) + ((z * (t - a)) / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -6.8e+54], N[Not[LessEqual[z, 6.5e+18]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+54} \lor \neg \left(z \leq 6.5 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{t_1} + \frac{z \cdot \left(t - a\right)}{t_1}\\
\end{array}
\end{array}
if z < -6.8000000000000001e54 or 6.5e18 < z Initial program 39.0%
Taylor expanded in z around inf 87.1%
if -6.8000000000000001e54 < z < 6.5e18Initial program 91.4%
Taylor expanded in x around 0 91.4%
Final simplification89.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.2e+54) (not (<= z 4.4e+18))) (/ (- t a) (- b y)) (/ (+ (* y x) (* 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 <= -6.2e+54) || !(z <= 4.4e+18)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.2d+54)) .or. (.not. (z <= 4.4d+18))) then
tmp = (t - a) / (b - y)
else
tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e+54) || !(z <= 4.4e+18)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.2e+54) or not (z <= 4.4e+18): tmp = (t - a) / (b - y) else: tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.2e+54) || !(z <= 4.4e+18)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.2e+54) || ~((z <= 4.4e+18))) tmp = (t - a) / (b - y); else tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.2e+54], N[Not[LessEqual[z, 4.4e+18]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+54} \lor \neg \left(z \leq 4.4 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -6.1999999999999999e54 or 4.4e18 < z Initial program 39.0%
Taylor expanded in z around inf 87.1%
if -6.1999999999999999e54 < z < 4.4e18Initial program 91.4%
Final simplification89.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.4e+26) (not (<= z 4.2e+16))) (/ (- t a) (- b y)) (+ x (/ (* 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.4e+26) || !(z <= 4.2e+16)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.4d+26)) .or. (.not. (z <= 4.2d+16))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * (t - a)) / (y + (z * (b - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.4e+26) || !(z <= 4.2e+16)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.4e+26) or not (z <= 4.2e+16): tmp = (t - a) / (b - y) else: tmp = x + ((z * (t - a)) / (y + (z * (b - y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.4e+26) || !(z <= 4.2e+16)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.4e+26) || ~((z <= 4.2e+16))) tmp = (t - a) / (b - y); else tmp = x + ((z * (t - a)) / (y + (z * (b - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.4e+26], N[Not[LessEqual[z, 4.2e+16]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+26} \lor \neg \left(z \leq 4.2 \cdot 10^{+16}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.4e26 or 4.2e16 < z Initial program 40.6%
Taylor expanded in z around inf 84.9%
if -1.4e26 < z < 4.2e16Initial program 93.1%
Taylor expanded in x around 0 93.1%
Taylor expanded in z around 0 87.8%
Final simplification86.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.48e+23) (not (<= z 7.6e+16))) (/ (- t a) (- b y)) (/ (+ (* y x) (* z (- t a))) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.48e+23) || !(z <= 7.6e+16)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * (t - a))) / (y + (z * 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 ((z <= (-1.48d+23)) .or. (.not. (z <= 7.6d+16))) then
tmp = (t - a) / (b - y)
else
tmp = ((y * x) + (z * (t - a))) / (y + (z * 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 ((z <= -1.48e+23) || !(z <= 7.6e+16)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * (t - a))) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.48e+23) or not (z <= 7.6e+16): tmp = (t - a) / (b - y) else: tmp = ((y * x) + (z * (t - a))) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.48e+23) || !(z <= 7.6e+16)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.48e+23) || ~((z <= 7.6e+16))) tmp = (t - a) / (b - y); else tmp = ((y * x) + (z * (t - a))) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.48e+23], N[Not[LessEqual[z, 7.6e+16]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.48 \cdot 10^{+23} \lor \neg \left(z \leq 7.6 \cdot 10^{+16}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -1.4799999999999999e23 or 7.6e16 < z Initial program 41.0%
Taylor expanded in z around inf 85.0%
if -1.4799999999999999e23 < z < 7.6e16Initial program 93.0%
Taylor expanded in b around inf 92.4%
*-commutative92.4%
Simplified92.4%
Final simplification88.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -3.35e-34)
t_1
(if (<= z 3.2e-166)
(+ x (* t (/ z y)))
(if (<= z 1.05e-13) (+ x (/ z (/ (- y) a))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.35e-34) {
tmp = t_1;
} else if (z <= 3.2e-166) {
tmp = x + (t * (z / y));
} else if (z <= 1.05e-13) {
tmp = x + (z / (-y / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-3.35d-34)) then
tmp = t_1
else if (z <= 3.2d-166) then
tmp = x + (t * (z / y))
else if (z <= 1.05d-13) then
tmp = x + (z / (-y / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.35e-34) {
tmp = t_1;
} else if (z <= 3.2e-166) {
tmp = x + (t * (z / y));
} else if (z <= 1.05e-13) {
tmp = x + (z / (-y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -3.35e-34: tmp = t_1 elif z <= 3.2e-166: tmp = x + (t * (z / y)) elif z <= 1.05e-13: tmp = x + (z / (-y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.35e-34) tmp = t_1; elseif (z <= 3.2e-166) tmp = Float64(x + Float64(t * Float64(z / y))); elseif (z <= 1.05e-13) tmp = Float64(x + Float64(z / Float64(Float64(-y) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.35e-34) tmp = t_1; elseif (z <= 3.2e-166) tmp = x + (t * (z / y)); elseif (z <= 1.05e-13) tmp = x + (z / (-y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.35e-34], t$95$1, If[LessEqual[z, 3.2e-166], N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-13], N[(x + N[(z / N[((-y) / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.35 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-166}:\\
\;\;\;\;x + t \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-13}:\\
\;\;\;\;x + \frac{z}{\frac{-y}{a}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.3500000000000002e-34 or 1.04999999999999994e-13 < z Initial program 43.8%
Taylor expanded in z around inf 83.7%
if -3.3500000000000002e-34 < z < 3.20000000000000001e-166Initial program 95.6%
Taylor expanded in x around 0 95.6%
Taylor expanded in z around 0 89.3%
Taylor expanded in z around 0 77.3%
associate-/l*66.9%
Simplified66.9%
Taylor expanded in t around inf 70.5%
associate-*r/70.5%
Simplified70.5%
if 3.20000000000000001e-166 < z < 1.04999999999999994e-13Initial program 86.0%
Taylor expanded in x around 0 86.0%
Taylor expanded in z around 0 88.6%
Taylor expanded in z around 0 76.8%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in t around 0 67.8%
associate-*r/67.8%
neg-mul-167.8%
Simplified67.8%
Final simplification77.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.8e-24) (not (<= z 5e-8))) (/ (- t a) (- b y)) (+ x (/ z (/ y (- t a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.8e-24) || !(z <= 5e-8)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z / (y / (t - a)));
}
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 <= (-9.8d-24)) .or. (.not. (z <= 5d-8))) then
tmp = (t - a) / (b - y)
else
tmp = x + (z / (y / (t - a)))
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 <= -9.8e-24) || !(z <= 5e-8)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z / (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.8e-24) or not (z <= 5e-8): tmp = (t - a) / (b - y) else: tmp = x + (z / (y / (t - a))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.8e-24) || !(z <= 5e-8)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(z / Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.8e-24) || ~((z <= 5e-8))) tmp = (t - a) / (b - y); else tmp = x + (z / (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.8e-24], N[Not[LessEqual[z, 5e-8]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{-24} \lor \neg \left(z \leq 5 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{y}{t - a}}\\
\end{array}
\end{array}
if z < -9.8000000000000002e-24 or 4.9999999999999998e-8 < z Initial program 43.8%
Taylor expanded in z around inf 83.7%
if -9.8000000000000002e-24 < z < 4.9999999999999998e-8Initial program 93.4%
Taylor expanded in x around 0 93.4%
Taylor expanded in z around 0 89.1%
Taylor expanded in z around 0 77.2%
associate-/l*69.2%
Simplified69.2%
Final simplification76.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.5e-30) (not (<= z 0.00096))) (/ (- 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.5e-30) || !(z <= 0.00096)) {
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.5d-30)) .or. (.not. (z <= 0.00096d0))) 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.5e-30) || !(z <= 0.00096)) {
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.5e-30) or not (z <= 0.00096): 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.5e-30) || !(z <= 0.00096)) 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 <= -6.5e-30) || ~((z <= 0.00096))) 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.5e-30], N[Not[LessEqual[z, 0.00096]], $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 -6.5 \cdot 10^{-30} \lor \neg \left(z \leq 0.00096\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -6.5000000000000005e-30 or 9.60000000000000024e-4 < z Initial program 43.8%
Taylor expanded in z around inf 83.7%
if -6.5000000000000005e-30 < z < 9.60000000000000024e-4Initial program 93.4%
Taylor expanded in x around 0 93.4%
Taylor expanded in z around 0 89.1%
Taylor expanded in z around 0 77.2%
Final simplification80.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.9e-25) (not (<= z 3.45e-59))) (/ (- t a) b) (+ x (* t (/ z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.9e-25) || !(z <= 3.45e-59)) {
tmp = (t - a) / b;
} else {
tmp = x + (t * (z / 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.9d-25)) .or. (.not. (z <= 3.45d-59))) then
tmp = (t - a) / b
else
tmp = x + (t * (z / 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.9e-25) || !(z <= 3.45e-59)) {
tmp = (t - a) / b;
} else {
tmp = x + (t * (z / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.9e-25) or not (z <= 3.45e-59): tmp = (t - a) / b else: tmp = x + (t * (z / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.9e-25) || !(z <= 3.45e-59)) tmp = Float64(Float64(t - a) / b); else tmp = Float64(x + Float64(t * Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.9e-25) || ~((z <= 3.45e-59))) tmp = (t - a) / b; else tmp = x + (t * (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.9e-25], N[Not[LessEqual[z, 3.45e-59]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-25} \lor \neg \left(z \leq 3.45 \cdot 10^{-59}\right):\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{z}{y}\\
\end{array}
\end{array}
if z < -1.8999999999999999e-25 or 3.44999999999999991e-59 < z Initial program 46.9%
Taylor expanded in y around 0 55.5%
if -1.8999999999999999e-25 < z < 3.44999999999999991e-59Initial program 93.7%
Taylor expanded in x around 0 93.7%
Taylor expanded in z around 0 89.7%
Taylor expanded in z around 0 78.7%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in t around inf 69.6%
associate-*r/68.7%
Simplified68.7%
Final simplification61.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.55e-26) (not (<= z 2.65e-58))) (/ (- t a) (- b y)) (+ x (* t (/ z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.55e-26) || !(z <= 2.65e-58)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (t * (z / 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.55d-26)) .or. (.not. (z <= 2.65d-58))) then
tmp = (t - a) / (b - y)
else
tmp = x + (t * (z / 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.55e-26) || !(z <= 2.65e-58)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (t * (z / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.55e-26) or not (z <= 2.65e-58): tmp = (t - a) / (b - y) else: tmp = x + (t * (z / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.55e-26) || !(z <= 2.65e-58)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(t * Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.55e-26) || ~((z <= 2.65e-58))) tmp = (t - a) / (b - y); else tmp = x + (t * (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.55e-26], N[Not[LessEqual[z, 2.65e-58]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-26} \lor \neg \left(z \leq 2.65 \cdot 10^{-58}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{z}{y}\\
\end{array}
\end{array}
if z < -1.54999999999999992e-26 or 2.6500000000000002e-58 < z Initial program 46.9%
Taylor expanded in z around inf 80.8%
if -1.54999999999999992e-26 < z < 2.6500000000000002e-58Initial program 93.7%
Taylor expanded in x around 0 93.7%
Taylor expanded in z around 0 89.7%
Taylor expanded in z around 0 78.7%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in t around inf 69.6%
associate-*r/68.7%
Simplified68.7%
Final simplification75.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.42e+23) (not (<= z 5.4e-11))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.42e+23) || !(z <= 5.4e-11)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.42d+23)) .or. (.not. (z <= 5.4d-11))) then
tmp = t / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.42e+23) || !(z <= 5.4e-11)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.42e+23) or not (z <= 5.4e-11): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.42e+23) || !(z <= 5.4e-11)) tmp = Float64(t / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.42e+23) || ~((z <= 5.4e-11))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.42e+23], N[Not[LessEqual[z, 5.4e-11]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{+23} \lor \neg \left(z \leq 5.4 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.42000000000000004e23 or 5.40000000000000009e-11 < z Initial program 42.8%
Taylor expanded in t around inf 23.9%
*-commutative23.9%
Simplified23.9%
Taylor expanded in z around inf 47.5%
if -1.42000000000000004e23 < z < 5.40000000000000009e-11Initial program 92.8%
Taylor expanded in z around 0 51.4%
Final simplification49.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.7e+23) (not (<= z 0.049))) (/ t (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.7e+23) || !(z <= 0.049)) {
tmp = t / (b - 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 <= (-1.7d+23)) .or. (.not. (z <= 0.049d0))) then
tmp = t / (b - 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 <= -1.7e+23) || !(z <= 0.049)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.7e+23) or not (z <= 0.049): tmp = t / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.7e+23) || !(z <= 0.049)) tmp = Float64(t / Float64(b - 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 <= -1.7e+23) || ~((z <= 0.049))) tmp = t / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.7e+23], N[Not[LessEqual[z, 0.049]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+23} \lor \neg \left(z \leq 0.049\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -1.69999999999999996e23 or 0.049000000000000002 < z Initial program 42.8%
Taylor expanded in t around inf 23.9%
*-commutative23.9%
Simplified23.9%
Taylor expanded in z around inf 47.5%
if -1.69999999999999996e23 < z < 0.049000000000000002Initial program 92.8%
Taylor expanded in y around inf 52.9%
mul-1-neg52.9%
unsub-neg52.9%
Simplified52.9%
Final simplification50.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.7e-39) (not (<= y 5.2e+128))) (/ 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 <= -2.7e-39) || !(y <= 5.2e+128)) {
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 <= (-2.7d-39)) .or. (.not. (y <= 5.2d+128))) 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 <= -2.7e-39) || !(y <= 5.2e+128)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.7e-39) or not (y <= 5.2e+128): 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 <= -2.7e-39) || !(y <= 5.2e+128)) 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 <= -2.7e-39) || ~((y <= 5.2e+128))) 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, -2.7e-39], N[Not[LessEqual[y, 5.2e+128]], $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 -2.7 \cdot 10^{-39} \lor \neg \left(y \leq 5.2 \cdot 10^{+128}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.7000000000000001e-39 or 5.2e128 < y Initial program 55.3%
Taylor expanded in y around inf 56.6%
mul-1-neg56.6%
unsub-neg56.6%
Simplified56.6%
if -2.7000000000000001e-39 < y < 5.2e128Initial program 74.5%
Taylor expanded in y around 0 56.0%
Final simplification56.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.4e+26) (not (<= z 2.6e-6))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.4e+26) || !(z <= 2.6e-6)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.4d+26)) .or. (.not. (z <= 2.6d-6))) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.4e+26) || !(z <= 2.6e-6)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.4e+26) or not (z <= 2.6e-6): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.4e+26) || !(z <= 2.6e-6)) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.4e+26) || ~((z <= 2.6e-6))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.4e+26], N[Not[LessEqual[z, 2.6e-6]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+26} \lor \neg \left(z \leq 2.6 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.4e26 or 2.60000000000000009e-6 < z Initial program 42.4%
Taylor expanded in t around inf 24.1%
*-commutative24.1%
Simplified24.1%
Taylor expanded in y around 0 31.5%
if -1.4e26 < z < 2.60000000000000009e-6Initial program 92.9%
Taylor expanded in z around 0 51.0%
Final simplification41.0%
(FPCore (x y z t a b) :precision binary64 (if (<= z -6.1e-16) (/ (- a) b) (if (<= z 1.6e-13) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6.1e-16) {
tmp = -a / b;
} else if (z <= 1.6e-13) {
tmp = x;
} else {
tmp = t / 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 (z <= (-6.1d-16)) then
tmp = -a / b
else if (z <= 1.6d-13) then
tmp = x
else
tmp = t / 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 (z <= -6.1e-16) {
tmp = -a / b;
} else if (z <= 1.6e-13) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -6.1e-16: tmp = -a / b elif z <= 1.6e-13: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -6.1e-16) tmp = Float64(Float64(-a) / b); elseif (z <= 1.6e-13) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -6.1e-16) tmp = -a / b; elseif (z <= 1.6e-13) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6.1e-16], N[((-a) / b), $MachinePrecision], If[LessEqual[z, 1.6e-13], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-13}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -6.09999999999999953e-16Initial program 40.0%
Taylor expanded in a around inf 23.5%
mul-1-neg23.5%
distribute-lft-neg-out23.5%
*-commutative23.5%
Simplified23.5%
Taylor expanded in y around 0 37.8%
associate-*r/37.8%
neg-mul-137.8%
Simplified37.8%
if -6.09999999999999953e-16 < z < 1.6e-13Initial program 93.4%
Taylor expanded in z around 0 52.9%
if 1.6e-13 < z Initial program 47.7%
Taylor expanded in t around inf 28.7%
*-commutative28.7%
Simplified28.7%
Taylor expanded in y around 0 33.7%
Final simplification43.7%
(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.8%
Taylor expanded in z around 0 26.5%
Final simplification26.5%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2023318
(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)))))