?

Average Error: 30.3 → 19.0
Time: 1.3min
Precision: binary64
Cost: 60872

?

\[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
\[\begin{array}{l} t_0 := {\left(A - C\right)}^{2}\\ t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{t_0 + {B}^{2}}\right)\\ \mathbf{if}\;t_1 \leq -0.5:\\ \;\;\;\;\tan^{-1} \left(\left(\frac{C - A}{B} + -2\right) - -1\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{360}{\pi}}{2}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{\left(t_0 \cdot \frac{0.5}{B} + \left(B + C\right)\right) - A}{B}\right) \cdot \frac{180}{\pi}\\ \end{array} \]
(FPCore (A B C)
 :precision binary64
 (*
  180.0
  (/
   (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
   PI)))
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (pow (- A C) 2.0))
        (t_1 (* (/ 1.0 B) (- (- C A) (sqrt (+ t_0 (pow B 2.0)))))))
   (if (<= t_1 -0.5)
     (* (atan (- (+ (/ (- C A) B) -2.0) -1.0)) (/ 180.0 PI))
     (if (<= t_1 0.0)
       (/ (* (atan (* B (/ 0.5 A))) (/ 360.0 PI)) 2.0)
       (* (atan (/ (- (+ (* t_0 (/ 0.5 B)) (+ B C)) A) B)) (/ 180.0 PI))))))
double code(double A, double B, double C) {
	return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
double code(double A, double B, double C) {
	double t_0 = pow((A - C), 2.0);
	double t_1 = (1.0 / B) * ((C - A) - sqrt((t_0 + pow(B, 2.0))));
	double tmp;
	if (t_1 <= -0.5) {
		tmp = atan(((((C - A) / B) + -2.0) - -1.0)) * (180.0 / ((double) M_PI));
	} else if (t_1 <= 0.0) {
		tmp = (atan((B * (0.5 / A))) * (360.0 / ((double) M_PI))) / 2.0;
	} else {
		tmp = atan(((((t_0 * (0.5 / B)) + (B + C)) - A) / B)) * (180.0 / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
public static double code(double A, double B, double C) {
	double t_0 = Math.pow((A - C), 2.0);
	double t_1 = (1.0 / B) * ((C - A) - Math.sqrt((t_0 + Math.pow(B, 2.0))));
	double tmp;
	if (t_1 <= -0.5) {
		tmp = Math.atan(((((C - A) / B) + -2.0) - -1.0)) * (180.0 / Math.PI);
	} else if (t_1 <= 0.0) {
		tmp = (Math.atan((B * (0.5 / A))) * (360.0 / Math.PI)) / 2.0;
	} else {
		tmp = Math.atan(((((t_0 * (0.5 / B)) + (B + C)) - A) / B)) * (180.0 / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
def code(A, B, C):
	t_0 = math.pow((A - C), 2.0)
	t_1 = (1.0 / B) * ((C - A) - math.sqrt((t_0 + math.pow(B, 2.0))))
	tmp = 0
	if t_1 <= -0.5:
		tmp = math.atan(((((C - A) / B) + -2.0) - -1.0)) * (180.0 / math.pi)
	elif t_1 <= 0.0:
		tmp = (math.atan((B * (0.5 / A))) * (360.0 / math.pi)) / 2.0
	else:
		tmp = math.atan(((((t_0 * (0.5 / B)) + (B + C)) - A) / B)) * (180.0 / math.pi)
	return tmp
function code(A, B, C)
	return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi))
end
function code(A, B, C)
	t_0 = Float64(A - C) ^ 2.0
	t_1 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64(t_0 + (B ^ 2.0)))))
	tmp = 0.0
	if (t_1 <= -0.5)
		tmp = Float64(atan(Float64(Float64(Float64(Float64(C - A) / B) + -2.0) - -1.0)) * Float64(180.0 / pi));
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(atan(Float64(B * Float64(0.5 / A))) * Float64(360.0 / pi)) / 2.0);
	else
		tmp = Float64(atan(Float64(Float64(Float64(Float64(t_0 * Float64(0.5 / B)) + Float64(B + C)) - A) / B)) * Float64(180.0 / pi));
	end
	return tmp
end
function tmp = code(A, B, C)
	tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi);
end
function tmp_2 = code(A, B, C)
	t_0 = (A - C) ^ 2.0;
	t_1 = (1.0 / B) * ((C - A) - sqrt((t_0 + (B ^ 2.0))));
	tmp = 0.0;
	if (t_1 <= -0.5)
		tmp = atan(((((C - A) / B) + -2.0) - -1.0)) * (180.0 / pi);
	elseif (t_1 <= 0.0)
		tmp = (atan((B * (0.5 / A))) * (360.0 / pi)) / 2.0;
	else
		tmp = atan(((((t_0 * (0.5 / B)) + (B + C)) - A) / B)) * (180.0 / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
code[A_, B_, C_] := Block[{t$95$0 = N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(t$95$0 + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -0.5], N[(N[ArcTan[N[(N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -2.0), $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(360.0 / Pi), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[ArcTan[N[(N[(N[(N[(t$95$0 * N[(0.5 / B), $MachinePrecision]), $MachinePrecision] + N[(B + C), $MachinePrecision]), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]]]
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\begin{array}{l}
t_0 := {\left(A - C\right)}^{2}\\
t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{t_0 + {B}^{2}}\right)\\
\mathbf{if}\;t_1 \leq -0.5:\\
\;\;\;\;\tan^{-1} \left(\left(\frac{C - A}{B} + -2\right) - -1\right) \cdot \frac{180}{\pi}\\

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{360}{\pi}}{2}\\

\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{\left(t_0 \cdot \frac{0.5}{B} + \left(B + C\right)\right) - A}{B}\right) \cdot \frac{180}{\pi}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 3 regimes
  2. if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.5

    1. Initial program 26.5

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Simplified26.5

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}{B}\right) \cdot \frac{180}{\pi}} \]
      Proof

      [Start]26.5

      \[ 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]

      rational_best-simplify-55 [=>]26.5

      \[ \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\pi}} \]

      rational_best-simplify-1 [=>]26.5

      \[ \tan^{-1} \color{blue}{\left(\left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \cdot \frac{1}{B}\right)} \cdot \frac{180}{\pi} \]

      rational_best-simplify-55 [=>]26.5

      \[ \tan^{-1} \color{blue}{\left(1 \cdot \frac{\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}{B}\right)} \cdot \frac{180}{\pi} \]

      rational_best-simplify-1 [=>]26.5

      \[ \tan^{-1} \color{blue}{\left(\frac{\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}{B} \cdot 1\right)} \cdot \frac{180}{\pi} \]

      rational_best-simplify-7 [=>]26.5

      \[ \tan^{-1} \color{blue}{\left(\frac{\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}{B}\right)} \cdot \frac{180}{\pi} \]
    3. Taylor expanded in C around 0 26.7

      \[\leadsto \tan^{-1} \left(\frac{\left(C - A\right) - \color{blue}{\sqrt{{B}^{2} + {A}^{2}}}}{B}\right) \cdot \frac{180}{\pi} \]
    4. Applied egg-rr26.7

      \[\leadsto \tan^{-1} \color{blue}{\left(\left(-1 - \frac{\sqrt{{B}^{2} + {A}^{2}} + \left(A - C\right)}{B}\right) - -1\right)} \cdot \frac{180}{\pi} \]
    5. Taylor expanded in B around inf 16.4

      \[\leadsto \tan^{-1} \left(\color{blue}{\left(\frac{C}{B} - \left(2 + \frac{A}{B}\right)\right)} - -1\right) \cdot \frac{180}{\pi} \]
    6. Simplified15.6

      \[\leadsto \tan^{-1} \left(\color{blue}{\left(\frac{C - A}{B} + -2\right)} - -1\right) \cdot \frac{180}{\pi} \]
      Proof

      [Start]16.4

      \[ \tan^{-1} \left(\left(\frac{C}{B} - \left(2 + \frac{A}{B}\right)\right) - -1\right) \cdot \frac{180}{\pi} \]

      rational_best-simplify-3 [=>]16.4

      \[ \tan^{-1} \left(\left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 2\right)}\right) - -1\right) \cdot \frac{180}{\pi} \]

      rational_best-simplify-57 [=>]16.4

      \[ \tan^{-1} \left(\color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) + \left(-2\right)\right)} - -1\right) \cdot \frac{180}{\pi} \]

      rational_best-simplify-67 [<=]15.6

      \[ \tan^{-1} \left(\left(\color{blue}{\frac{C - A}{B}} + \left(-2\right)\right) - -1\right) \cdot \frac{180}{\pi} \]

      metadata-eval [=>]15.6

      \[ \tan^{-1} \left(\left(\frac{C - A}{B} + \color{blue}{-2}\right) - -1\right) \cdot \frac{180}{\pi} \]

    if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0

    1. Initial program 50.5

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Taylor expanded in A around -inf 31.3

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(0.5 \cdot \frac{B}{A}\right)}}{\pi} \]
    3. Simplified31.3

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(B \cdot \frac{0.5}{A}\right)}}{\pi} \]
      Proof

      [Start]31.3

      \[ 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi} \]

      rational_best-simplify-55 [=>]31.3

      \[ 180 \cdot \frac{\tan^{-1} \color{blue}{\left(B \cdot \frac{0.5}{A}\right)}}{\pi} \]
    4. Applied egg-rr31.2

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{360}{\pi}}{2}} \]

    if -0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))

    1. Initial program 27.3

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Simplified27.3

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}{B}\right) \cdot \frac{180}{\pi}} \]
      Proof

      [Start]27.3

      \[ 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]

      rational_best-simplify-55 [=>]27.3

      \[ \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\pi}} \]

      rational_best-simplify-1 [=>]27.3

      \[ \tan^{-1} \color{blue}{\left(\left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \cdot \frac{1}{B}\right)} \cdot \frac{180}{\pi} \]

      rational_best-simplify-55 [=>]27.3

      \[ \tan^{-1} \color{blue}{\left(1 \cdot \frac{\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}{B}\right)} \cdot \frac{180}{\pi} \]

      rational_best-simplify-1 [=>]27.3

      \[ \tan^{-1} \color{blue}{\left(\frac{\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}{B} \cdot 1\right)} \cdot \frac{180}{\pi} \]

      rational_best-simplify-7 [=>]27.3

      \[ \tan^{-1} \color{blue}{\left(\frac{\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}{B}\right)} \cdot \frac{180}{\pi} \]

      rational_best-simplify-52 [=>]27.3

      \[ \tan^{-1} \left(\frac{\color{blue}{C - \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}} + A\right)}}{B}\right) \cdot \frac{180}{\pi} \]

      rational_best-simplify-3 [=>]27.3

      \[ \tan^{-1} \left(\frac{C - \color{blue}{\left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{B}\right) \cdot \frac{180}{\pi} \]
    3. Taylor expanded in B around -inf 18.4

      \[\leadsto \tan^{-1} \left(\frac{\color{blue}{\left(0.5 \cdot \frac{{\left(A - C\right)}^{2}}{B} + \left(C + B\right)\right) - A}}{B}\right) \cdot \frac{180}{\pi} \]
    4. Simplified18.4

      \[\leadsto \tan^{-1} \left(\frac{\color{blue}{\left({\left(A - C\right)}^{2} \cdot \frac{0.5}{B} + \left(B + C\right)\right) - A}}{B}\right) \cdot \frac{180}{\pi} \]
      Proof

      [Start]18.4

      \[ \tan^{-1} \left(\frac{\left(0.5 \cdot \frac{{\left(A - C\right)}^{2}}{B} + \left(C + B\right)\right) - A}{B}\right) \cdot \frac{180}{\pi} \]

      rational_best-simplify-55 [=>]18.4

      \[ \tan^{-1} \left(\frac{\left(\color{blue}{{\left(A - C\right)}^{2} \cdot \frac{0.5}{B}} + \left(C + B\right)\right) - A}{B}\right) \cdot \frac{180}{\pi} \]

      rational_best-simplify-3 [=>]18.4

      \[ \tan^{-1} \left(\frac{\left({\left(A - C\right)}^{2} \cdot \frac{0.5}{B} + \color{blue}{\left(B + C\right)}\right) - A}{B}\right) \cdot \frac{180}{\pi} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification19.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \leq -0.5:\\ \;\;\;\;\tan^{-1} \left(\left(\frac{C - A}{B} + -2\right) - -1\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \leq 0:\\ \;\;\;\;\frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{360}{\pi}}{2}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{\left({\left(A - C\right)}^{2} \cdot \frac{0.5}{B} + \left(B + C\right)\right) - A}{B}\right) \cdot \frac{180}{\pi}\\ \end{array} \]

Alternatives

Alternative 1
Error34.1
Cost14764
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{if}\;B \leq -2.8 \cdot 10^{-36}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.2 \cdot 10^{-83}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -3.5 \cdot 10^{-152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -1.7 \cdot 10^{-199}:\\ \;\;\;\;\tan^{-1} \left(\frac{0}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq -1.4 \cdot 10^{-205}:\\ \;\;\;\;\tan^{-1} \left(\frac{C}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 9.2 \cdot 10^{-284}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{-212}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 4 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{-68}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-42}:\\ \;\;\;\;\tan^{-1} \left(\frac{-A}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{+57}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error34.1
Cost14764
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{if}\;B \leq -2.8 \cdot 10^{-36}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4.5 \cdot 10^{-82}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -1.9 \cdot 10^{-152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -7.2 \cdot 10^{-199}:\\ \;\;\;\;\tan^{-1} \left(\frac{0}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq -9.5 \cdot 10^{-209}:\\ \;\;\;\;\tan^{-1} \left(\frac{C}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 9.4 \cdot 10^{-287}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 8 \cdot 10^{-214}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.32 \cdot 10^{-70}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 5.6 \cdot 10^{-42}:\\ \;\;\;\;\tan^{-1} \left(\frac{-A}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{+57}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error34.1
Cost14764
\[\begin{array}{l} t_0 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ t_1 := t_0 \cdot \frac{180}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ t_3 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{if}\;B \leq -2.9 \cdot 10^{-36}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-82}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -1.04 \cdot 10^{-150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -3.8 \cdot 10^{-199}:\\ \;\;\;\;\tan^{-1} \left(\frac{0}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq -1.55 \cdot 10^{-205}:\\ \;\;\;\;\tan^{-1} \left(\frac{C}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-288}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 3.7 \cdot 10^{-207}:\\ \;\;\;\;180 \cdot \frac{t_0}{\pi}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-105}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 2.35 \cdot 10^{-69}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;B \leq 4.6 \cdot 10^{-42}:\\ \;\;\;\;\tan^{-1} \left(\frac{-A}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{+58}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 4
Error27.5
Cost14104
\[\begin{array}{l} t_0 := \tan^{-1} \left(\frac{C}{B} - -1\right) \cdot \frac{180}{\pi}\\ t_1 := \tan^{-1} \left(-1 - \frac{A}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{if}\;A \leq -1.46 \cdot 10^{+53}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq -5.4 \cdot 10^{-295}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.22 \cdot 10^{-275}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 1.8 \cdot 10^{-229}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 4.5 \cdot 10^{-196}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 3.4 \cdot 10^{+73}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error31.4
Cost13972
\[\begin{array}{l} \mathbf{if}\;B \leq -2.7 \cdot 10^{-36}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4.4 \cdot 10^{-82}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq -1.1 \cdot 10^{-152}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.7 \cdot 10^{-199}:\\ \;\;\;\;\tan^{-1} \left(\frac{0}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq -1.7 \cdot 10^{-242}:\\ \;\;\;\;\tan^{-1} \left(\frac{C}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(-1 - \frac{A}{B}\right) \cdot \frac{180}{\pi}\\ \end{array} \]
Alternative 6
Error26.9
Cost13840
\[\begin{array}{l} t_0 := \tan^{-1} \left(\frac{C}{B} - -1\right) \cdot \frac{180}{\pi}\\ \mathbf{if}\;A \leq -3.8 \cdot 10^{+53}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq -1 \cdot 10^{-206}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 7.4 \cdot 10^{-196}:\\ \;\;\;\;\tan^{-1} \left(\frac{C - B}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq 1.62 \cdot 10^{+73}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(-1 - \frac{A}{B}\right) \cdot \frac{180}{\pi}\\ \end{array} \]
Alternative 7
Error24.2
Cost13700
\[\begin{array}{l} \mathbf{if}\;B \leq -2.4 \cdot 10^{-83}:\\ \;\;\;\;\tan^{-1} \left(\frac{C}{B} - -1\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\left(\frac{C - A}{B} + -2\right) - -1\right) \cdot \frac{180}{\pi}\\ \end{array} \]
Alternative 8
Error33.9
Cost13576
\[\begin{array}{l} \mathbf{if}\;B \leq -1.1 \cdot 10^{-82}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-106}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 9
Error24.2
Cost13572
\[\begin{array}{l} \mathbf{if}\;B \leq -6 \cdot 10^{-82}:\\ \;\;\;\;\tan^{-1} \left(\frac{C}{B} - -1\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - B}{B}\right) \cdot \frac{180}{\pi}\\ \end{array} \]
Alternative 10
Error33.9
Cost13512
\[\begin{array}{l} \mathbf{if}\;B \leq -8 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.55 \cdot 10^{-104}:\\ \;\;\;\;\tan^{-1} \left(\frac{-A}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 11
Error34.5
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -3.7 \cdot 10^{-147}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-124}:\\ \;\;\;\;\tan^{-1} \left(\frac{0}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 12
Error34.1
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -8.2 \cdot 10^{-51}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.45 \cdot 10^{-112}:\\ \;\;\;\;\tan^{-1} \left(\frac{C}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 13
Error38.4
Cost13188
\[\begin{array}{l} \mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 14
Error50.9
Cost13056
\[180 \cdot \frac{\tan^{-1} -1}{\pi} \]

Error

Reproduce?

herbie shell --seed 2023099 
(FPCore (A B C)
  :name "ABCF->ab-angle angle"
  :precision binary64
  (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))