\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\left(2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)(FPCore (a b angle) :precision binary64 (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0)))) (cos (* PI (/ angle 180.0)))))
(FPCore (a b angle) :precision binary64 (* (* 2.0 (* (- (pow b 2.0) (pow a 2.0)) (sin (* PI (/ angle 180.0))))) (cos (* PI (/ angle 180.0)))))
double code(double a, double b, double angle) {
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(((double) M_PI) * (angle / 180.0))) * cos(((double) M_PI) * (angle / 180.0));
}
double code(double a, double b, double angle) {
return (2.0 * ((pow(b, 2.0) - pow(a, 2.0)) * sin(((double) M_PI) * (angle / 180.0)))) * cos(((double) M_PI) * (angle / 180.0));
}



Bits error versus a



Bits error versus b



Bits error versus angle
Results
Initial program 31.7
rmApplied associate-*l*_binary64_36031.7
Final simplification31.7
herbie shell --seed 2021060
(FPCore (a b angle)
:name "ab-angle->ABCF B"
:precision binary64
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0)))) (cos (* PI (/ angle 180.0)))))