ab-angle->ABCF B

?

Percentage Accurate: 53.2% → 67.3%
Time: 34.9s
Precision: binary64
Cost: 72068

?

\[\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) \]
\[\begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+65}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{e^{\log \pi \cdot 3}}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \left({\left(\sqrt[3]{\sin \left(\left(\sqrt[3]{\pi} \cdot \left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right)\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3} \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)\\ \end{array} \]
(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
 (if (<= (/ angle 180.0) 5e+65)
   (*
    2.0
    (*
     (- b a)
     (*
      (cos (* 0.005555555555555556 (* angle (cbrt (exp (* (log PI) 3.0))))))
      (* (sin (* 0.005555555555555556 (* angle PI))) (+ b a)))))
   (*
    (* 2.0 (* (- b a) (+ b a)))
    (*
     (pow
      (cbrt
       (sin
        (*
         (* (cbrt PI) (* (cbrt PI) (cbrt PI)))
         (* angle 0.005555555555555556))))
      3.0)
     (cos (* (/ angle 180.0) PI))))))
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) {
	double tmp;
	if ((angle / 180.0) <= 5e+65) {
		tmp = 2.0 * ((b - a) * (cos((0.005555555555555556 * (angle * cbrt(exp((log(((double) M_PI)) * 3.0)))))) * (sin((0.005555555555555556 * (angle * ((double) M_PI)))) * (b + a))));
	} else {
		tmp = (2.0 * ((b - a) * (b + a))) * (pow(cbrt(sin(((cbrt(((double) M_PI)) * (cbrt(((double) M_PI)) * cbrt(((double) M_PI)))) * (angle * 0.005555555555555556)))), 3.0) * cos(((angle / 180.0) * ((double) M_PI))));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin((Math.PI * (angle / 180.0)))) * Math.cos((Math.PI * (angle / 180.0)));
}
public static double code(double a, double b, double angle) {
	double tmp;
	if ((angle / 180.0) <= 5e+65) {
		tmp = 2.0 * ((b - a) * (Math.cos((0.005555555555555556 * (angle * Math.cbrt(Math.exp((Math.log(Math.PI) * 3.0)))))) * (Math.sin((0.005555555555555556 * (angle * Math.PI))) * (b + a))));
	} else {
		tmp = (2.0 * ((b - a) * (b + a))) * (Math.pow(Math.cbrt(Math.sin(((Math.cbrt(Math.PI) * (Math.cbrt(Math.PI) * Math.cbrt(Math.PI))) * (angle * 0.005555555555555556)))), 3.0) * Math.cos(((angle / 180.0) * Math.PI)));
	}
	return tmp;
}
function code(a, b, angle)
	return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(Float64(pi * Float64(angle / 180.0)))) * cos(Float64(pi * Float64(angle / 180.0))))
end
function code(a, b, angle)
	tmp = 0.0
	if (Float64(angle / 180.0) <= 5e+65)
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(cos(Float64(0.005555555555555556 * Float64(angle * cbrt(exp(Float64(log(pi) * 3.0)))))) * Float64(sin(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(b + a)))));
	else
		tmp = Float64(Float64(2.0 * Float64(Float64(b - a) * Float64(b + a))) * Float64((cbrt(sin(Float64(Float64(cbrt(pi) * Float64(cbrt(pi) * cbrt(pi))) * Float64(angle * 0.005555555555555556)))) ^ 3.0) * cos(Float64(Float64(angle / 180.0) * pi))));
	end
	return tmp
end
code[a_, b_, angle_] := N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[a_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+65], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[Exp[N[(N[Log[Pi], $MachinePrecision] * 3.0), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Power[N[Sin[N[(N[(N[Power[Pi, 1/3], $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision] * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\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)
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+65}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{e^{\log \pi \cdot 3}}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \left({\left(\sqrt[3]{\sin \left(\left(\sqrt[3]{\pi} \cdot \left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right)\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3} \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)\\


\end{array}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Herbie found 16 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Bogosity?

Bogosity

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. if (/.f64 angle 180) < 4.99999999999999973e65

    1. Initial program 60.1%

      \[\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. Simplified64.4%

      \[\leadsto \color{blue}{2 \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      Step-by-step derivation

      [Start]60.1%

      \[ \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) \]

      associate-*l* [=>]60.1%

      \[ \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]

      associate-*l* [=>]60.1%

      \[ \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]

      unpow2 [=>]60.1%

      \[ 2 \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]

      unpow2 [=>]60.1%

      \[ 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]

      difference-of-squares [=>]64.4%

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

      \[\leadsto 2 \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + b\right)\right)\right)\right)} \]
    4. Applied egg-rr79.2%

      \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]
      Step-by-step derivation

      [Start]79.5%

      \[ 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]

      add-cbrt-cube [=>]79.2%

      \[ 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]
    5. Applied egg-rr80.6%

      \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{\color{blue}{e^{\log \pi \cdot 3}}}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]
      Step-by-step derivation

      [Start]79.2%

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

      pow3 [=>]79.2%

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

      pow-to-exp [=>]80.6%

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

    if 4.99999999999999973e65 < (/.f64 angle 180)

    1. Initial program 33.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. Simplified35.4%

      \[\leadsto \color{blue}{\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      Step-by-step derivation

      [Start]33.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) \]

      associate-*l* [=>]33.2%

      \[ \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]

      unpow2 [=>]33.2%

      \[ \left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]

      unpow2 [=>]33.2%

      \[ \left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]

      difference-of-squares [=>]35.4%

      \[ \left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    3. Applied egg-rr37.9%

      \[\leadsto \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\color{blue}{{\left(\sqrt[3]{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      Step-by-step derivation

      [Start]35.4%

      \[ \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]

      add-cube-cbrt [=>]35.4%

      \[ \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\color{blue}{\left(\left(\sqrt[3]{\sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \sqrt[3]{\sin \left(\pi \cdot \frac{angle}{180}\right)}\right) \cdot \sqrt[3]{\sin \left(\pi \cdot \frac{angle}{180}\right)}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]

      pow3 [=>]35.4%

      \[ \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\color{blue}{{\left(\sqrt[3]{\sin \left(\pi \cdot \frac{angle}{180}\right)}\right)}^{3}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]

      div-inv [=>]37.9%

      \[ \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left({\left(\sqrt[3]{\sin \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)}\right)}^{3} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]

      metadata-eval [=>]37.9%

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

      \[\leadsto \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left({\left(\sqrt[3]{\sin \left(\color{blue}{\left(\left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right) \cdot \sqrt[3]{\pi}\right)} \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      Step-by-step derivation

      [Start]37.9%

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

      add-cube-cbrt [=>]46.6%

      \[ \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left({\left(\sqrt[3]{\sin \left(\color{blue}{\left(\left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right) \cdot \sqrt[3]{\pi}\right)} \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification74.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+65}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{e^{\log \pi \cdot 3}}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \left({\left(\sqrt[3]{\sin \left(\left(\sqrt[3]{\pi} \cdot \left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right)\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3} \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy67.3%
Cost72068
\[\begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+65}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{e^{\log \pi \cdot 3}}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \left({\left(\sqrt[3]{\sin \left(\left(\sqrt[3]{\pi} \cdot \left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right)\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3} \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)\\ \end{array} \]
Alternative 2
Accuracy67.4%
Cost46404
\[\begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{+20}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{e^{\log \pi \cdot 3}}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \left(\cos \left(\frac{angle}{180} \cdot \pi\right) \cdot \sin \left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)\right)\\ \end{array} \]
Alternative 3
Accuracy66.0%
Cost27268
\[\begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ \mathbf{if}\;b \leq -2.3 \cdot 10^{+202}:\\ \;\;\;\;\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(1 + -1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot {\pi}^{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(b - a\right)\right) \cdot \left(\left(b + a\right) \cdot \left(\sin t_0 \cdot \cos t_0\right)\right)\\ \end{array} \]
Alternative 4
Accuracy67.2%
Cost26948
\[\begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;b \leq -6.1 \cdot 10^{+177}:\\ \;\;\;\;\left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\sin t_0 \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \cos t_0\right)\right)\\ \end{array} \]
Alternative 5
Accuracy67.2%
Cost26948
\[\begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;b \leq -5.8 \cdot 10^{+177}:\\ \;\;\;\;\left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(\sin t_0 \cdot \left(b + a\right)\right) \cdot \cos t_0\right)\right)\\ \end{array} \]
Alternative 6
Accuracy67.4%
Cost26948
\[\begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ \mathbf{if}\;b \leq -1.5 \cdot 10^{+163}:\\ \;\;\;\;\left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(b - a\right)\right) \cdot \left(\left(b + a\right) \cdot \left(\sin t_0 \cdot \cos t_0\right)\right)\\ \end{array} \]
Alternative 7
Accuracy65.9%
Cost20292
\[\begin{array}{l} \mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{+297}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right) \cdot 0.011111111111111112\\ \end{array} \]
Alternative 8
Accuracy64.1%
Cost13837
\[\begin{array}{l} t_0 := \pi \cdot \left(b + a\right)\\ \mathbf{if}\;angle \leq -9.5 \cdot 10^{+150}:\\ \;\;\;\;\left(\left(b - a\right) \cdot t_0\right) \cdot \left(angle \cdot 0.011111111111111112\right)\\ \mathbf{elif}\;angle \leq -4.9 \cdot 10^{+39} \lor \neg \left(angle \leq 1.15 \cdot 10^{+166}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \mathsf{fma}\left(b, b, a \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(angle \cdot \left(b - a\right)\right) \cdot t_0\right) \cdot 0.011111111111111112\\ \end{array} \]
Alternative 9
Accuracy58.3%
Cost7433
\[\begin{array}{l} \mathbf{if}\;b \leq -2.9 \cdot 10^{+148} \lor \neg \left(b \leq 1.76 \cdot 10^{+137}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\ \end{array} \]
Alternative 10
Accuracy51.8%
Cost7241
\[\begin{array}{l} \mathbf{if}\;b \leq -54000000000000 \lor \neg \left(b \leq 4.4 \cdot 10^{-64}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right) \cdot \left(-0.011111111111111112\right)\\ \end{array} \]
Alternative 11
Accuracy51.8%
Cost7177
\[\begin{array}{l} \mathbf{if}\;b \leq -80000000000000 \lor \neg \left(b \leq 1.22 \cdot 10^{-63}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot -0.011111111111111112\right)\\ \end{array} \]
Alternative 12
Accuracy51.9%
Cost7177
\[\begin{array}{l} \mathbf{if}\;b \leq -2.8 \cdot 10^{+18} \lor \neg \left(b \leq 1.02 \cdot 10^{-61}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(-0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \end{array} \]
Alternative 13
Accuracy62.6%
Cost7168
\[\left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right) \cdot 0.011111111111111112 \]
Alternative 14
Accuracy34.6%
Cost6912
\[0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right) \]
Alternative 15
Accuracy34.6%
Cost6912
\[0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right) \]
Alternative 16
Accuracy38.2%
Cost6912
\[0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot b\right)\right)\right) \]

Reproduce?

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