
(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 14 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 (/ (- t a) (- b y))))
(if (<= z -1.75e+68)
(- t_1 (/ x z))
(if (<= z 8.0)
(/ (+ (* z (- t a)) (* x y)) (- y (* z (- y b))))
(+
t_1
(/ (+ (/ y (/ (- b y) x)) (/ (- a t) (/ (pow (- b y) 2.0) y))) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.75e+68) {
tmp = t_1 - (x / z);
} else if (z <= 8.0) {
tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b)));
} else {
tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (pow((b - y), 2.0) / y))) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.75d+68)) then
tmp = t_1 - (x / z)
else if (z <= 8.0d0) then
tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b)))
else
tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (((b - y) ** 2.0d0) / y))) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.75e+68) {
tmp = t_1 - (x / z);
} else if (z <= 8.0) {
tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b)));
} else {
tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (Math.pow((b - y), 2.0) / y))) / z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.75e+68: tmp = t_1 - (x / z) elif z <= 8.0: tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b))) else: tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (math.pow((b - y), 2.0) / y))) / z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.75e+68) tmp = Float64(t_1 - Float64(x / z)); elseif (z <= 8.0) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y - Float64(z * Float64(y - b)))); else tmp = Float64(t_1 + Float64(Float64(Float64(y / Float64(Float64(b - y) / x)) + Float64(Float64(a - t) / Float64((Float64(b - y) ^ 2.0) / y))) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.75e+68) tmp = t_1 - (x / z); elseif (z <= 8.0) tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b))); else tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (((b - y) ^ 2.0) / y))) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+68], N[(t$95$1 - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.0], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(N[(y / N[(N[(b - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+68}:\\
\;\;\;\;t_1 - \frac{x}{z}\\
\mathbf{elif}\;z \leq 8:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y - z \cdot \left(y - b\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{\frac{y}{\frac{b - y}{x}} + \frac{a - t}{\frac{{\left(b - y\right)}^{2}}{y}}}{z}\\
\end{array}
\end{array}
if z < -1.74999999999999989e68Initial program 26.3%
Taylor expanded in z around -inf 57.1%
+-commutative57.1%
associate--l+57.1%
Simplified91.3%
Taylor expanded in y around inf 95.0%
associate-*r/95.0%
mul-1-neg95.0%
Simplified95.0%
if -1.74999999999999989e68 < z < 8Initial program 86.9%
if 8 < z Initial program 41.1%
Taylor expanded in z around -inf 71.9%
+-commutative71.9%
associate--l+71.9%
Simplified96.1%
Final simplification91.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -7e-6)
t_1
(if (<= z -6.2e-68)
(/ x (- 1.0 z))
(if (<= z -8e-302)
(/ (- t a) (- (+ b (/ y z)) y))
(if (<= z 1.1e-14) (/ (- (* x y) (* z a)) (- y (* z y))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -7e-6) {
tmp = t_1;
} else if (z <= -6.2e-68) {
tmp = x / (1.0 - z);
} else if (z <= -8e-302) {
tmp = (t - a) / ((b + (y / z)) - y);
} else if (z <= 1.1e-14) {
tmp = ((x * y) - (z * a)) / (y - (z * 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)) - (x / z)
if (z <= (-7d-6)) then
tmp = t_1
else if (z <= (-6.2d-68)) then
tmp = x / (1.0d0 - z)
else if (z <= (-8d-302)) then
tmp = (t - a) / ((b + (y / z)) - y)
else if (z <= 1.1d-14) then
tmp = ((x * y) - (z * a)) / (y - (z * 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)) - (x / z);
double tmp;
if (z <= -7e-6) {
tmp = t_1;
} else if (z <= -6.2e-68) {
tmp = x / (1.0 - z);
} else if (z <= -8e-302) {
tmp = (t - a) / ((b + (y / z)) - y);
} else if (z <= 1.1e-14) {
tmp = ((x * y) - (z * a)) / (y - (z * y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -7e-6: tmp = t_1 elif z <= -6.2e-68: tmp = x / (1.0 - z) elif z <= -8e-302: tmp = (t - a) / ((b + (y / z)) - y) elif z <= 1.1e-14: tmp = ((x * y) - (z * a)) / (y - (z * y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -7e-6) tmp = t_1; elseif (z <= -6.2e-68) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= -8e-302) tmp = Float64(Float64(t - a) / Float64(Float64(b + Float64(y / z)) - y)); elseif (z <= 1.1e-14) tmp = Float64(Float64(Float64(x * y) - Float64(z * a)) / Float64(y - Float64(z * 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)) - (x / z); tmp = 0.0; if (z <= -7e-6) tmp = t_1; elseif (z <= -6.2e-68) tmp = x / (1.0 - z); elseif (z <= -8e-302) tmp = (t - a) / ((b + (y / z)) - y); elseif (z <= 1.1e-14) tmp = ((x * y) - (z * a)) / (y - (z * y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e-6], t$95$1, If[LessEqual[z, -6.2e-68], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8e-302], N[(N[(t - a), $MachinePrecision] / N[(N[(b + N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-14], N[(N[(N[(x * y), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -7 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-68}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-302}:\\
\;\;\;\;\frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-14}:\\
\;\;\;\;\frac{x \cdot y - z \cdot a}{y - z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.99999999999999989e-6 or 1.1e-14 < z Initial program 40.1%
Taylor expanded in z around -inf 64.4%
+-commutative64.4%
associate--l+64.4%
Simplified92.3%
Taylor expanded in y around inf 84.9%
associate-*r/84.9%
mul-1-neg84.9%
Simplified84.9%
if -6.99999999999999989e-6 < z < -6.1999999999999999e-68Initial program 60.5%
Taylor expanded in y around inf 85.9%
+-commutative85.9%
mul-1-neg85.9%
unsub-neg85.9%
Simplified85.9%
if -6.1999999999999999e-68 < z < -7.9999999999999997e-302Initial program 83.1%
Taylor expanded in x around 0 49.6%
associate-/l*53.7%
+-commutative53.7%
*-commutative53.7%
fma-udef53.7%
Simplified53.7%
Taylor expanded in z around 0 53.7%
if -7.9999999999999997e-302 < z < 1.1e-14Initial program 91.8%
Taylor expanded in b around 0 72.4%
mul-1-neg72.4%
distribute-lft-neg-out72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in t around 0 65.8%
mul-1-neg65.8%
unsub-neg65.8%
mul-1-neg65.8%
unsub-neg65.8%
Simplified65.8%
Final simplification75.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.2e+72) (not (<= z 21000000000000.0))) (- (/ (- t a) (- b y)) (/ x z)) (/ (+ (* z (- t a)) (* x y)) (- y (* z (- y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.2e+72) || !(z <= 21000000000000.0)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - 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 <= (-4.2d+72)) .or. (.not. (z <= 21000000000000.0d0))) then
tmp = ((t - a) / (b - y)) - (x / z)
else
tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - 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 <= -4.2e+72) || !(z <= 21000000000000.0)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.2e+72) or not (z <= 21000000000000.0): tmp = ((t - a) / (b - y)) - (x / z) else: tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.2e+72) || !(z <= 21000000000000.0)) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y - Float64(z * Float64(y - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.2e+72) || ~((z <= 21000000000000.0))) tmp = ((t - a) / (b - y)) - (x / z); else tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.2e+72], N[Not[LessEqual[z, 21000000000000.0]], $MachinePrecision]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+72} \lor \neg \left(z \leq 21000000000000\right):\\
\;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y - z \cdot \left(y - b\right)}\\
\end{array}
\end{array}
if z < -4.2000000000000003e72 or 2.1e13 < z Initial program 33.8%
Taylor expanded in z around -inf 65.4%
+-commutative65.4%
associate--l+65.4%
Simplified94.5%
Taylor expanded in y around inf 88.8%
associate-*r/88.8%
mul-1-neg88.8%
Simplified88.8%
if -4.2000000000000003e72 < z < 2.1e13Initial program 86.5%
Final simplification87.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -1.76e-13)
t_1
(if (<= z -8.2e-73)
(/ x (- 1.0 z))
(if (<= z 1.55e-302)
(/ (- t a) (- (+ b (/ y z)) y))
(if (<= z 1.02e-13) (/ (* x y) (- y (* z (- y b)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -1.76e-13) {
tmp = t_1;
} else if (z <= -8.2e-73) {
tmp = x / (1.0 - z);
} else if (z <= 1.55e-302) {
tmp = (t - a) / ((b + (y / z)) - y);
} else if (z <= 1.02e-13) {
tmp = (x * y) / (y - (z * (y - b)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = ((t - a) / (b - y)) - (x / z)
if (z <= (-1.76d-13)) then
tmp = t_1
else if (z <= (-8.2d-73)) then
tmp = x / (1.0d0 - z)
else if (z <= 1.55d-302) then
tmp = (t - a) / ((b + (y / z)) - y)
else if (z <= 1.02d-13) then
tmp = (x * y) / (y - (z * (y - b)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -1.76e-13) {
tmp = t_1;
} else if (z <= -8.2e-73) {
tmp = x / (1.0 - z);
} else if (z <= 1.55e-302) {
tmp = (t - a) / ((b + (y / z)) - y);
} else if (z <= 1.02e-13) {
tmp = (x * y) / (y - (z * (y - b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -1.76e-13: tmp = t_1 elif z <= -8.2e-73: tmp = x / (1.0 - z) elif z <= 1.55e-302: tmp = (t - a) / ((b + (y / z)) - y) elif z <= 1.02e-13: tmp = (x * y) / (y - (z * (y - b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -1.76e-13) tmp = t_1; elseif (z <= -8.2e-73) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= 1.55e-302) tmp = Float64(Float64(t - a) / Float64(Float64(b + Float64(y / z)) - y)); elseif (z <= 1.02e-13) tmp = Float64(Float64(x * y) / Float64(y - Float64(z * Float64(y - b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -1.76e-13) tmp = t_1; elseif (z <= -8.2e-73) tmp = x / (1.0 - z); elseif (z <= 1.55e-302) tmp = (t - a) / ((b + (y / z)) - y); elseif (z <= 1.02e-13) tmp = (x * y) / (y - (z * (y - b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.76e-13], t$95$1, If[LessEqual[z, -8.2e-73], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-302], N[(N[(t - a), $MachinePrecision] / N[(N[(b + N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e-13], N[(N[(x * y), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -1.76 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-73}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-302}:\\
\;\;\;\;\frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-13}:\\
\;\;\;\;\frac{x \cdot y}{y - z \cdot \left(y - b\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.7600000000000001e-13 or 1.0199999999999999e-13 < z Initial program 40.1%
Taylor expanded in z around -inf 64.4%
+-commutative64.4%
associate--l+64.4%
Simplified92.3%
Taylor expanded in y around inf 84.9%
associate-*r/84.9%
mul-1-neg84.9%
Simplified84.9%
if -1.7600000000000001e-13 < z < -8.20000000000000032e-73Initial program 60.5%
Taylor expanded in y around inf 85.9%
+-commutative85.9%
mul-1-neg85.9%
unsub-neg85.9%
Simplified85.9%
if -8.20000000000000032e-73 < z < 1.54999999999999992e-302Initial program 83.5%
Taylor expanded in x around 0 50.7%
associate-/l*54.7%
+-commutative54.7%
*-commutative54.7%
fma-udef54.7%
Simplified54.7%
Taylor expanded in z around 0 54.7%
if 1.54999999999999992e-302 < z < 1.0199999999999999e-13Initial program 91.7%
Taylor expanded in x around inf 57.1%
Final simplification73.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (- t a) -1e-104) (not (<= (- t a) 1e+14))) (/ (- t a) (- (+ b (/ y z)) y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t - a) <= -1e-104) || !((t - a) <= 1e+14)) {
tmp = (t - a) / ((b + (y / z)) - 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 (((t - a) <= (-1d-104)) .or. (.not. ((t - a) <= 1d+14))) then
tmp = (t - a) / ((b + (y / z)) - 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 (((t - a) <= -1e-104) || !((t - a) <= 1e+14)) {
tmp = (t - a) / ((b + (y / z)) - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t - a) <= -1e-104) or not ((t - a) <= 1e+14): tmp = (t - a) / ((b + (y / z)) - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t - a) <= -1e-104) || !(Float64(t - a) <= 1e+14)) tmp = Float64(Float64(t - a) / Float64(Float64(b + Float64(y / z)) - 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 (((t - a) <= -1e-104) || ~(((t - a) <= 1e+14))) tmp = (t - a) / ((b + (y / z)) - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t - a), $MachinePrecision], -1e-104], N[Not[LessEqual[N[(t - a), $MachinePrecision], 1e+14]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(N[(b + N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t - a \leq -1 \cdot 10^{-104} \lor \neg \left(t - a \leq 10^{+14}\right):\\
\;\;\;\;\frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if (-.f64 t a) < -9.99999999999999927e-105 or 1e14 < (-.f64 t a) Initial program 57.1%
Taylor expanded in x around 0 40.6%
associate-/l*48.5%
+-commutative48.5%
*-commutative48.5%
fma-udef48.5%
Simplified48.5%
Taylor expanded in z around 0 71.8%
if -9.99999999999999927e-105 < (-.f64 t a) < 1e14Initial program 73.1%
Taylor expanded in y around inf 58.6%
+-commutative58.6%
mul-1-neg58.6%
unsub-neg58.6%
Simplified58.6%
Final simplification69.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.7) (not (<= z 6000000000000.0))) (- (/ (- t a) (- b y)) (/ x z)) (/ (+ (* z (- t a)) (* x y)) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.7) || !(z <= 6000000000000.0)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((z * (t - a)) + (x * y)) / (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 <= (-3.7d0)) .or. (.not. (z <= 6000000000000.0d0))) then
tmp = ((t - a) / (b - y)) - (x / z)
else
tmp = ((z * (t - a)) + (x * y)) / (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 <= -3.7) || !(z <= 6000000000000.0)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.7) or not (z <= 6000000000000.0): tmp = ((t - a) / (b - y)) - (x / z) else: tmp = ((z * (t - a)) + (x * y)) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.7) || !(z <= 6000000000000.0)) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.7) || ~((z <= 6000000000000.0))) tmp = ((t - a) / (b - y)) - (x / z); else tmp = ((z * (t - a)) + (x * y)) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.7], N[Not[LessEqual[z, 6000000000000.0]], $MachinePrecision]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \lor \neg \left(z \leq 6000000000000\right):\\
\;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -3.7000000000000002 or 6e12 < z Initial program 36.9%
Taylor expanded in z around -inf 64.8%
+-commutative64.8%
associate--l+64.8%
Simplified94.5%
Taylor expanded in y around inf 87.8%
associate-*r/87.8%
mul-1-neg87.8%
Simplified87.8%
if -3.7000000000000002 < z < 6e12Initial program 86.5%
Taylor expanded in b around inf 84.9%
Final simplification86.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))) (t_2 (/ (- a) b)))
(if (<= y -1.95e+37)
t_1
(if (<= y -9e-66)
(/ t b)
(if (<= y -7.5e-94)
t_1
(if (<= y -1.8e-305)
t_2
(if (<= y 6.7e-103) (/ t b) (if (<= y 1.55) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = -a / b;
double tmp;
if (y <= -1.95e+37) {
tmp = t_1;
} else if (y <= -9e-66) {
tmp = t / b;
} else if (y <= -7.5e-94) {
tmp = t_1;
} else if (y <= -1.8e-305) {
tmp = t_2;
} else if (y <= 6.7e-103) {
tmp = t / b;
} else if (y <= 1.55) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (1.0d0 - z)
t_2 = -a / b
if (y <= (-1.95d+37)) then
tmp = t_1
else if (y <= (-9d-66)) then
tmp = t / b
else if (y <= (-7.5d-94)) then
tmp = t_1
else if (y <= (-1.8d-305)) then
tmp = t_2
else if (y <= 6.7d-103) then
tmp = t / b
else if (y <= 1.55d0) then
tmp = t_2
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 t_2 = -a / b;
double tmp;
if (y <= -1.95e+37) {
tmp = t_1;
} else if (y <= -9e-66) {
tmp = t / b;
} else if (y <= -7.5e-94) {
tmp = t_1;
} else if (y <= -1.8e-305) {
tmp = t_2;
} else if (y <= 6.7e-103) {
tmp = t / b;
} else if (y <= 1.55) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) t_2 = -a / b tmp = 0 if y <= -1.95e+37: tmp = t_1 elif y <= -9e-66: tmp = t / b elif y <= -7.5e-94: tmp = t_1 elif y <= -1.8e-305: tmp = t_2 elif y <= 6.7e-103: tmp = t / b elif y <= 1.55: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) t_2 = Float64(Float64(-a) / b) tmp = 0.0 if (y <= -1.95e+37) tmp = t_1; elseif (y <= -9e-66) tmp = Float64(t / b); elseif (y <= -7.5e-94) tmp = t_1; elseif (y <= -1.8e-305) tmp = t_2; elseif (y <= 6.7e-103) tmp = Float64(t / b); elseif (y <= 1.55) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); t_2 = -a / b; tmp = 0.0; if (y <= -1.95e+37) tmp = t_1; elseif (y <= -9e-66) tmp = t / b; elseif (y <= -7.5e-94) tmp = t_1; elseif (y <= -1.8e-305) tmp = t_2; elseif (y <= 6.7e-103) tmp = t / b; elseif (y <= 1.55) tmp = t_2; 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]}, Block[{t$95$2 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[y, -1.95e+37], t$95$1, If[LessEqual[y, -9e-66], N[(t / b), $MachinePrecision], If[LessEqual[y, -7.5e-94], t$95$1, If[LessEqual[y, -1.8e-305], t$95$2, If[LessEqual[y, 6.7e-103], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.55], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
t_2 := \frac{-a}{b}\\
\mathbf{if}\;y \leq -1.95 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-66}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-305}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 6.7 \cdot 10^{-103}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 1.55:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.9499999999999999e37 or -8.9999999999999995e-66 < y < -7.5000000000000003e-94 or 1.55000000000000004 < y Initial program 44.2%
Taylor expanded in y around inf 50.2%
+-commutative50.2%
mul-1-neg50.2%
unsub-neg50.2%
Simplified50.2%
if -1.9499999999999999e37 < y < -8.9999999999999995e-66 or -1.80000000000000002e-305 < y < 6.69999999999999993e-103Initial program 78.5%
Taylor expanded in b around inf 48.4%
Taylor expanded in t around inf 42.4%
if -7.5000000000000003e-94 < y < -1.80000000000000002e-305 or 6.69999999999999993e-103 < y < 1.55000000000000004Initial program 73.1%
Taylor expanded in a around inf 39.7%
mul-1-neg39.7%
distribute-lft-neg-out39.7%
*-commutative39.7%
Simplified39.7%
Taylor expanded in y around 0 49.9%
associate-*r/49.9%
neg-mul-149.9%
Simplified49.9%
Final simplification48.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))) (t_2 (/ (- t a) (- b y))))
(if (<= z -4.8e-12)
t_2
(if (<= z -6.8e-69)
t_1
(if (<= z -7e-118)
(/ (- a) (+ (- b y) (/ y z)))
(if (<= z -2.25e-128)
(/ (* x y) (* z (- b y)))
(if (<= z 4.2e+28) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -4.8e-12) {
tmp = t_2;
} else if (z <= -6.8e-69) {
tmp = t_1;
} else if (z <= -7e-118) {
tmp = -a / ((b - y) + (y / z));
} else if (z <= -2.25e-128) {
tmp = (x * y) / (z * (b - y));
} else if (z <= 4.2e+28) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (1.0d0 - z)
t_2 = (t - a) / (b - y)
if (z <= (-4.8d-12)) then
tmp = t_2
else if (z <= (-6.8d-69)) then
tmp = t_1
else if (z <= (-7d-118)) then
tmp = -a / ((b - y) + (y / z))
else if (z <= (-2.25d-128)) then
tmp = (x * y) / (z * (b - y))
else if (z <= 4.2d+28) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -4.8e-12) {
tmp = t_2;
} else if (z <= -6.8e-69) {
tmp = t_1;
} else if (z <= -7e-118) {
tmp = -a / ((b - y) + (y / z));
} else if (z <= -2.25e-128) {
tmp = (x * y) / (z * (b - y));
} else if (z <= 4.2e+28) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) t_2 = (t - a) / (b - y) tmp = 0 if z <= -4.8e-12: tmp = t_2 elif z <= -6.8e-69: tmp = t_1 elif z <= -7e-118: tmp = -a / ((b - y) + (y / z)) elif z <= -2.25e-128: tmp = (x * y) / (z * (b - y)) elif z <= 4.2e+28: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -4.8e-12) tmp = t_2; elseif (z <= -6.8e-69) tmp = t_1; elseif (z <= -7e-118) tmp = Float64(Float64(-a) / Float64(Float64(b - y) + Float64(y / z))); elseif (z <= -2.25e-128) tmp = Float64(Float64(x * y) / Float64(z * Float64(b - y))); elseif (z <= 4.2e+28) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -4.8e-12) tmp = t_2; elseif (z <= -6.8e-69) tmp = t_1; elseif (z <= -7e-118) tmp = -a / ((b - y) + (y / z)); elseif (z <= -2.25e-128) tmp = (x * y) / (z * (b - y)); elseif (z <= 4.2e+28) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e-12], t$95$2, If[LessEqual[z, -6.8e-69], t$95$1, If[LessEqual[z, -7e-118], N[((-a) / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.25e-128], N[(N[(x * y), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+28], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{-12}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-118}:\\
\;\;\;\;\frac{-a}{\left(b - y\right) + \frac{y}{z}}\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-128}:\\
\;\;\;\;\frac{x \cdot y}{z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -4.79999999999999974e-12 or 4.19999999999999978e28 < z Initial program 36.9%
Taylor expanded in z around inf 84.9%
if -4.79999999999999974e-12 < z < -6.80000000000000016e-69 or -2.25e-128 < z < 4.19999999999999978e28Initial program 84.1%
Taylor expanded in y around inf 54.0%
+-commutative54.0%
mul-1-neg54.0%
unsub-neg54.0%
Simplified54.0%
if -6.80000000000000016e-69 < z < -7e-118Initial program 100.0%
Taylor expanded in x around 0 80.8%
associate-/l*80.8%
+-commutative80.8%
*-commutative80.8%
fma-udef80.8%
Simplified80.8%
Taylor expanded in z around 0 80.8%
Taylor expanded in t around 0 80.8%
associate-*r/80.8%
neg-mul-180.8%
+-commutative80.8%
associate--l+80.8%
Simplified80.8%
if -7e-118 < z < -2.25e-128Initial program 99.6%
Taylor expanded in x around inf 75.8%
Taylor expanded in z around inf 77.0%
Final simplification71.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= z -1.5e+222)
t_1
(if (<= z -3.1e+65)
(/ t b)
(if (or (<= z -0.00285) (not (<= z 2.25e-12))) t_1 x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -1.5e+222) {
tmp = t_1;
} else if (z <= -3.1e+65) {
tmp = t / b;
} else if ((z <= -0.00285) || !(z <= 2.25e-12)) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -a / b
if (z <= (-1.5d+222)) then
tmp = t_1
else if (z <= (-3.1d+65)) then
tmp = t / b
else if ((z <= (-0.00285d0)) .or. (.not. (z <= 2.25d-12))) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -1.5e+222) {
tmp = t_1;
} else if (z <= -3.1e+65) {
tmp = t / b;
} else if ((z <= -0.00285) || !(z <= 2.25e-12)) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if z <= -1.5e+222: tmp = t_1 elif z <= -3.1e+65: tmp = t / b elif (z <= -0.00285) or not (z <= 2.25e-12): tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) / b) tmp = 0.0 if (z <= -1.5e+222) tmp = t_1; elseif (z <= -3.1e+65) tmp = Float64(t / b); elseif ((z <= -0.00285) || !(z <= 2.25e-12)) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a / b; tmp = 0.0; if (z <= -1.5e+222) tmp = t_1; elseif (z <= -3.1e+65) tmp = t / b; elseif ((z <= -0.00285) || ~((z <= 2.25e-12))) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[z, -1.5e+222], t$95$1, If[LessEqual[z, -3.1e+65], N[(t / b), $MachinePrecision], If[Or[LessEqual[z, -0.00285], N[Not[LessEqual[z, 2.25e-12]], $MachinePrecision]], t$95$1, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+222}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+65}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq -0.00285 \lor \neg \left(z \leq 2.25 \cdot 10^{-12}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.50000000000000007e222 or -3.09999999999999991e65 < z < -0.0028500000000000001 or 2.2499999999999999e-12 < z Initial program 41.9%
Taylor expanded in a around inf 22.4%
mul-1-neg22.4%
distribute-lft-neg-out22.4%
*-commutative22.4%
Simplified22.4%
Taylor expanded in y around 0 32.5%
associate-*r/32.5%
neg-mul-132.5%
Simplified32.5%
if -1.50000000000000007e222 < z < -3.09999999999999991e65Initial program 30.6%
Taylor expanded in b around inf 19.9%
Taylor expanded in t around inf 33.7%
if -0.0028500000000000001 < z < 2.2499999999999999e-12Initial program 86.5%
Taylor expanded in z around 0 50.0%
Final simplification40.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= z -1.25e+260)
(/ (- t) y)
(if (<= z -5e+223)
t_1
(if (<= z -1.55e+65) (/ t b) (if (<= z 5.2e-11) x t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -1.25e+260) {
tmp = -t / y;
} else if (z <= -5e+223) {
tmp = t_1;
} else if (z <= -1.55e+65) {
tmp = t / b;
} else if (z <= 5.2e-11) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -a / b
if (z <= (-1.25d+260)) then
tmp = -t / y
else if (z <= (-5d+223)) then
tmp = t_1
else if (z <= (-1.55d+65)) then
tmp = t / b
else if (z <= 5.2d-11) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -1.25e+260) {
tmp = -t / y;
} else if (z <= -5e+223) {
tmp = t_1;
} else if (z <= -1.55e+65) {
tmp = t / b;
} else if (z <= 5.2e-11) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if z <= -1.25e+260: tmp = -t / y elif z <= -5e+223: tmp = t_1 elif z <= -1.55e+65: tmp = t / b elif z <= 5.2e-11: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) / b) tmp = 0.0 if (z <= -1.25e+260) tmp = Float64(Float64(-t) / y); elseif (z <= -5e+223) tmp = t_1; elseif (z <= -1.55e+65) tmp = Float64(t / b); elseif (z <= 5.2e-11) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a / b; tmp = 0.0; if (z <= -1.25e+260) tmp = -t / y; elseif (z <= -5e+223) tmp = t_1; elseif (z <= -1.55e+65) tmp = t / b; elseif (z <= 5.2e-11) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[z, -1.25e+260], N[((-t) / y), $MachinePrecision], If[LessEqual[z, -5e+223], t$95$1, If[LessEqual[z, -1.55e+65], N[(t / b), $MachinePrecision], If[LessEqual[z, 5.2e-11], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+260}:\\
\;\;\;\;\frac{-t}{y}\\
\mathbf{elif}\;z \leq -5 \cdot 10^{+223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{+65}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-11}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.2499999999999999e260Initial program 18.3%
Taylor expanded in b around 0 9.4%
mul-1-neg9.4%
distribute-lft-neg-out9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in t around inf 10.0%
associate-/l*12.2%
+-commutative12.2%
mul-1-neg12.2%
distribute-rgt-neg-in12.2%
mul-1-neg12.2%
*-rgt-identity12.2%
distribute-lft-in12.2%
*-commutative12.2%
associate-/l*43.3%
+-commutative43.3%
mul-1-neg43.3%
unsub-neg43.3%
Simplified43.3%
Taylor expanded in z around inf 45.8%
associate-*r/45.8%
mul-1-neg45.8%
Simplified45.8%
if -1.2499999999999999e260 < z < -4.99999999999999985e223 or 5.2000000000000001e-11 < z Initial program 43.5%
Taylor expanded in a around inf 22.3%
mul-1-neg22.3%
distribute-lft-neg-out22.3%
*-commutative22.3%
Simplified22.3%
Taylor expanded in y around 0 35.1%
associate-*r/35.1%
neg-mul-135.1%
Simplified35.1%
if -4.99999999999999985e223 < z < -1.54999999999999995e65Initial program 29.7%
Taylor expanded in b around inf 19.3%
Taylor expanded in t around inf 32.8%
if -1.54999999999999995e65 < z < 5.2000000000000001e-11Initial program 86.4%
Taylor expanded in z around 0 47.5%
Final simplification41.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.68e-12) (not (<= z 7e+37))) (/ (- t a) (- 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.68e-12) || !(z <= 7e+37)) {
tmp = (t - a) / (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.68d-12)) .or. (.not. (z <= 7d+37))) then
tmp = (t - a) / (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.68e-12) || !(z <= 7e+37)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.68e-12) or not (z <= 7e+37): tmp = (t - a) / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.68e-12) || !(z <= 7e+37)) tmp = Float64(Float64(t - a) / 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.68e-12) || ~((z <= 7e+37))) tmp = (t - a) / (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.68e-12], N[Not[LessEqual[z, 7e+37]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.68 \cdot 10^{-12} \lor \neg \left(z \leq 7 \cdot 10^{+37}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -1.67999999999999991e-12 or 7e37 < z Initial program 36.9%
Taylor expanded in z around inf 84.9%
if -1.67999999999999991e-12 < z < 7e37Initial program 85.2%
Taylor expanded in y around inf 51.1%
+-commutative51.1%
mul-1-neg51.1%
unsub-neg51.1%
Simplified51.1%
Final simplification68.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.25e+37) (not (<= y 12.2))) (/ 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 <= -1.25e+37) || !(y <= 12.2)) {
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 <= (-1.25d+37)) .or. (.not. (y <= 12.2d0))) 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 <= -1.25e+37) || !(y <= 12.2)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.25e+37) or not (y <= 12.2): 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 <= -1.25e+37) || !(y <= 12.2)) 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 <= -1.25e+37) || ~((y <= 12.2))) 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, -1.25e+37], N[Not[LessEqual[y, 12.2]], $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 -1.25 \cdot 10^{+37} \lor \neg \left(y \leq 12.2\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -1.24999999999999997e37 or 12.199999999999999 < y Initial program 41.8%
Taylor expanded in y around inf 51.3%
+-commutative51.3%
mul-1-neg51.3%
unsub-neg51.3%
Simplified51.3%
if -1.24999999999999997e37 < y < 12.199999999999999Initial program 76.2%
Taylor expanded in y around 0 58.2%
Final simplification54.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.3e+64) (/ t b) (if (<= z 2e-14) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.3e+64) {
tmp = t / b;
} else if (z <= 2e-14) {
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 <= (-2.3d+64)) then
tmp = t / b
else if (z <= 2d-14) 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 <= -2.3e+64) {
tmp = t / b;
} else if (z <= 2e-14) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.3e+64: tmp = t / b elif z <= 2e-14: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.3e+64) tmp = Float64(t / b); elseif (z <= 2e-14) 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 <= -2.3e+64) tmp = t / b; elseif (z <= 2e-14) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.3e+64], N[(t / b), $MachinePrecision], If[LessEqual[z, 2e-14], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+64}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -2.3e64 or 2e-14 < z Initial program 37.4%
Taylor expanded in b around inf 26.2%
Taylor expanded in t around inf 25.3%
if -2.3e64 < z < 2e-14Initial program 86.3%
Taylor expanded in z around 0 47.8%
Final simplification35.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 59.9%
Taylor expanded in z around 0 23.9%
Final simplification23.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 2023229
(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)))))