?

Average Accuracy: 51.0% → 66.0%
Time: 27.0s
Precision: binary64
Cost: 39748

?

\[\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} t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\ t_1 := \sin t_0\\ \mathbf{if}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{-243}:\\ \;\;\;\;\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(-2 \cdot \left(a \cdot \left(a \cdot t_1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\cos t_0 \cdot \left(b \cdot \left(b \cdot t_1\right)\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
 (let* ((t_0 (* PI (* 0.005555555555555556 angle))) (t_1 (sin t_0)))
   (if (<= (- (pow b 2.0) (pow a 2.0)) 5e-243)
     (* (cos (* 0.005555555555555556 (* PI angle))) (* -2.0 (* a (* a t_1))))
     (* 2.0 (* (cos t_0) (* b (* b t_1)))))))
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 t_0 = ((double) M_PI) * (0.005555555555555556 * angle);
	double t_1 = sin(t_0);
	double tmp;
	if ((pow(b, 2.0) - pow(a, 2.0)) <= 5e-243) {
		tmp = cos((0.005555555555555556 * (((double) M_PI) * angle))) * (-2.0 * (a * (a * t_1)));
	} else {
		tmp = 2.0 * (cos(t_0) * (b * (b * t_1)));
	}
	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 t_0 = Math.PI * (0.005555555555555556 * angle);
	double t_1 = Math.sin(t_0);
	double tmp;
	if ((Math.pow(b, 2.0) - Math.pow(a, 2.0)) <= 5e-243) {
		tmp = Math.cos((0.005555555555555556 * (Math.PI * angle))) * (-2.0 * (a * (a * t_1)));
	} else {
		tmp = 2.0 * (Math.cos(t_0) * (b * (b * t_1)));
	}
	return tmp;
}
def code(a, b, 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)))
def code(a, b, angle):
	t_0 = math.pi * (0.005555555555555556 * angle)
	t_1 = math.sin(t_0)
	tmp = 0
	if (math.pow(b, 2.0) - math.pow(a, 2.0)) <= 5e-243:
		tmp = math.cos((0.005555555555555556 * (math.pi * angle))) * (-2.0 * (a * (a * t_1)))
	else:
		tmp = 2.0 * (math.cos(t_0) * (b * (b * t_1)))
	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)
	t_0 = Float64(pi * Float64(0.005555555555555556 * angle))
	t_1 = sin(t_0)
	tmp = 0.0
	if (Float64((b ^ 2.0) - (a ^ 2.0)) <= 5e-243)
		tmp = Float64(cos(Float64(0.005555555555555556 * Float64(pi * angle))) * Float64(-2.0 * Float64(a * Float64(a * t_1))));
	else
		tmp = Float64(2.0 * Float64(cos(t_0) * Float64(b * Float64(b * t_1))));
	end
	return tmp
end
function tmp = code(a, b, angle)
	tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin((pi * (angle / 180.0)))) * cos((pi * (angle / 180.0)));
end
function tmp_2 = code(a, b, angle)
	t_0 = pi * (0.005555555555555556 * angle);
	t_1 = sin(t_0);
	tmp = 0.0;
	if (((b ^ 2.0) - (a ^ 2.0)) <= 5e-243)
		tmp = cos((0.005555555555555556 * (pi * angle))) * (-2.0 * (a * (a * t_1)));
	else
		tmp = 2.0 * (cos(t_0) * (b * (b * t_1)));
	end
	tmp_2 = 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_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision], 5e-243], N[(N[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-2.0 * N[(a * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Cos[t$95$0], $MachinePrecision] * N[(b * N[(b * t$95$1), $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}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_1 := \sin t_0\\
\mathbf{if}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{-243}:\\
\;\;\;\;\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(-2 \cdot \left(a \cdot \left(a \cdot t_1\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\cos t_0 \cdot \left(b \cdot \left(b \cdot t_1\right)\right)\right)\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 5e-243

    1. Initial program 55.0%

      \[\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. Simplified55.0%

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

      [Start]55.0

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

      *-commutative [=>]55.0

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

      associate-*l* [=>]55.0

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

      unpow2 [=>]55.0

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

      fma-neg [=>]55.0

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

      unpow2 [=>]55.0

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

      distribute-rgt-neg-in [=>]55.0

      \[ \left(\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(-a\right)}\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    3. Taylor expanded in b around 0 54.3%

      \[\leadsto \color{blue}{\left(-2 \cdot \left({a}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    4. Simplified54.3%

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

      [Start]54.3

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

      *-commutative [=>]54.3

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

      associate-*l* [=>]54.3

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

      unpow2 [=>]54.3

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

      *-commutative [=>]54.3

      \[ \left(\left(a \cdot a\right) \cdot \color{blue}{\left(-2 \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    5. Taylor expanded in a around 0 54.3%

      \[\leadsto \color{blue}{\left(-2 \cdot \left({a}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Simplified67.9%

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

      [Start]54.3

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

      unpow2 [=>]54.3

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

      associate-*l* [=>]67.9

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

      associate-*r* [=>]67.9

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

      *-commutative [=>]67.9

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

      \[\leadsto \left(-2 \cdot \left(a \cdot \left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\right) \cdot \color{blue}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)} \]

    if 5e-243 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 45.9%

      \[\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. Simplified45.9%

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

      [Start]45.9

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

      *-commutative [=>]45.9

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

      associate-*l* [=>]45.9

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

      unpow2 [=>]45.9

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

      fma-neg [=>]45.9

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

      unpow2 [=>]45.9

      \[ \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \mathsf{fma}\left(b, b, -\color{blue}{a \cdot a}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    3. Applied egg-rr23.7%

      \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \mathsf{fma}\left(b, b, -a \cdot a\right)\right) \cdot \cos \color{blue}{\left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)}\right) \]
      Proof

      [Start]45.9

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

      add-sqr-sqrt [=>]23.7

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

      pow2 [=>]23.7

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

      div-inv [=>]23.7

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

      metadata-eval [=>]23.7

      \[ \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \mathsf{fma}\left(b, b, -a \cdot a\right)\right) \cdot \cos \left({\left(\sqrt{\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)}\right)}^{2}\right)\right) \]
    4. Taylor expanded in b around inf 45.5%

      \[\leadsto \color{blue}{2 \cdot \left({b}^{2} \cdot \left(\cos \left(angle \cdot \left({\left(\sqrt{0.005555555555555556}\right)}^{2} \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
    5. Simplified63.5%

      \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(b \cdot \left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)} \]
      Proof

      [Start]45.5

      \[ 2 \cdot \left({b}^{2} \cdot \left(\cos \left(angle \cdot \left({\left(\sqrt{0.005555555555555556}\right)}^{2} \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]

      *-commutative [<=]45.5

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

      associate-*r* [=>]45.5

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

      *-commutative [=>]45.5

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

      associate-*r* [=>]45.6

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

      unpow2 [=>]45.6

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

      rem-square-sqrt [=>]45.6

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

      *-commutative [<=]45.6

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

      unpow2 [=>]45.6

      \[ 2 \cdot \left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]

      associate-*r* [=>]45.7

      \[ 2 \cdot \left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \sin \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}\right)\right) \]

      *-commutative [<=]45.7

      \[ 2 \cdot \left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \sin \left(\color{blue}{\left(angle \cdot 0.005555555555555556\right)} \cdot \pi\right)\right)\right) \]

      *-commutative [<=]45.7

      \[ 2 \cdot \left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b \cdot b\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{-243}:\\ \;\;\;\;\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(-2 \cdot \left(a \cdot \left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \left(b \cdot \left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy60.5%
Cost26956
\[\begin{array}{l} t_0 := b \cdot b - a \cdot a\\ t_1 := angle \cdot \left(\pi \cdot 0.005555555555555556\right)\\ \mathbf{if}\;b \leq -1.6 \cdot 10^{+152}:\\ \;\;\;\;b \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;b \leq -1.1 \cdot 10^{-160}:\\ \;\;\;\;t_0 \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\\ \mathbf{elif}\;b \leq 0.00082:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(a \cdot \left(\sin t_1 \cdot \cos t_1\right)\right)\right)\\ \mathbf{elif}\;b \leq 10^{+152}:\\ \;\;\;\;t_0 \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
Alternative 2
Accuracy59.8%
Cost26956
\[\begin{array}{l} t_0 := angle \cdot \left(\pi \cdot 0.005555555555555556\right)\\ t_1 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\ t_2 := \sin t_1\\ \mathbf{if}\;a \leq -1.05 \cdot 10^{+116}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(a \cdot t_2\right)\right)\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-101}:\\ \;\;\;\;\left(b \cdot b - a \cdot a\right) \cdot \sin \left(2 \cdot t_1\right)\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+34}:\\ \;\;\;\;2 \cdot \left(\cos t_1 \cdot \left(b \cdot \left(b \cdot t_2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(a \cdot \left(\sin t_0 \cdot \cos t_0\right)\right)\right)\\ \end{array} \]
Alternative 3
Accuracy59.9%
Cost14096
\[\begin{array}{l} t_0 := \left(b \cdot b - a \cdot a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\ \mathbf{if}\;b \leq -1.4 \cdot 10^{+154}:\\ \;\;\;\;b \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;b \leq -1.6 \cdot 10^{-161}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq 0.00027:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\\ \mathbf{elif}\;b \leq 10^{+152}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
Alternative 4
Accuracy59.9%
Cost14096
\[\begin{array}{l} t_0 := b \cdot b - a \cdot a\\ t_1 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\ \mathbf{if}\;b \leq -1.25 \cdot 10^{+152}:\\ \;\;\;\;b \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;b \leq -1.6 \cdot 10^{-161}:\\ \;\;\;\;t_0 \cdot \sin \left(2 \cdot t_1\right)\\ \mathbf{elif}\;b \leq 0.0004:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(a \cdot \sin t_1\right)\right)\\ \mathbf{elif}\;b \leq 10^{+152}:\\ \;\;\;\;t_0 \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
Alternative 5
Accuracy55.0%
Cost13704
\[\begin{array}{l} \mathbf{if}\;b \leq -8.5 \cdot 10^{-33}:\\ \;\;\;\;b \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;b \leq 0.00032:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(b \cdot angle\right)\right)\\ \end{array} \]
Alternative 6
Accuracy53.5%
Cost7432
\[\begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{+27}:\\ \;\;\;\;b \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;b \leq 1.16 \cdot 10^{+92}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
Alternative 7
Accuracy53.5%
Cost7432
\[\begin{array}{l} \mathbf{if}\;b \leq -2.05 \cdot 10^{+27}:\\ \;\;\;\;b \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{+97}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
Alternative 8
Accuracy53.5%
Cost7432
\[\begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+24}:\\ \;\;\;\;b \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+92}:\\ \;\;\;\;\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
Alternative 9
Accuracy39.9%
Cost7177
\[\begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+148} \lor \neg \left(b \leq 10^{+32}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \]
Alternative 10
Accuracy39.9%
Cost7177
\[\begin{array}{l} \mathbf{if}\;b \leq -2.5 \cdot 10^{+152} \lor \neg \left(b \leq 2 \cdot 10^{+86}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \pi\right)\right)\right)\\ \end{array} \]
Alternative 11
Accuracy48.3%
Cost7177
\[\begin{array}{l} \mathbf{if}\;b \leq -2.6 \cdot 10^{+19} \lor \neg \left(b \leq 4.4 \cdot 10^{-14}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(-0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \end{array} \]
Alternative 12
Accuracy49.0%
Cost7176
\[\begin{array}{l} \mathbf{if}\;b \leq -1.25 \cdot 10^{-32}:\\ \;\;\;\;b \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-19}:\\ \;\;\;\;angle \cdot \left(-0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
Alternative 13
Accuracy48.9%
Cost7176
\[\begin{array}{l} \mathbf{if}\;b \leq -4.2 \cdot 10^{-29}:\\ \;\;\;\;b \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{-18}:\\ \;\;\;\;angle \cdot \left(-0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(b \cdot angle\right)\right)\\ \end{array} \]
Alternative 14
Accuracy49.0%
Cost7176
\[\begin{array}{l} \mathbf{if}\;b \leq -9 \cdot 10^{-34}:\\ \;\;\;\;b \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{-17}:\\ \;\;\;\;\left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right) \cdot -0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(b \cdot angle\right)\right)\\ \end{array} \]
Alternative 15
Accuracy32.3%
Cost6912
\[0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right) \]

Error

Reproduce?

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