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




Bits error versus x
Results
| Original | 14.7 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
Initial program 14.7
rmApplied *-un-lft-identity14.7
Applied times-frac0.5
Simplified0.5
Simplified0.5
rmApplied div-inv0.5
Applied associate-*l*0.5
Simplified0.3
Final simplification0.3
herbie shell --seed 2020150
(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)))