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




Bits error versus x
Results
| Original | 15.0 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
Initial program 15.0
Simplified0.3
rmApplied associate-/r/_binary64_266220.3
Applied *-un-lft-identity_binary64_266760.3
Applied times-frac_binary64_266820.3
Simplified0.3
Taylor expanded around inf 0.3
Final simplification0.3
herbie shell --seed 2021176
(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)))