Average Error: 20.6 → 20.6
Time: 14.2s
Precision: binary64
\[{\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(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sqrt[3]{\log \left(e^{{\cos \left(\sqrt[3]{0.005555555555555556} \cdot \left(\sqrt[3]{angle \cdot \pi} \cdot {\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)\right)}^{3}}\right)}\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 (* a (sin (* angle (/ PI 180.0)))) 2.0)
  (pow
   (*
    b
    (cbrt
     (log
      (exp
       (pow
        (cos
         (*
          (cbrt 0.005555555555555556)
          (*
           (cbrt (* angle PI))
           (pow (cbrt (* PI (* angle 0.005555555555555556))) 2.0))))
        3.0)))))
   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((a * sin((angle * (((double) M_PI) / 180.0)))), 2.0) + pow((b * cbrt(log(exp(pow(cos((cbrt(0.005555555555555556) * (cbrt((angle * ((double) M_PI))) * pow(cbrt((((double) M_PI) * (angle * 0.005555555555555556))), 2.0)))), 3.0))))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow((a * Math.sin(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos(((angle / 180.0) * Math.PI))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow((a * Math.sin((angle * (Math.PI / 180.0)))), 2.0) + Math.pow((b * Math.cbrt(Math.log(Math.exp(Math.pow(Math.cos((Math.cbrt(0.005555555555555556) * (Math.cbrt((angle * Math.PI)) * Math.pow(Math.cbrt((Math.PI * (angle * 0.005555555555555556))), 2.0)))), 3.0))))), 2.0);
}
function code(a, b, angle)
	return Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(Float64(angle / 180.0) * pi))) ^ 2.0))
end
function code(a, b, angle)
	return Float64((Float64(a * sin(Float64(angle * Float64(pi / 180.0)))) ^ 2.0) + (Float64(b * cbrt(log(exp((cos(Float64(cbrt(0.005555555555555556) * Float64(cbrt(Float64(angle * pi)) * (cbrt(Float64(pi * Float64(angle * 0.005555555555555556))) ^ 2.0)))) ^ 3.0))))) ^ 2.0))
end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Power[N[Log[N[Exp[N[Power[N[Cos[N[(N[Power[0.005555555555555556, 1/3], $MachinePrecision] * N[(N[Power[N[(angle * Pi), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
{\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(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sqrt[3]{\log \left(e^{{\cos \left(\sqrt[3]{0.005555555555555556} \cdot \left(\sqrt[3]{angle \cdot \pi} \cdot {\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)\right)}^{3}}\right)}\right)}^{2}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 20.6

    \[{\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} \]
  2. Simplified20.5

    \[\leadsto \color{blue}{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}} \]
  3. Applied egg-rr20.5

    \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{\sqrt[3]{{\cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}^{3}}}\right)}^{2} \]
  4. Applied egg-rr20.5

    \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sqrt[3]{\color{blue}{\log \left(e^{{\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}^{3}}\right)}}\right)}^{2} \]
  5. Applied egg-rr20.6

    \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sqrt[3]{\log \left(e^{{\cos \color{blue}{\left({\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}^{3}\right)}}^{3}}\right)}\right)}^{2} \]
  6. Applied egg-rr20.6

    \[\leadsto {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sqrt[3]{\log \left(e^{{\cos \color{blue}{\left(\sqrt[3]{0.005555555555555556} \cdot \left(\sqrt[3]{angle \cdot \pi} \cdot {\left(\sqrt[3]{\pi \cdot \left(0.005555555555555556 \cdot angle\right)}\right)}^{2}\right)\right)}}^{3}}\right)}\right)}^{2} \]
  7. Final simplification20.6

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

Reproduce

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