\frac{\left(\frac{8}{3} \cdot \sin \left(x \cdot 0.5\right)\right) \cdot \sin \left(x \cdot 0.5\right)}{\sin x}\left(\frac{8}{3} \cdot \sin \left(x \cdot 0.5\right)\right) \cdot \frac{\sin \left(0.5 \cdot x\right)}{\sin x}double code(double x) {
return ((double) (((double) (((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) (((double) (((double) (8.0 / 3.0)) * ((double) sin(((double) (x * 0.5)))))) * ((double) (((double) sin(((double) (0.5 * x)))) / ((double) sin(x))))));
}




Bits error versus x
Results
| Original | 15.0 |
|---|---|
| Target | 0.3 |
| Herbie | 0.5 |
Initial program 15.0
rmApplied *-un-lft-identity15.0
Applied times-frac0.5
Simplified0.5
Simplified0.5
Final simplification0.5
herbie shell --seed 2020123 +o rules:numerics
(FPCore (x)
:name "Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, A"
:precision binary64
:herbie-target
(/ (/ (* 8 (sin (* x 0.5))) 3) (/ (sin x) (sin (* x 0.5))))
(/ (* (* (/ 8 3) (sin (* x 0.5))) (sin (* x 0.5))) (sin x)))