\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}{2 \cdot 2} \cdot \frac{\frac{i}{i \cdot 2 + 1.0}}{i \cdot 2 - 1.0}double f(double i) {
double r3423496 = i;
double r3423497 = r3423496 * r3423496;
double r3423498 = r3423497 * r3423497;
double r3423499 = 2.0;
double r3423500 = /* ERROR: no posit support in C */;
double r3423501 = r3423500 * r3423496;
double r3423502 = r3423501 * r3423501;
double r3423503 = r3423498 / r3423502;
double r3423504 = 1.0;
double r3423505 = /* ERROR: no posit support in C */;
double r3423506 = r3423502 - r3423505;
double r3423507 = r3423503 / r3423506;
return r3423507;
}
double f(double i) {
double r3423508 = i;
double r3423509 = 2.0;
double r3423510 = r3423509 * r3423509;
double r3423511 = r3423508 / r3423510;
double r3423512 = r3423508 * r3423509;
double r3423513 = 1.0;
double r3423514 = r3423512 + r3423513;
double r3423515 = r3423508 / r3423514;
double r3423516 = r3423512 - r3423513;
double r3423517 = r3423515 / r3423516;
double r3423518 = r3423511 * r3423517;
return r3423518;
}



Bits error versus i
Initial program 2.4
Simplified1.2
rmApplied associate-*r/1.1
rmApplied associate-/r*0.9
rmApplied *p16-rgt-identity-expand0.9
Applied p16-times-frac1.0
Applied p16-times-frac0.9
Simplified0.9
Simplified0.9
rmApplied p16-*-un-lft-identity0.9
Applied difference-of-squares0.8
Applied associate-/r*0.4
Final simplification0.4
herbie shell --seed 2019163
(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))))