\frac{\left(\left(\frac{\left(1\right)}{\left(\frac{x}{\left(1\right)}\right)}\right) - \left(\frac{\left(2\right)}{x}\right)\right)}{\left(\frac{\left(1\right)}{\left(x - \left(1\right)\right)}\right)}\left(\mathsf{qma}\left(\left(\mathsf{qms}\left(\left(\left(\frac{\left(1\right)}{\left(\frac{x}{\left(1\right)}\right)}\right)\right), \left(\frac{\left(2\right)}{x}\right), \left(1.0\right)\right)\right), \left(1.0\right), \left(\frac{\left(1\right)}{\left(x - \left(1\right)\right)}\right)\right)\right)double f(double x) {
double r5947305 = 1.0;
double r5947306 = /* ERROR: no posit support in C */;
double r5947307 = x;
double r5947308 = r5947307 + r5947306;
double r5947309 = r5947306 / r5947308;
double r5947310 = 2.0;
double r5947311 = /* ERROR: no posit support in C */;
double r5947312 = r5947311 / r5947307;
double r5947313 = r5947309 - r5947312;
double r5947314 = r5947307 - r5947306;
double r5947315 = r5947306 / r5947314;
double r5947316 = r5947313 + r5947315;
return r5947316;
}
double f(double x) {
double r5947317 = 1.0;
double r5947318 = /* ERROR: no posit support in C */;
double r5947319 = x;
double r5947320 = r5947319 + r5947318;
double r5947321 = r5947318 / r5947320;
double r5947322 = /*Error: no posit support in C */;
double r5947323 = 2.0;
double r5947324 = /* ERROR: no posit support in C */;
double r5947325 = r5947324 / r5947319;
double r5947326 = 1.0;
double r5947327 = /* ERROR: no posit support in C */;
double r5947328 = /*Error: no posit support in C */;
double r5947329 = r5947319 - r5947318;
double r5947330 = r5947318 / r5947329;
double r5947331 = /*Error: no posit support in C */;
double r5947332 = /*Error: no posit support in C */;
return r5947332;
}



Bits error versus x
Initial program 1.0
rmApplied p16-*-un-lft-identity1.0
Applied introduce-quire1.0
Applied insert-quire-sub1.0
Applied insert-quire-fdp-add1.0
Final simplification1.0
herbie shell --seed 2019163 +o rules:numerics
(FPCore (x)
:name "3frac (problem 3.3.3)"
(+.p16 (-.p16 (/.p16 (real->posit16 1) (+.p16 x (real->posit16 1))) (/.p16 (real->posit16 2) x)) (/.p16 (real->posit16 1) (-.p16 x (real->posit16 1)))))