\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\frac{\frac{x}{y} + 1}{\frac{x + 1}{x}}double f(double x, double y) {
double r867098 = x;
double r867099 = y;
double r867100 = r867098 / r867099;
double r867101 = 1.0;
double r867102 = r867100 + r867101;
double r867103 = r867098 * r867102;
double r867104 = r867098 + r867101;
double r867105 = r867103 / r867104;
return r867105;
}
double f(double x, double y) {
double r867106 = x;
double r867107 = y;
double r867108 = r867106 / r867107;
double r867109 = 1.0;
double r867110 = r867108 + r867109;
double r867111 = r867106 + r867109;
double r867112 = r867111 / r867106;
double r867113 = r867110 / r867112;
return r867113;
}




Bits error versus x




Bits error versus y
Results
| Original | 9.4 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 9.4
rmApplied clear-num9.5
rmApplied associate-/r*0.2
rmApplied *-un-lft-identity0.2
Applied *-un-lft-identity0.2
Applied *-un-lft-identity0.2
Applied times-frac0.2
Applied times-frac0.2
Applied add-sqr-sqrt0.2
Applied times-frac0.2
Simplified0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2020049
(FPCore (x y)
:name "Codec.Picture.Types:toneMapping from JuicyPixels-3.2.6.1"
:precision binary64
:herbie-target
(* (/ x 1) (/ (+ (/ x y) 1) (+ x 1)))
(/ (* x (+ (/ x y) 1)) (+ x 1)))