\frac{\left(\frac{\left(\left(i \cdot i\right) \cdot \left(i \cdot i\right)\right)}{\left(\left(\left(2\right) \cdot i\right) \cdot \left(\left(2\right) \cdot i\right)\right)}\right)}{\left(\left(\left(\left(2\right) \cdot i\right) \cdot \left(\left(2\right) \cdot i\right)\right) - \left(1.0\right)\right)}\frac{i}{1.0 + i \cdot 2} \cdot \frac{1.0}{\frac{i \cdot 2 - 1.0}{\frac{i}{2 \cdot 2}}}double f(double i) {
double r3163493 = i;
double r3163494 = r3163493 * r3163493;
double r3163495 = r3163494 * r3163494;
double r3163496 = 2.0;
double r3163497 = /* ERROR: no posit support in C */;
double r3163498 = r3163497 * r3163493;
double r3163499 = r3163498 * r3163498;
double r3163500 = r3163495 / r3163499;
double r3163501 = 1.0;
double r3163502 = /* ERROR: no posit support in C */;
double r3163503 = r3163499 - r3163502;
double r3163504 = r3163500 / r3163503;
return r3163504;
}
double f(double i) {
double r3163505 = i;
double r3163506 = 1.0;
double r3163507 = 2.0;
double r3163508 = r3163505 * r3163507;
double r3163509 = r3163506 + r3163508;
double r3163510 = r3163505 / r3163509;
double r3163511 = r3163508 - r3163506;
double r3163512 = r3163507 * r3163507;
double r3163513 = r3163505 / r3163512;
double r3163514 = r3163511 / r3163513;
double r3163515 = r3163506 / r3163514;
double r3163516 = r3163510 * r3163515;
return r3163516;
}



Bits error versus i
Initial program 2.3
Simplified1.1
rmApplied associate-/r*1.0
rmApplied associate-/r*0.9
Simplified0.9
rmApplied p16-*-un-lft-identity0.9
Applied difference-of-squares0.8
Applied p16-*-un-lft-identity0.8
Applied p16-times-frac0.6
Applied associate-*r*0.4
Simplified0.3
rmApplied p16-*-un-lft-identity0.3
Applied associate-/l*0.4
Final simplification0.4
herbie shell --seed 2019158
(FPCore (i)
:name "Octave 3.8, jcobi/4, as called"
:pre (and (>.p16 i (real->posit16 0)))
(/.p16 (/.p16 (*.p16 (*.p16 i i) (*.p16 i i)) (*.p16 (*.p16 (real->posit16 2) i) (*.p16 (real->posit16 2) i))) (-.p16 (*.p16 (*.p16 (real->posit16 2) i) (*.p16 (real->posit16 2) i)) (real->posit16 1.0))))