?

Average Error: 31.2 → 21.2
Time: 20.0s
Precision: binary64
Cost: 53193

?

\[\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 := {b}^{2} - {a}^{2}\\ \mathbf{if}\;t_0 \leq -5 \cdot 10^{+248} \lor \neg \left(t_0 \leq 10^{+307}\right):\\ \;\;\;\;\left(-2 \cdot \left(b + a\right)\right) \cdot \left(\left(a - b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\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 (- (pow b 2.0) (pow a 2.0))))
   (if (or (<= t_0 -5e+248) (not (<= t_0 1e+307)))
     (*
      (* -2.0 (+ b a))
      (* (- a b) (sin (* 0.005555555555555556 (* angle PI)))))
     (*
      (* 2.0 (- (* b b) (* a a)))
      (*
       (sin (* PI (* angle 0.005555555555555556)))
       (cos (* PI (/ angle 180.0))))))))
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 = pow(b, 2.0) - pow(a, 2.0);
	double tmp;
	if ((t_0 <= -5e+248) || !(t_0 <= 1e+307)) {
		tmp = (-2.0 * (b + a)) * ((a - b) * sin((0.005555555555555556 * (angle * ((double) M_PI)))));
	} else {
		tmp = (2.0 * ((b * b) - (a * a))) * (sin((((double) M_PI) * (angle * 0.005555555555555556))) * cos((((double) M_PI) * (angle / 180.0))));
	}
	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.pow(b, 2.0) - Math.pow(a, 2.0);
	double tmp;
	if ((t_0 <= -5e+248) || !(t_0 <= 1e+307)) {
		tmp = (-2.0 * (b + a)) * ((a - b) * Math.sin((0.005555555555555556 * (angle * Math.PI))));
	} else {
		tmp = (2.0 * ((b * b) - (a * a))) * (Math.sin((Math.PI * (angle * 0.005555555555555556))) * Math.cos((Math.PI * (angle / 180.0))));
	}
	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.pow(b, 2.0) - math.pow(a, 2.0)
	tmp = 0
	if (t_0 <= -5e+248) or not (t_0 <= 1e+307):
		tmp = (-2.0 * (b + a)) * ((a - b) * math.sin((0.005555555555555556 * (angle * math.pi))))
	else:
		tmp = (2.0 * ((b * b) - (a * a))) * (math.sin((math.pi * (angle * 0.005555555555555556))) * math.cos((math.pi * (angle / 180.0))))
	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((b ^ 2.0) - (a ^ 2.0))
	tmp = 0.0
	if ((t_0 <= -5e+248) || !(t_0 <= 1e+307))
		tmp = Float64(Float64(-2.0 * Float64(b + a)) * Float64(Float64(a - b) * sin(Float64(0.005555555555555556 * Float64(angle * pi)))));
	else
		tmp = Float64(Float64(2.0 * Float64(Float64(b * b) - Float64(a * a))) * Float64(sin(Float64(pi * Float64(angle * 0.005555555555555556))) * cos(Float64(pi * Float64(angle / 180.0)))));
	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 = (b ^ 2.0) - (a ^ 2.0);
	tmp = 0.0;
	if ((t_0 <= -5e+248) || ~((t_0 <= 1e+307)))
		tmp = (-2.0 * (b + a)) * ((a - b) * sin((0.005555555555555556 * (angle * pi))));
	else
		tmp = (2.0 * ((b * b) - (a * a))) * (sin((pi * (angle * 0.005555555555555556))) * cos((pi * (angle / 180.0))));
	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[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -5e+248], N[Not[LessEqual[t$95$0, 1e+307]], $MachinePrecision]], N[(N[(-2.0 * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(N[(a - b), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $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 := {b}^{2} - {a}^{2}\\
\mathbf{if}\;t_0 \leq -5 \cdot 10^{+248} \lor \neg \left(t_0 \leq 10^{+307}\right):\\
\;\;\;\;\left(-2 \cdot \left(b + a\right)\right) \cdot \left(\left(a - b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\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)) < -4.9999999999999996e248 or 9.99999999999999986e306 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 55.8

      \[\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.8

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

      [Start]55.8

      \[ \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.8

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

      sub-neg [=>]55.8

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

      +-commutative [=>]55.8

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

      neg-sub0 [=>]55.8

      \[ \left(\left(\left(\color{blue}{\left(0 - {a}^{2}\right)} + {b}^{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.8

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

      sub0-neg [=>]55.8

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

      distribute-lft-neg-out [=>]55.8

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

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

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

      unpow2 [=>]55.8

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

      unpow2 [=>]55.8

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

      metadata-eval [=>]55.8

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

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

      \[\leadsto \color{blue}{\left(\left(-2 \cdot \left(b + a\right)\right) \cdot \left(\left(a - b\right) \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]55.8

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

      unpow2 [=>]55.8

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

      unpow2 [=>]55.8

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

      difference-of-squares [=>]55.8

      \[ \left(-2 \cdot \left(\color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\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-*r* [=>]55.8

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

      *-commutative [<=]55.8

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

      *-commutative [<=]55.8

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

      associate-*l* [=>]8.7

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

      associate-*l* [<=]8.7

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

      +-commutative [=>]8.7

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

      *-commutative [=>]8.7

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

      *-commutative [=>]8.7

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

      associate-*r* [<=]8.7

      \[ \left(\left(-2 \cdot \left(b + a\right)\right) \cdot \left(\left(a - b\right) \cdot \sin \color{blue}{\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 angle around 0 8.9

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

    if -4.9999999999999996e248 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 9.99999999999999986e306

    1. Initial program 24.5

      \[\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. Simplified24.5

      \[\leadsto \color{blue}{\left(2 \cdot \left(b \cdot b - 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)} \]
      Proof

      [Start]24.5

      \[ \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* [=>]24.5

      \[ \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 [=>]24.5

      \[ \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 [=>]24.5

      \[ \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) \]
    3. Taylor expanded in angle around inf 24.6

      \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\color{blue}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    4. Simplified24.5

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

      [Start]24.6

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

      associate-*r* [=>]24.5

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

      *-commutative [<=]24.5

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

      *-commutative [<=]24.5

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

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

Alternatives

Alternative 1
Error21.2
Cost53193
\[\begin{array}{l} t_0 := {b}^{2} - {a}^{2}\\ \mathbf{if}\;t_0 \leq -5 \cdot 10^{+248} \lor \neg \left(t_0 \leq 10^{+307}\right):\\ \;\;\;\;\left(-2 \cdot \left(b + a\right)\right) \cdot \left(\left(a - b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\\ \end{array} \]
Alternative 2
Error21.1
Cost40073
\[\begin{array}{l} t_0 := {b}^{2} - {a}^{2}\\ \mathbf{if}\;t_0 \leq -5 \cdot 10^{+265} \lor \neg \left(t_0 \leq 10^{+307}\right):\\ \;\;\;\;\left(-2 \cdot \left(b + a\right)\right) \cdot \left(\left(a - b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot b - a \cdot a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \end{array} \]
Alternative 3
Error21.1
Cost26816
\[\left(\left(-2 \cdot \left(b + a\right)\right) \cdot \left(\left(a - b\right) \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
Alternative 4
Error21.1
Cost26816
\[\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(-2 \cdot \left(b + a\right)\right) \cdot \left(\left(a - b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
Alternative 5
Error21.3
Cost14089
\[\begin{array}{l} t_0 := \left(b + a\right) \cdot angle\\ \mathbf{if}\;\frac{angle}{180} \leq -4 \cdot 10^{-9} \lor \neg \left(\frac{angle}{180} \leq 2 \cdot 10^{-58}\right):\\ \;\;\;\;\left(b \cdot b - a \cdot a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot t_0 - a \cdot t_0\right)\right)\\ \end{array} \]
Alternative 6
Error22.9
Cost13704
\[\begin{array}{l} t_0 := \left(b + a\right) \cdot angle\\ \mathbf{if}\;angle \leq -2.7 \cdot 10^{+54}:\\ \;\;\;\;a \cdot \left(a \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{elif}\;angle \leq 6.5 \cdot 10^{+37}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot t_0 - a \cdot t_0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-2 \cdot \left(a \cdot a\right)\right)\\ \end{array} \]
Alternative 7
Error22.1
Cost13696
\[\left(-2 \cdot \left(b + a\right)\right) \cdot \left(\left(a - b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
Alternative 8
Error24.4
Cost13444
\[\begin{array}{l} t_0 := \left(b + a\right) \cdot angle\\ \mathbf{if}\;angle \leq -4.4 \cdot 10^{+54}:\\ \;\;\;\;a \cdot \left(a \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot t_0 - a \cdot t_0\right)\right)\\ \end{array} \]
Alternative 9
Error25.6
Cost7817
\[\begin{array}{l} t_0 := \left(b + a\right) \cdot angle\\ \mathbf{if}\;a \leq -2.8 \cdot 10^{-127} \lor \neg \left(a \leq 2.5 \cdot 10^{-65}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot t_0 - a \cdot t_0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi\right)\right)\\ \end{array} \]
Alternative 10
Error29.2
Cost7432
\[\begin{array}{l} \mathbf{if}\;b \leq -1.05 \cdot 10^{+154}:\\ \;\;\;\;b \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi\right)\right)\\ \mathbf{elif}\;b \leq 1.45 \cdot 10^{+146}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
Alternative 11
Error29.2
Cost7432
\[\begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+154}:\\ \;\;\;\;b \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi\right)\right)\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{+147}:\\ \;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
Alternative 12
Error29.2
Cost7432
\[\begin{array}{l} \mathbf{if}\;b \leq -6 \cdot 10^{+153}:\\ \;\;\;\;b \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi\right)\right)\\ \mathbf{elif}\;b \leq 1.02 \cdot 10^{+148}:\\ \;\;\;\;angle \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
Alternative 13
Error37.5
Cost7177
\[\begin{array}{l} \mathbf{if}\;a \leq -2.55 \cdot 10^{-42} \lor \neg \left(a \leq 3.3 \cdot 10^{-65}\right):\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \left(b \cdot \pi\right)\right)\right)\\ \end{array} \]
Alternative 14
Error37.5
Cost7177
\[\begin{array}{l} \mathbf{if}\;a \leq -1.55 \cdot 10^{-43} \lor \neg \left(a \leq 3.7 \cdot 10^{-65}\right):\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \]
Alternative 15
Error37.5
Cost7177
\[\begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{-42} \lor \neg \left(a \leq 3 \cdot 10^{-65}\right):\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \]
Alternative 16
Error37.4
Cost7177
\[\begin{array}{l} \mathbf{if}\;a \leq -2.76 \cdot 10^{-45} \lor \neg \left(a \leq 3.4 \cdot 10^{-65}\right):\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \pi\right)\right)\right)\\ \end{array} \]
Alternative 17
Error37.4
Cost7177
\[\begin{array}{l} \mathbf{if}\;a \leq -1.95 \cdot 10^{-42} \lor \neg \left(a \leq 3.8 \cdot 10^{-65}\right):\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
Alternative 18
Error32.5
Cost7177
\[\begin{array}{l} \mathbf{if}\;b \leq -3.7 \cdot 10^{-35} \lor \neg \left(b \leq 2.9 \cdot 10^{-62}\right):\\ \;\;\;\;b \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(\left(a \cdot \left(a \cdot \pi\right)\right) \cdot -0.011111111111111112\right)\\ \end{array} \]
Alternative 19
Error37.4
Cost7176
\[\begin{array}{l} \mathbf{if}\;a \leq -2.45 \cdot 10^{-42}:\\ \;\;\;\;angle \cdot \left(\left(a \cdot \left(a \cdot \pi\right)\right) \cdot -0.011111111111111112\right)\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-65}:\\ \;\;\;\;angle \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \end{array} \]
Alternative 20
Error32.5
Cost7176
\[\begin{array}{l} \mathbf{if}\;b \leq -8.5 \cdot 10^{-36}:\\ \;\;\;\;b \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi\right)\right)\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{-61}:\\ \;\;\;\;angle \cdot \left(\left(a \cdot \left(a \cdot \pi\right)\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
Alternative 21
Error43.1
Cost6912
\[-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right) \]

Error

Reproduce?

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