\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{\frac{i}{\frac{2}{1.0}}}{2 \cdot i + 1.0} \cdot \frac{\frac{i}{\frac{2}{1.0}}}{\left(\mathsf{qms}\left(\left(\left(2 \cdot i\right)\right), 1.0, 1.0\right)\right)}double f(double i) {
double r1232674 = i;
double r1232675 = r1232674 * r1232674;
double r1232676 = r1232675 * r1232675;
double r1232677 = 2.0;
double r1232678 = /* ERROR: no posit support in C */;
double r1232679 = r1232678 * r1232674;
double r1232680 = r1232679 * r1232679;
double r1232681 = r1232676 / r1232680;
double r1232682 = 1.0;
double r1232683 = /* ERROR: no posit support in C */;
double r1232684 = r1232680 - r1232683;
double r1232685 = r1232681 / r1232684;
return r1232685;
}
double f(double i) {
double r1232686 = i;
double r1232687 = 2.0;
double r1232688 = 1.0;
double r1232689 = r1232687 / r1232688;
double r1232690 = r1232686 / r1232689;
double r1232691 = r1232687 * r1232686;
double r1232692 = r1232691 + r1232688;
double r1232693 = r1232690 / r1232692;
double r1232694 = /*Error: no posit support in C */;
double r1232695 = /*Error: no posit support in C */;
double r1232696 = /*Error: no posit support in C */;
double r1232697 = r1232690 / r1232696;
double r1232698 = r1232693 * r1232697;
return r1232698;
}



Bits error versus i
Initial program 2.4
rmApplied p16-*-un-lft-identity2.4
Applied associate-/r*2.4
Simplified0.9
rmApplied p16-*-un-lft-identity0.9
Applied difference-of-squares0.8
Applied p16-times-frac0.4
rmApplied introduce-quire0.4
Applied insert-quire-sub0.4
Final simplification0.4
herbie shell --seed 2019156 +o rules:numerics
(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))))