Average Error: 29.8 → 7.3
Time: 34.3s
Precision: binary64
Cost: 73288
\[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 := \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\pi}\\ \mathbf{if}\;t_0 \leq -0.0001:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_0 \leq 5 \cdot 10^{-7}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \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
         (atan
          (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
        (t_1 (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- C A))) B)) PI))))
   (if (<= t_0 -0.0001)
     t_1
     (if (<= t_0 5e-7) (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))) t_1))))
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 = atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))))));
	double t_1 = 180.0 * (atan((((C - A) - hypot(B, (C - A))) / B)) / ((double) M_PI));
	double tmp;
	if (t_0 <= -0.0001) {
		tmp = t_1;
	} else if (t_0 <= 5e-7) {
		tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
	} else {
		tmp = t_1;
	}
	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.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))))));
	double t_1 = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) / Math.PI);
	double tmp;
	if (t_0 <= -0.0001) {
		tmp = t_1;
	} else if (t_0 <= 5e-7) {
		tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
	} else {
		tmp = t_1;
	}
	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.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0))))))
	t_1 = 180.0 * (math.atan((((C - A) - math.hypot(B, (C - A))) / B)) / math.pi)
	tmp = 0
	if t_0 <= -0.0001:
		tmp = t_1
	elif t_0 <= 5e-7:
		tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A)))
	else:
		tmp = t_1
	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 = atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))
	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) / pi))
	tmp = 0.0
	if (t_0 <= -0.0001)
		tmp = t_1;
	elseif (t_0 <= 5e-7)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A))));
	else
		tmp = t_1;
	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 = atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0))))));
	t_1 = 180.0 * (atan((((C - A) - hypot(B, (C - A))) / B)) / pi);
	tmp = 0.0;
	if (t_0 <= -0.0001)
		tmp = t_1;
	elseif (t_0 <= 5e-7)
		tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A)));
	else
		tmp = t_1;
	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[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]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -0.0001], t$95$1, If[LessEqual[t$95$0, 5e-7], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
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 := \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\pi}\\
\mathbf{if}\;t_0 \leq -0.0001:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\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 (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) < -1.00000000000000005e-4 or 4.99999999999999977e-7 < (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))

    1. Initial program 26.1

      \[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. Simplified8.2

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\pi}} \]
      Proof
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (hypot.f64 B (-.f64 C A))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (Rewrite<= hypot-def_binary64 (sqrt.f64 (+.f64 (*.f64 B B) (*.f64 (-.f64 C A) (-.f64 C A)))))) B)) (PI.f64))): 96 points increase in error, 7 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (Rewrite<= unpow2_binary64 (pow.f64 B 2)) (*.f64 (-.f64 C A) (-.f64 C A))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (Rewrite<= sqr-neg_binary64 (*.f64 (neg.f64 (-.f64 C A)) (neg.f64 (-.f64 C A))))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 C A))) (neg.f64 (-.f64 C A)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 C) A)) (neg.f64 (-.f64 C A)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 C)) A) (neg.f64 (-.f64 C A)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (Rewrite<= +-commutative_binary64 (+.f64 A (neg.f64 C))) (neg.f64 (-.f64 C A)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (Rewrite<= sub-neg_binary64 (-.f64 A C)) (neg.f64 (-.f64 C A)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (-.f64 A C) (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 C A))))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (-.f64 A C) (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 C) A)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (-.f64 A C) (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 C)) A))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (-.f64 A C) (Rewrite<= +-commutative_binary64 (+.f64 A (neg.f64 C))))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (-.f64 A C) (Rewrite<= sub-neg_binary64 (-.f64 A C)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (Rewrite<= unpow2_binary64 (pow.f64 (-.f64 A C) 2))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (Rewrite<= +-commutative_binary64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (Rewrite<= *-lft-identity_binary64 (*.f64 1 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (PI.f64))): 0 points increase in error, 0 points decrease in error

    if -1.00000000000000005e-4 < (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) < 4.99999999999999977e-7

    1. Initial program 52.6

      \[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. Simplified51.1

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\pi}} \]
      Proof
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (hypot.f64 B (-.f64 C A))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (Rewrite<= hypot-def_binary64 (sqrt.f64 (+.f64 (*.f64 B B) (*.f64 (-.f64 C A) (-.f64 C A)))))) B)) (PI.f64))): 96 points increase in error, 7 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (Rewrite<= unpow2_binary64 (pow.f64 B 2)) (*.f64 (-.f64 C A) (-.f64 C A))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (Rewrite<= sqr-neg_binary64 (*.f64 (neg.f64 (-.f64 C A)) (neg.f64 (-.f64 C A))))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 C A))) (neg.f64 (-.f64 C A)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 C) A)) (neg.f64 (-.f64 C A)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 C)) A) (neg.f64 (-.f64 C A)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (Rewrite<= +-commutative_binary64 (+.f64 A (neg.f64 C))) (neg.f64 (-.f64 C A)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (Rewrite<= sub-neg_binary64 (-.f64 A C)) (neg.f64 (-.f64 C A)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (-.f64 A C) (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 C A))))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (-.f64 A C) (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 C) A)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (-.f64 A C) (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 C)) A))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (-.f64 A C) (Rewrite<= +-commutative_binary64 (+.f64 A (neg.f64 C))))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (*.f64 (-.f64 A C) (Rewrite<= sub-neg_binary64 (-.f64 A C)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 B 2) (Rewrite<= unpow2_binary64 (pow.f64 (-.f64 A C) 2))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (Rewrite<= +-commutative_binary64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (/.f64 (Rewrite<= *-lft-identity_binary64 (*.f64 1 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) B)) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 180 (/.f64 (atan.f64 (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (PI.f64))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in C around 0 55.1

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right)}{\pi}} \]
    4. Simplified55.1

      \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right)} \]
      Proof
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (-.f64 C (+.f64 A (hypot.f64 B (-.f64 C A)))) B))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (Rewrite=> associate--r+_binary64 (-.f64 (-.f64 C A) (hypot.f64 B (-.f64 C A)))) B))): 7 points increase in error, 24 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (-.f64 (Rewrite=> sub-neg_binary64 (+.f64 C (neg.f64 A))) (hypot.f64 B (-.f64 C A))) B))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (-.f64 (+.f64 C (Rewrite<= mul-1-neg_binary64 (*.f64 -1 A))) (hypot.f64 B (-.f64 C A))) B))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (-.f64 (+.f64 C (*.f64 -1 A)) (hypot.f64 B (Rewrite=> sub-neg_binary64 (+.f64 C (neg.f64 A))))) B))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (-.f64 (+.f64 C (*.f64 -1 A)) (hypot.f64 B (+.f64 C (Rewrite<= mul-1-neg_binary64 (*.f64 -1 A))))) B))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/r/_binary64 (/.f64 180 (/.f64 (PI.f64) (atan.f64 (/.f64 (-.f64 (+.f64 C (*.f64 -1 A)) (hypot.f64 B (+.f64 C (*.f64 -1 A)))) B))))): 4 points increase in error, 2 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 180 (atan.f64 (/.f64 (-.f64 (+.f64 C (*.f64 -1 A)) (hypot.f64 B (+.f64 C (*.f64 -1 A)))) B))) (PI.f64))): 3 points increase in error, 3 points decrease in error
      (/.f64 (*.f64 180 (atan.f64 (/.f64 (-.f64 (+.f64 C (Rewrite=> mul-1-neg_binary64 (neg.f64 A))) (hypot.f64 B (+.f64 C (*.f64 -1 A)))) B))) (PI.f64)): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 180 (atan.f64 (/.f64 (-.f64 (Rewrite<= sub-neg_binary64 (-.f64 C A)) (hypot.f64 B (+.f64 C (*.f64 -1 A)))) B))) (PI.f64)): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 180 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (hypot.f64 B (+.f64 C (Rewrite=> mul-1-neg_binary64 (neg.f64 A))))) B))) (PI.f64)): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 180 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (hypot.f64 B (Rewrite<= sub-neg_binary64 (-.f64 C A)))) B))) (PI.f64)): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 180 (atan.f64 (/.f64 (Rewrite<= associate--r+_binary64 (-.f64 C (+.f64 A (hypot.f64 B (-.f64 C A))))) B))) (PI.f64)): 24 points increase in error, 7 points decrease in error
      (Rewrite<= associate-*r/_binary64 (*.f64 180 (/.f64 (atan.f64 (/.f64 (-.f64 C (+.f64 A (hypot.f64 B (-.f64 C A)))) B)) (PI.f64)))): 4 points increase in error, 6 points decrease in error
    5. Taylor expanded in B around 0 1.9

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

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{B \cdot -0.5}{C - A}\right)} \]
      Proof
      (/.f64 (*.f64 B -1/2) (-.f64 C A)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 B (-.f64 C A)) -1/2)): 2 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 -1/2 (/.f64 B (-.f64 C A)))): 0 points increase in error, 0 points decrease in error
  3. Recombined 2 regimes into one program.
  4. Final simplification7.3

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

Alternatives

Alternative 1
Error13.7
Cost20560
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right)\\ \mathbf{if}\;C \leq -1.607034441555001 \cdot 10^{-99}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1095099868114.5935:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 3.476086823729684 \cdot 10^{+104}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{elif}\;C \leq 5.490580353234621 \cdot 10^{+125}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\ \end{array} \]
Alternative 2
Error14.5
Cost20368
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)\\ \mathbf{if}\;C \leq -1.607034441555001 \cdot 10^{-99}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\ \mathbf{elif}\;C \leq 1095099868114.5935:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 3.476086823729684 \cdot 10^{+104}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{elif}\;C \leq 7.770061441478225 \cdot 10^{+115}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\ \end{array} \]
Alternative 3
Error14.5
Cost20368
\[\begin{array}{l} t_0 := \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)\\ \mathbf{if}\;C \leq -1.607034441555001 \cdot 10^{-99}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\ \mathbf{elif}\;C \leq 1095099868114.5935:\\ \;\;\;\;180 \cdot \frac{t_0}{\pi}\\ \mathbf{elif}\;C \leq 3.476086823729684 \cdot 10^{+104}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{elif}\;C \leq 7.770061441478225 \cdot 10^{+115}:\\ \;\;\;\;\frac{180}{\pi} \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\ \end{array} \]
Alternative 4
Error15.1
Cost20040
\[\begin{array}{l} \mathbf{if}\;A \leq -4.3903996010741686 \cdot 10^{+79}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{elif}\;A \leq 9.675090173272105 \cdot 10^{+132}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 5
Error26.0
Cost14764
\[\begin{array}{l} t_0 := \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B + C}{B}\right)}}\\ t_1 := \frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;A \leq -5.908278514263446 \cdot 10^{+63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -3.1002190463264365 \cdot 10^{-166}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -5.428347524798448 \cdot 10^{-187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.1701920425772104 \cdot 10^{-292}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.1538793460880787 \cdot 10^{-229}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\ \mathbf{elif}\;A \leq 5.399848586884399 \cdot 10^{-112}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.835260375579463 \cdot 10^{-74}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq 3.641241774816207 \cdot 10^{-22}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.3946122562079113 \cdot 10^{+64}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq 1.042632035111074 \cdot 10^{+83}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.9298346918002913 \cdot 10^{+96}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error26.6
Cost14500
\[\begin{array}{l} t_0 := \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B + C}{B}\right)}}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;A \leq -5.908278514263446 \cdot 10^{+63}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;A \leq 1.1701920425772104 \cdot 10^{-292}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.1538793460880787 \cdot 10^{-229}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\ \mathbf{elif}\;A \leq 5.399848586884399 \cdot 10^{-112}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.835260375579463 \cdot 10^{-74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 3.641241774816207 \cdot 10^{-22}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.3946122562079113 \cdot 10^{+64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.042632035111074 \cdot 10^{+83}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.9298346918002913 \cdot 10^{+96}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error33.9
Cost14368
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} 1\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ t_2 := \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}}\\ \mathbf{if}\;C \leq -3.7768029146661326 \cdot 10^{-53}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}}\\ \mathbf{elif}\;C \leq -4.191944559205585 \cdot 10^{-80}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -1.4086495510247816 \cdot 10^{-110}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq -2.909303280213385 \cdot 10^{-183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 2.2362779246420086 \cdot 10^{-261}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 7.551138571144211 \cdot 10^{-184}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;C \leq 5.813281974612335 \cdot 10^{-75}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 9.383549164999556 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error33.8
Cost14368
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} 1\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{if}\;C \leq -3.7768029146661326 \cdot 10^{-53}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}}\\ \mathbf{elif}\;C \leq -4.191944559205585 \cdot 10^{-80}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -1.4086495510247816 \cdot 10^{-110}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq -2.909303280213385 \cdot 10^{-183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 2.2362779246420086 \cdot 10^{-261}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 7.551138571144211 \cdot 10^{-184}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;C \leq 5.813281974612335 \cdot 10^{-75}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 9.383549164999556 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error33.8
Cost14368
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} 1\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{if}\;C \leq -3.7768029146661326 \cdot 10^{-53}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}}\\ \mathbf{elif}\;C \leq -4.191944559205585 \cdot 10^{-80}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -1.4086495510247816 \cdot 10^{-110}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq -2.909303280213385 \cdot 10^{-183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 2.2362779246420086 \cdot 10^{-261}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 7.551138571144211 \cdot 10^{-184}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;C \leq 5.813281974612335 \cdot 10^{-75}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 9.383549164999556 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\ \end{array} \]
Alternative 10
Error34.7
Cost14236
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{if}\;B \leq -1.6187133378872244 \cdot 10^{-93}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -4.917476464781137 \cdot 10^{-222}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -5.781039425502019 \cdot 10^{-283}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 3.028692350365937 \cdot 10^{-138}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.206485918750666 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.45907839418418 \cdot 10^{-28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 2.9766696330995226 \cdot 10^{+27}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error26.3
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B + C}{B}\right)}}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;A \leq -5.908278514263446 \cdot 10^{+63}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;A \leq 1.1701920425772104 \cdot 10^{-292}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.1538793460880787 \cdot 10^{-229}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\ \mathbf{elif}\;A \leq 5.399848586884399 \cdot 10^{-112}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.0369815570724489 \cdot 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 270.4130495403901:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error26.2
Cost14100
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi}\\ t_1 := \frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\ \mathbf{if}\;B \leq -5.175714164990908 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -3.5006356053432286 \cdot 10^{-196}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -5.7450975314416966 \cdot 10^{-251}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -6.418604044746461 \cdot 10^{-282}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 5.693666104869443 \cdot 10^{-72}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 13
Error26.2
Cost14100
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ t_1 := \frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\ \mathbf{if}\;B \leq -5.175714164990908 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -3.5006356053432286 \cdot 10^{-196}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -5.7450975314416966 \cdot 10^{-251}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -6.418604044746461 \cdot 10^{-282}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 5.693666104869443 \cdot 10^{-72}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 14
Error26.2
Cost14100
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ t_1 := \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\ t_2 := \frac{180}{\frac{\pi}{t_1}}\\ \mathbf{if}\;B \leq -5.175714164990908 \cdot 10^{+50}:\\ \;\;\;\;180 \cdot \frac{t_1}{\pi}\\ \mathbf{elif}\;B \leq -3.5006356053432286 \cdot 10^{-196}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -5.7450975314416966 \cdot 10^{-251}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -6.418604044746461 \cdot 10^{-282}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 5.693666104869443 \cdot 10^{-72}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 15
Error24.0
Cost13968
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ t_1 := \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\ \mathbf{if}\;B \leq -5.175714164990908 \cdot 10^{+50}:\\ \;\;\;\;180 \cdot \frac{t_1}{\pi}\\ \mathbf{elif}\;B \leq -3.5006356053432286 \cdot 10^{-196}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -5.7450975314416966 \cdot 10^{-251}:\\ \;\;\;\;\frac{180}{\frac{\pi}{t_1}}\\ \mathbf{elif}\;B \leq -6.418604044746461 \cdot 10^{-282}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 16
Error34.5
Cost13840
\[\begin{array}{l} \mathbf{if}\;B \leq -1.6187133378872244 \cdot 10^{-93}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -4.917476464781137 \cdot 10^{-222}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}}\\ \mathbf{elif}\;B \leq -5.781039425502019 \cdot 10^{-283}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.693666104869443 \cdot 10^{-72}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 17
Error27.9
Cost13840
\[\begin{array}{l} t_0 := \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B + C}{B}\right)}}\\ \mathbf{if}\;A \leq -5.908278514263446 \cdot 10^{+63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.1701920425772104 \cdot 10^{-292}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.1538793460880787 \cdot 10^{-229}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\ \mathbf{elif}\;A \leq 7.629530645103779 \cdot 10^{+80}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \end{array} \]
Alternative 18
Error27.9
Cost13840
\[\begin{array}{l} t_0 := \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B + C}{B}\right)}}\\ \mathbf{if}\;A \leq -5.908278514263446 \cdot 10^{+63}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;A \leq 1.1701920425772104 \cdot 10^{-292}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.1538793460880787 \cdot 10^{-229}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\ \mathbf{elif}\;A \leq 7.629530645103779 \cdot 10^{+80}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \end{array} \]
Alternative 19
Error35.2
Cost13712
\[\begin{array}{l} \mathbf{if}\;B \leq -6.371178551954991 \cdot 10^{-68}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -4.917476464781137 \cdot 10^{-222}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\ \mathbf{elif}\;B \leq -5.781039425502019 \cdot 10^{-283}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.693666104869443 \cdot 10^{-72}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 20
Error34.5
Cost13712
\[\begin{array}{l} \mathbf{if}\;B \leq -1.6187133378872244 \cdot 10^{-93}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -4.917476464781137 \cdot 10^{-222}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}}\\ \mathbf{elif}\;B \leq -5.781039425502019 \cdot 10^{-283}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.693666104869443 \cdot 10^{-72}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 21
Error34.4
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -1.1594065328428608 \cdot 10^{-77}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 5.693666104869443 \cdot 10^{-72}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 22
Error35.6
Cost13320
\[\begin{array}{l} \mathbf{if}\;B \leq -6.371178551954991 \cdot 10^{-68}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 6.524066130664371 \cdot 10^{-154}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 23
Error45.4
Cost13188
\[\begin{array}{l} \mathbf{if}\;B \leq -6.371178551954991 \cdot 10^{-68}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\ \end{array} \]
Alternative 24
Error55.2
Cost13056
\[\frac{180}{\pi} \cdot \tan^{-1} 0 \]

Error

Reproduce

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