\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(\sin \left(x \cdot 0.5\right) \cdot \sqrt[3]{18.962962962962962}\right) \cdot \sqrt[3]{{\left(\frac{\sin \left(x \cdot 0.5\right)}{\sin x}\right)}^{3}}(FPCore (x) :precision binary64 (/ (* (* (/ 8.0 3.0) (sin (* x 0.5))) (sin (* x 0.5))) (sin x)))
(FPCore (x) :precision binary64 (* (* (sin (* x 0.5)) (cbrt 18.962962962962962)) (cbrt (pow (/ (sin (* x 0.5)) (sin x)) 3.0))))
double code(double x) {
return (((8.0 / 3.0) * sin(x * 0.5)) * sin(x * 0.5)) / sin(x);
}
double code(double x) {
return (sin(x * 0.5) * cbrt(18.962962962962962)) * cbrt(pow((sin(x * 0.5) / sin(x)), 3.0));
}




Bits error versus x
Results
| Original | 14.9 |
|---|---|
| Target | 0.3 |
| Herbie | 0.6 |
Initial program 14.9
Simplified14.9
rmApplied *-un-lft-identity_binary6414.9
Applied times-frac_binary640.5
Simplified0.5
Simplified0.5
rmApplied add-cbrt-cube_binary640.8
Simplified0.7
rmApplied cbrt-prod_binary640.6
Applied associate-*r*_binary640.6
Final simplification0.6
herbie shell --seed 2020253
(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)))