\frac{\left(\frac{8}{3} \cdot \sin \left(x \cdot 0.5\right)\right) \cdot \sin \left(x \cdot 0.5\right)}{\sin x}8 \cdot \left(\frac{\sin \left(x \cdot 0.5\right)}{3} \cdot \log \left(e^{\frac{\sin \left(x \cdot 0.5\right)}{\sin x}}\right)\right)double code(double x) {
return (((double) (((double) ((8.0 / 3.0) * ((double) sin(((double) (x * 0.5)))))) * ((double) sin(((double) (x * 0.5)))))) / ((double) sin(x)));
}
double code(double x) {
return ((double) (8.0 * ((double) ((((double) sin(((double) (x * 0.5)))) / 3.0) * ((double) log(((double) exp((((double) sin(((double) (x * 0.5)))) / ((double) sin(x)))))))))));
}




Bits error versus x
Results
| Original | 15.4 |
|---|---|
| Target | 0.3 |
| Herbie | 0.4 |
Initial program 15.4
Simplified0.5
rmApplied *-un-lft-identity0.5
Applied times-frac0.5
Applied associate-*r*0.5
Simplified0.3
rmApplied add-log-exp0.4
Final simplification0.4
herbie shell --seed 2020196
(FPCore (x)
:name "Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, A"
:precision binary64
:herbie-target
(/ (/ (* 8.0 (sin (* x 0.5))) 3.0) (/ (sin x) (sin (* x 0.5))))
(/ (* (* (/ 8.0 3.0) (sin (* x 0.5))) (sin (* x 0.5))) (sin x)))