Average Error: 31.2 → 31.0
Time: 24.7s
Precision: binary64
\[\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)\]
\[2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sqrt[3]{{\left(\sqrt[3]{{\log \left(e^{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}^{3}}\right)}^{3}} \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\]
\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)
2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sqrt[3]{{\left(\sqrt[3]{{\log \left(e^{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}^{3}}\right)}^{3}} \cdot \left(b \cdot b - a \cdot a\right)\right)\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
  (*
   (sin (* 0.005555555555555556 (* angle PI)))
   (*
    (cbrt
     (pow
      (cbrt (pow (log (exp (cos (* 0.005555555555555556 (* angle PI))))) 3.0))
      3.0))
    (- (* b b) (* a a))))))
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 * (sin(0.005555555555555556 * (angle * ((double) M_PI))) * (cbrt(pow(cbrt(pow(log(exp(cos(0.005555555555555556 * (angle * ((double) M_PI))))), 3.0)), 3.0)) * ((b * b) - (a * a))));
}

Error

Bits error versus a

Bits error versus b

Bits error versus angle

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 31.2

    \[\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)\]
  2. Simplified31.0

    \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{\pi}{180} \cdot angle\right) \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot \cos \left(\frac{\pi}{180} \cdot angle\right)\right)\right)}\]
  3. Taylor expanded around inf 31.0

    \[\leadsto 2 \cdot \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\]
  4. Simplified31.0

    \[\leadsto 2 \cdot \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)\right)}\]
  5. Using strategy rm
  6. Applied add-cbrt-cube_binary64_11431.0

    \[\leadsto 2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\color{blue}{\sqrt[3]{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}} \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\]
  7. Simplified31.0

    \[\leadsto 2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sqrt[3]{\color{blue}{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{3}}} \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\]
  8. Using strategy rm
  9. Applied add-cbrt-cube_binary64_11431.0

    \[\leadsto 2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sqrt[3]{{\color{blue}{\left(\sqrt[3]{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}^{3}} \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\]
  10. Simplified31.0

    \[\leadsto 2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sqrt[3]{{\left(\sqrt[3]{\color{blue}{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{3}}}\right)}^{3}} \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\]
  11. Using strategy rm
  12. Applied add-log-exp_binary64_11731.0

    \[\leadsto 2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sqrt[3]{{\left(\sqrt[3]{{\color{blue}{\log \left(e^{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}^{3}}\right)}^{3}} \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\]
  13. Final simplification31.0

    \[\leadsto 2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sqrt[3]{{\left(\sqrt[3]{{\log \left(e^{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}^{3}}\right)}^{3}} \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\]

Reproduce

herbie shell --seed 2021176 
(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)))))