\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{1.0}{\frac{2 \cdot i - 1.0}{i} \cdot \frac{2}{1.0}}double f(double i) {
double r1070634 = i;
double r1070635 = r1070634 * r1070634;
double r1070636 = r1070635 * r1070635;
double r1070637 = 2.0;
double r1070638 = /* ERROR: no posit support in C */;
double r1070639 = r1070638 * r1070634;
double r1070640 = r1070639 * r1070639;
double r1070641 = r1070636 / r1070640;
double r1070642 = 1.0;
double r1070643 = /* ERROR: no posit support in C */;
double r1070644 = r1070640 - r1070643;
double r1070645 = r1070641 / r1070644;
return r1070645;
}
double f(double i) {
double r1070646 = i;
double r1070647 = 2.0;
double r1070648 = 1.0;
double r1070649 = r1070647 / r1070648;
double r1070650 = r1070646 / r1070649;
double r1070651 = r1070647 * r1070646;
double r1070652 = r1070651 + r1070648;
double r1070653 = r1070650 / r1070652;
double r1070654 = r1070651 - r1070648;
double r1070655 = r1070654 / r1070646;
double r1070656 = r1070655 * r1070649;
double r1070657 = r1070648 / r1070656;
double r1070658 = r1070653 * r1070657;
return r1070658;
}



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.4
rmApplied associate-/r/0.4
Final simplification0.4
herbie shell --seed 2019154
(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))))