?

Average Error: 31.8 → 31.9
Time: 25.6s
Precision: binary64
Cost: 46212

?

\[\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 := angle \cdot \left(\pi \cdot 0.005555555555555556\right)\\ \mathbf{if}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{-257}:\\ \;\;\;\;2 \cdot \left(\left({a}^{2} \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right) \cdot \cos t_0\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\left(1 + -0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left({b}^{2} \cdot \left(-2 \cdot \sin t_0\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 (* angle (* PI 0.005555555555555556))))
   (if (<= (- (pow b 2.0) (pow a 2.0)) 5e-257)
     (*
      2.0
      (*
       (* (pow a 2.0) (sin (* angle (* PI -0.005555555555555556))))
       (cos t_0)))
     (*
      (cos (* (+ 1.0 (* -0.005555555555555556 angle)) PI))
      (* (pow b 2.0) (* -2.0 (sin t_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 = angle * (((double) M_PI) * 0.005555555555555556);
	double tmp;
	if ((pow(b, 2.0) - pow(a, 2.0)) <= 5e-257) {
		tmp = 2.0 * ((pow(a, 2.0) * sin((angle * (((double) M_PI) * -0.005555555555555556)))) * cos(t_0));
	} else {
		tmp = cos(((1.0 + (-0.005555555555555556 * angle)) * ((double) M_PI))) * (pow(b, 2.0) * (-2.0 * sin(t_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 = angle * (Math.PI * 0.005555555555555556);
	double tmp;
	if ((Math.pow(b, 2.0) - Math.pow(a, 2.0)) <= 5e-257) {
		tmp = 2.0 * ((Math.pow(a, 2.0) * Math.sin((angle * (Math.PI * -0.005555555555555556)))) * Math.cos(t_0));
	} else {
		tmp = Math.cos(((1.0 + (-0.005555555555555556 * angle)) * Math.PI)) * (Math.pow(b, 2.0) * (-2.0 * Math.sin(t_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 = angle * (math.pi * 0.005555555555555556)
	tmp = 0
	if (math.pow(b, 2.0) - math.pow(a, 2.0)) <= 5e-257:
		tmp = 2.0 * ((math.pow(a, 2.0) * math.sin((angle * (math.pi * -0.005555555555555556)))) * math.cos(t_0))
	else:
		tmp = math.cos(((1.0 + (-0.005555555555555556 * angle)) * math.pi)) * (math.pow(b, 2.0) * (-2.0 * math.sin(t_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(angle * Float64(pi * 0.005555555555555556))
	tmp = 0.0
	if (Float64((b ^ 2.0) - (a ^ 2.0)) <= 5e-257)
		tmp = Float64(2.0 * Float64(Float64((a ^ 2.0) * sin(Float64(angle * Float64(pi * -0.005555555555555556)))) * cos(t_0)));
	else
		tmp = Float64(cos(Float64(Float64(1.0 + Float64(-0.005555555555555556 * angle)) * pi)) * Float64((b ^ 2.0) * Float64(-2.0 * sin(t_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 = angle * (pi * 0.005555555555555556);
	tmp = 0.0;
	if (((b ^ 2.0) - (a ^ 2.0)) <= 5e-257)
		tmp = 2.0 * (((a ^ 2.0) * sin((angle * (pi * -0.005555555555555556)))) * cos(t_0));
	else
		tmp = cos(((1.0 + (-0.005555555555555556 * angle)) * pi)) * ((b ^ 2.0) * (-2.0 * sin(t_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[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision], 5e-257], N[(2.0 * N[(N[(N[Power[a, 2.0], $MachinePrecision] * N[Sin[N[(angle * N[(Pi * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(N[(1.0 + N[(-0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(N[Power[b, 2.0], $MachinePrecision] * N[(-2.0 * N[Sin[t$95$0], $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 := angle \cdot \left(\pi \cdot 0.005555555555555556\right)\\
\mathbf{if}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{-257}:\\
\;\;\;\;2 \cdot \left(\left({a}^{2} \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right) \cdot \cos t_0\right)\\

\mathbf{else}:\\
\;\;\;\;\cos \left(\left(1 + -0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left({b}^{2} \cdot \left(-2 \cdot \sin t_0\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.99999999999999989e-257

    1. Initial program 28.6

      \[\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. Simplified28.6

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

      [Start]28.6

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

      rational.json-simplify-2 [=>]28.6

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

      rational.json-simplify-2 [=>]28.6

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

      rational.json-simplify-43 [=>]28.6

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

      rational.json-simplify-43 [=>]28.6

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

      \[\leadsto 2 \cdot \left(\color{blue}{\left(-1 \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)\right) \]
    4. Simplified29.0

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

      [Start]29.1

      \[ 2 \cdot \left(\left(-1 \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)\right) \]

      rational.json-simplify-43 [=>]29.1

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

      rational.json-simplify-9 [=>]29.1

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

      trig.json-simplify-19 [=>]29.1

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

      rational.json-simplify-10 [=>]29.1

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

      rational.json-simplify-49 [=>]29.1

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

      metadata-eval [=>]29.1

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

      rational.json-simplify-2 [<=]29.1

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

      rational.json-simplify-2 [=>]29.1

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

      rational.json-simplify-43 [<=]29.0

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

      rational.json-simplify-2 [=>]29.0

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

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

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

      [Start]29.0

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

      rational.json-simplify-43 [=>]28.9

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

    if 4.99999999999999989e-257 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 35.6

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

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

      [Start]35.6

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

      rational.json-simplify-2 [=>]35.6

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

      rational.json-simplify-43 [=>]35.6

      \[ \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)} \]
    3. Applied egg-rr35.4

      \[\leadsto \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(-\cos \left(\pi \cdot \left(1 + angle \cdot -0.005555555555555556\right)\right)\right)}\right) \]
    4. Taylor expanded in b around inf 35.7

      \[\leadsto \color{blue}{-2 \cdot \left({b}^{2} \cdot \left(\cos \left(\left(1 + -0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
    5. Simplified35.6

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

      [Start]35.7

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

      rational.json-simplify-43 [=>]35.7

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

      rational.json-simplify-2 [<=]35.7

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

      rational.json-simplify-43 [=>]35.7

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

      rational.json-simplify-2 [=>]35.7

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

      rational.json-simplify-43 [<=]35.6

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

      rational.json-simplify-2 [<=]35.6

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

      rational.json-simplify-43 [=>]35.6

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

      rational.json-simplify-2 [=>]35.6

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

      rational.json-simplify-43 [<=]35.7

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

      rational.json-simplify-2 [<=]35.7

      \[ \cos \left(\left(1 + -0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left({b}^{2} \cdot \left(-2 \cdot \sin \left(0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \pi\right)}\right)\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification31.9

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

Alternatives

Alternative 1
Error32.0
Cost46212
\[\begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{-257}:\\ \;\;\;\;2 \cdot \left(\left({a}^{2} \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left({b}^{2} \cdot \left(\cos \left(\left(1 + -0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \end{array} \]
Alternative 2
Error32.0
Cost46084
\[\begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{-246}:\\ \;\;\;\;2 \cdot \left(\sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right) \cdot \left({a}^{2} \cdot \cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sin t_0 \cdot \left({b}^{2} \cdot \cos t_0\right)\right)\\ \end{array} \]
Alternative 3
Error32.0
Cost46084
\[\begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{-246}:\\ \;\;\;\;2 \cdot \left(\left({a}^{2} \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sin t_0 \cdot \left({b}^{2} \cdot \cos t_0\right)\right)\\ \end{array} \]
Alternative 4
Error32.1
Cost46084
\[\begin{array}{l} t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\ \mathbf{if}\;{b}^{2} - {a}^{2} \leq 4 \cdot 10^{-230}:\\ \;\;\;\;2 \cdot \left(\left({a}^{2} \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left({b}^{2} \cdot \sin t_0\right) \cdot \cos t_0\right)\\ \end{array} \]
Alternative 5
Error31.6
Cost39616
\[-2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\cos \left(\pi \cdot \left(1 - angle \cdot 0.005555555555555556\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right) \]
Alternative 6
Error31.7
Cost39488
\[\begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ 2 \cdot \left(\cos t_0 \cdot \left(\sin t_0 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \end{array} \]
Alternative 7
Error32.8
Cost33092
\[\begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{-257}:\\ \;\;\;\;\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-2 \cdot {a}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left({b}^{2} \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot 1\right)\\ \end{array} \]
Alternative 8
Error32.6
Cost26496
\[2 \cdot \left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot 1\right) \]
Alternative 9
Error32.6
Cost26496
\[2 \cdot \left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot 1\right) \]
Alternative 10
Error37.1
Cost20040
\[\begin{array}{l} t_0 := \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-2 \cdot {a}^{2}\right)\\ \mathbf{if}\;a \leq -1.65 \cdot 10^{-60}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-26}:\\ \;\;\;\;angle \cdot \left({b}^{2} \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 11
Error37.2
Cost20040
\[\begin{array}{l} t_0 := -2 \cdot {a}^{2}\\ \mathbf{if}\;a \leq -7 \cdot 10^{-70}:\\ \;\;\;\;\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot t_0\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{-26}:\\ \;\;\;\;angle \cdot \left({b}^{2} \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot t_0\\ \end{array} \]
Alternative 12
Error34.6
Cost19840
\[0.011111111111111112 \cdot \left(angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \pi\right)\right) \]
Alternative 13
Error34.6
Cost19840
\[0.011111111111111112 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(angle \cdot \pi\right)\right) \]
Alternative 14
Error34.6
Cost19840
\[angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \]
Alternative 15
Error34.5
Cost19840
\[angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \]
Alternative 16
Error37.8
Cost13512
\[\begin{array}{l} \mathbf{if}\;a \leq -8.3 \cdot 10^{-60}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {a}^{2}\right)\right)\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-37}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left({a}^{2} \cdot \pi\right)\right)\\ \end{array} \]
Alternative 17
Error37.8
Cost13512
\[\begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{-61}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {a}^{2}\right)\right)\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-32}:\\ \;\;\;\;0.011111111111111112 \cdot \left({b}^{2} \cdot \left(angle \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left({a}^{2} \cdot \pi\right)\right)\\ \end{array} \]
Alternative 18
Error37.8
Cost13512
\[\begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{-60}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {a}^{2}\right)\right)\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-32}:\\ \;\;\;\;angle \cdot \left(\pi \cdot \left({b}^{2} \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left({a}^{2} \cdot \pi\right)\right)\\ \end{array} \]
Alternative 19
Error37.8
Cost13512
\[\begin{array}{l} \mathbf{if}\;a \leq -1.65 \cdot 10^{-59}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {a}^{2}\right)\right)\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{-36}:\\ \;\;\;\;angle \cdot \left(\left(\pi \cdot {b}^{2}\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left({a}^{2} \cdot \pi\right)\right)\\ \end{array} \]
Alternative 20
Error37.8
Cost13512
\[\begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{-59}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {a}^{2}\right)\right)\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-32}:\\ \;\;\;\;angle \cdot \left({b}^{2} \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left({a}^{2} \cdot \pi\right)\right)\\ \end{array} \]
Alternative 21
Error37.8
Cost13512
\[\begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{-59}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {a}^{2}\right)\right)\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-31}:\\ \;\;\;\;angle \cdot \left({b}^{2} \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \left(angle \cdot \left(-0.011111111111111112 \cdot {a}^{2}\right)\right)\\ \end{array} \]
Alternative 22
Error37.8
Cost13512
\[\begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{-59}:\\ \;\;\;\;\left(\pi \cdot -0.011111111111111112\right) \cdot \left(angle \cdot {a}^{2}\right)\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{-27}:\\ \;\;\;\;angle \cdot \left({b}^{2} \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \left(angle \cdot \left(-0.011111111111111112 \cdot {a}^{2}\right)\right)\\ \end{array} \]
Alternative 23
Error37.9
Cost13512
\[\begin{array}{l} \mathbf{if}\;a \leq -2.45 \cdot 10^{-59}:\\ \;\;\;\;\left(\pi \cdot -0.011111111111111112\right) \cdot \left(angle \cdot {a}^{2}\right)\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-28}:\\ \;\;\;\;angle \cdot \left({b}^{2} \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot {a}^{2}\right) \cdot \left(angle \cdot -0.011111111111111112\right)\\ \end{array} \]
Alternative 24
Error37.8
Cost13512
\[\begin{array}{l} \mathbf{if}\;a \leq -1.65 \cdot 10^{-59}:\\ \;\;\;\;\left(\pi \cdot -0.011111111111111112\right) \cdot \left(angle \cdot {a}^{2}\right)\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{-36}:\\ \;\;\;\;angle \cdot \left({b}^{2} \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left({a}^{2} \cdot \left(angle \cdot \pi\right)\right) \cdot -0.011111111111111112\\ \end{array} \]
Alternative 25
Error43.7
Cost13248
\[-0.011111111111111112 \cdot \left(angle \cdot \left({a}^{2} \cdot \pi\right)\right) \]
Alternative 26
Error43.6
Cost13248
\[-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot {a}^{2}\right)\right) \]

Error

Reproduce?

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