\frac{\left(\frac{8}{3} \cdot \sin \left(x \cdot 0.5\right)\right) \cdot \sin \left(x \cdot 0.5\right)}{\sin x}
\begin{array}{l}
t_0 := \sin \left(x \cdot 0.5\right)\\
\left(t_0 \cdot \sqrt{2.6666666666666665}\right) \cdot \log \left(e^{\frac{\sqrt{2.6666666666666665}}{\frac{\sin x}{t_0}}}\right)
\end{array}
(FPCore (x) :precision binary64 (/ (* (* (/ 8.0 3.0) (sin (* x 0.5))) (sin (* x 0.5))) (sin x)))
(FPCore (x)
:precision binary64
(let* ((t_0 (sin (* x 0.5))))
(*
(* t_0 (sqrt 2.6666666666666665))
(log (exp (/ (sqrt 2.6666666666666665) (/ (sin x) t_0)))))))double code(double x) {
return (((8.0 / 3.0) * sin(x * 0.5)) * sin(x * 0.5)) / sin(x);
}
double code(double x) {
double t_0 = sin(x * 0.5);
return (t_0 * sqrt(2.6666666666666665)) * log(exp(sqrt(2.6666666666666665) / (sin(x) / t_0)));
}




Bits error versus x
Results
| Original | 14.8 |
|---|---|
| Target | 0.3 |
| Herbie | 0.5 |
Initial program 14.8
Simplified14.8
Applied *-un-lft-identity_binary6414.8
Applied times-frac_binary640.5
Simplified0.5
Applied associate-/l*_binary640.5
Applied *-un-lft-identity_binary640.5
Applied *-un-lft-identity_binary640.5
Applied times-frac_binary640.5
Applied add-sqr-sqrt_binary640.5
Applied times-frac_binary640.5
Applied associate-*r*_binary640.4
Simplified0.4
Applied add-log-exp_binary640.5
Final simplification0.5
herbie shell --seed 2022081
(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)))