x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\begin{array}{l}
\mathbf{if}\;t \le -1.699374283935706957857036182841032710783 \cdot 10^{-111}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot y, \frac{1}{z}, x \cdot \left(-\frac{t}{1 - z}\right)\right)\\
\mathbf{elif}\;t \le -5.007773027212033065092460998980032370379 \cdot 10^{-202}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{\sqrt[3]{z} \cdot \sqrt[3]{z}}, \frac{y}{\sqrt[3]{z}}, x \cdot \left(-\frac{t}{1 - z}\right)\right)\\
\mathbf{elif}\;t \le 2.841522777850616113336553397998959361956 \cdot 10^{-176}:\\
\;\;\;\;\frac{x \cdot y}{z} + \left(x \cdot \left(\sqrt[3]{-\frac{t}{1 - z}} \cdot \sqrt[3]{-\frac{t}{1 - z}}\right)\right) \cdot \sqrt[3]{-\frac{t}{1 - z}}\\
\mathbf{elif}\;t \le 3.284223438702235885793954830185385259072 \cdot 10^{74}:\\
\;\;\;\;\frac{x}{\frac{z}{y}} + x \cdot \left(-\frac{t}{1 - z}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot y, \frac{1}{z}, x \cdot \left(-\frac{t}{1 - z}\right)\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r420168 = x;
double r420169 = y;
double r420170 = z;
double r420171 = r420169 / r420170;
double r420172 = t;
double r420173 = 1.0;
double r420174 = r420173 - r420170;
double r420175 = r420172 / r420174;
double r420176 = r420171 - r420175;
double r420177 = r420168 * r420176;
return r420177;
}
double f(double x, double y, double z, double t) {
double r420178 = t;
double r420179 = -1.699374283935707e-111;
bool r420180 = r420178 <= r420179;
double r420181 = x;
double r420182 = y;
double r420183 = r420181 * r420182;
double r420184 = 1.0;
double r420185 = z;
double r420186 = r420184 / r420185;
double r420187 = 1.0;
double r420188 = r420187 - r420185;
double r420189 = r420178 / r420188;
double r420190 = -r420189;
double r420191 = r420181 * r420190;
double r420192 = fma(r420183, r420186, r420191);
double r420193 = -5.007773027212033e-202;
bool r420194 = r420178 <= r420193;
double r420195 = cbrt(r420185);
double r420196 = r420195 * r420195;
double r420197 = r420181 / r420196;
double r420198 = r420182 / r420195;
double r420199 = fma(r420197, r420198, r420191);
double r420200 = 2.841522777850616e-176;
bool r420201 = r420178 <= r420200;
double r420202 = r420183 / r420185;
double r420203 = cbrt(r420190);
double r420204 = r420203 * r420203;
double r420205 = r420181 * r420204;
double r420206 = r420205 * r420203;
double r420207 = r420202 + r420206;
double r420208 = 3.284223438702236e+74;
bool r420209 = r420178 <= r420208;
double r420210 = r420185 / r420182;
double r420211 = r420181 / r420210;
double r420212 = r420211 + r420191;
double r420213 = r420209 ? r420212 : r420192;
double r420214 = r420201 ? r420207 : r420213;
double r420215 = r420194 ? r420199 : r420214;
double r420216 = r420180 ? r420192 : r420215;
return r420216;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 4.9 |
|---|---|
| Target | 4.5 |
| Herbie | 4.7 |
if t < -1.699374283935707e-111 or 3.284223438702236e+74 < t Initial program 4.2
rmApplied sub-neg4.2
Applied distribute-lft-in4.2
Simplified4.0
rmApplied div-inv4.0
Applied fma-def4.0
if -1.699374283935707e-111 < t < -5.007773027212033e-202Initial program 5.5
rmApplied sub-neg5.5
Applied distribute-lft-in5.5
Simplified7.3
rmApplied add-cube-cbrt8.0
Applied times-frac6.6
Applied fma-def6.6
if -5.007773027212033e-202 < t < 2.841522777850616e-176Initial program 6.8
rmApplied sub-neg6.8
Applied distribute-lft-in6.8
Simplified5.8
rmApplied add-cube-cbrt5.8
Applied associate-*r*5.8
if 2.841522777850616e-176 < t < 3.284223438702236e+74Initial program 4.6
rmApplied sub-neg4.6
Applied distribute-lft-in4.6
Simplified5.7
rmApplied associate-/l*4.3
Final simplification4.7
herbie shell --seed 2019322 +o rules:numerics
(FPCore (x y z t)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
:precision binary64
:herbie-target
(if (< (* x (- (/ y z) (/ t (- 1 z)))) -7.623226303312042e-196) (* x (- (/ y z) (* t (/ 1 (- 1 z))))) (if (< (* x (- (/ y z) (/ t (- 1 z)))) 1.4133944927702302e-211) (+ (/ (* y x) z) (- (/ (* t x) (- 1 z)))) (* x (- (/ y z) (* t (/ 1 (- 1 z)))))))
(* x (- (/ y z) (/ t (- 1 z)))))