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



Bits error versus a



Bits error versus b



Bits error versus angle
Results
Initial program 20.5
rmApplied add-cube-cbrt_binary64_45420.6
Applied associate-*r*_binary64_35920.6
rmApplied add-sqr-sqrt_binary64_44120.6
Applied cbrt-prod_binary64_45020.6
rmApplied add-log-exp_binary64_45820.6
Simplified20.6
Simplified20.6
Final simplification20.6
herbie shell --seed 2020356
(FPCore (a b angle)
:name "ab-angle->ABCF A"
:precision binary64
(+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)))