\frac{\left(d \cdot d\right) \cdot \left(theta - \sin theta\right)}{\left(8 \cdot \sin \left(\frac{theta}{2}\right)\right) \cdot \sin \left(\frac{theta}{2}\right)}\frac{\left(d \cdot d\right) \cdot \left(theta - \sin theta\right)}{\left(8 \cdot \sin \left(\frac{theta}{2}\right)\right) \cdot \sin \left(\frac{theta}{2}\right)}double code(double d, double theta) {
return ((double) (((double) (((double) (d * d)) * ((double) (theta - ((double) sin(theta)))))) / ((double) (((double) (8.0 * ((double) sin(((double) (theta / 2.0)))))) * ((double) sin(((double) (theta / 2.0))))))));
}
double code(double d, double theta) {
return ((double) (((double) (((double) (d * d)) * ((double) (theta - ((double) sin(theta)))))) / ((double) (((double) (8.0 * ((double) sin(((double) (theta / 2.0)))))) * ((double) sin(((double) (theta / 2.0))))))));
}



Bits error versus d



Bits error versus theta
Results
Initial program 35.0
Final simplification35.0
herbie shell --seed 2020153
(FPCore (d theta)
:name "(/ (* (* d d) (- theta (sin theta))) (* (* 8 (sin (/ theta 2))) (sin (/ theta 2))))"
:precision binary64
(/ (* (* d d) (- theta (sin theta))) (* (* 8.0 (sin (/ theta 2.0))) (sin (/ theta 2.0)))))