\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{1.0}{\frac{2 \cdot i + 1.0}{i}}}{\frac{2}{1.0}} \cdot \frac{\frac{i}{\frac{2}{1.0}}}{2 \cdot i - 1.0}double f(double i) {
double r1032103 = i;
double r1032104 = r1032103 * r1032103;
double r1032105 = r1032104 * r1032104;
double r1032106 = 2.0;
double r1032107 = /* ERROR: no posit support in C */;
double r1032108 = r1032107 * r1032103;
double r1032109 = r1032108 * r1032108;
double r1032110 = r1032105 / r1032109;
double r1032111 = 1.0;
double r1032112 = /* ERROR: no posit support in C */;
double r1032113 = r1032109 - r1032112;
double r1032114 = r1032110 / r1032113;
return r1032114;
}
double f(double i) {
double r1032115 = 1.0;
double r1032116 = 2.0;
double r1032117 = i;
double r1032118 = r1032116 * r1032117;
double r1032119 = r1032118 + r1032115;
double r1032120 = r1032119 / r1032117;
double r1032121 = r1032115 / r1032120;
double r1032122 = r1032116 / r1032115;
double r1032123 = r1032121 / r1032122;
double r1032124 = r1032117 / r1032122;
double r1032125 = r1032118 - r1032115;
double r1032126 = r1032124 / r1032125;
double r1032127 = r1032123 * r1032126;
return r1032127;
}



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 p16-*-un-lft-identity0.4
Applied associate-/l*0.5
rmApplied associate-/r/0.5
Applied associate-/r*0.4
Final simplification0.4
herbie shell --seed 2019155
(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))))