Average Error: 29.4 → 12.9
Time: 19.3s
Precision: binary64
Cost: 20429
\[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} \mathbf{if}\;C \leq 7.2 \cdot 10^{+44} \lor \neg \left(C \leq 8.8 \cdot 10^{+86}\right) \land C \leq 2.3 \cdot 10^{+220}:\\ \;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \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
 (if (or (<= C 7.2e+44) (and (not (<= C 8.8e+86)) (<= C 2.3e+220)))
   (* (atan (/ (- (- C A) (hypot B (- A C))) B)) (/ 180.0 PI))
   (* (/ 180.0 PI) (atan (/ (* B -0.5) C)))))
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 tmp;
	if ((C <= 7.2e+44) || (!(C <= 8.8e+86) && (C <= 2.3e+220))) {
		tmp = atan((((C - A) - hypot(B, (A - C))) / B)) * (180.0 / ((double) M_PI));
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
	}
	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 tmp;
	if ((C <= 7.2e+44) || (!(C <= 8.8e+86) && (C <= 2.3e+220))) {
		tmp = Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) * (180.0 / Math.PI);
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
	}
	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):
	tmp = 0
	if (C <= 7.2e+44) or (not (C <= 8.8e+86) and (C <= 2.3e+220)):
		tmp = math.atan((((C - A) - math.hypot(B, (A - C))) / B)) * (180.0 / math.pi)
	else:
		tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C))
	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)
	tmp = 0.0
	if ((C <= 7.2e+44) || (!(C <= 8.8e+86) && (C <= 2.3e+220)))
		tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) * Float64(180.0 / pi));
	else
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C)));
	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)
	tmp = 0.0;
	if ((C <= 7.2e+44) || (~((C <= 8.8e+86)) && (C <= 2.3e+220)))
		tmp = atan((((C - A) - hypot(B, (A - C))) / B)) * (180.0 / pi);
	else
		tmp = (180.0 / pi) * atan(((B * -0.5) / C));
	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_] := If[Or[LessEqual[C, 7.2e+44], And[N[Not[LessEqual[C, 8.8e+86]], $MachinePrecision], LessEqual[C, 2.3e+220]]], N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $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}
\mathbf{if}\;C \leq 7.2 \cdot 10^{+44} \lor \neg \left(C \leq 8.8 \cdot 10^{+86}\right) \land C \leq 2.3 \cdot 10^{+220}:\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right) \cdot \frac{180}{\pi}\\

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\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 C < 7.2e44 or 8.80000000000000013e86 < C < 2.29999999999999997e220

    1. Initial program 26.8

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

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right) \cdot \frac{180}{\pi}} \]
      Proof
      (*.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (hypot.f64 B (-.f64 A C))) B)) (/.f64 180 (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (Rewrite<= hypot-def_binary64 (sqrt.f64 (+.f64 (*.f64 B B) (*.f64 (-.f64 A C) (-.f64 A C)))))) B)) (/.f64 180 (PI.f64))): 0 points increase in error, 9 points decrease in error
      (*.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (Rewrite<= unpow2_binary64 (pow.f64 B 2)) (*.f64 (-.f64 A C) (-.f64 A C))))) B)) (/.f64 180 (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.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)) (/.f64 180 (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.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)) (/.f64 180 (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.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)) (/.f64 180 (PI.f64))): 10 points increase in error, 0 points decrease in error
      (*.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))))))) (/.f64 180 (PI.f64))): 0 points increase in error, 10 points decrease in error
      (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) 180) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) (PI.f64)) 180)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 180 (/.f64 (atan.f64 (*.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 7.2e44 < C < 8.80000000000000013e86 or 2.29999999999999997e220 < C

    1. Initial program 52.2

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

      \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)} \]
      Proof
      (*.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (hypot.f64 B (-.f64 A C))) B)) (/.f64 180 (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (Rewrite<= hypot-def_binary64 (sqrt.f64 (+.f64 (*.f64 B B) (*.f64 (-.f64 A C) (-.f64 A C)))))) B)) (/.f64 180 (PI.f64))): 0 points increase in error, 9 points decrease in error
      (*.f64 (atan.f64 (/.f64 (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (Rewrite<= unpow2_binary64 (pow.f64 B 2)) (*.f64 (-.f64 A C) (-.f64 A C))))) B)) (/.f64 180 (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.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)) (/.f64 180 (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.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)) (/.f64 180 (PI.f64))): 0 points increase in error, 0 points decrease in error
      (*.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)) (/.f64 180 (PI.f64))): 10 points increase in error, 0 points decrease in error
      (*.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))))))) (/.f64 180 (PI.f64))): 0 points increase in error, 10 points decrease in error
      (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) 180) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) (PI.f64)) 180)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 180 (/.f64 (atan.f64 (*.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 inf 35.6

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

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{\mathsf{fma}\left(-0.5, \frac{A \cdot A + \left(B \cdot B - {\left(-A\right)}^{2}\right)}{C}, A \cdot 0\right)}}{B}\right) \]
      Proof
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (+.f64 (*.f64 A A) (-.f64 (*.f64 B B) (pow.f64 (neg.f64 A) 2))) C) (*.f64 A 0)) B))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (+.f64 (Rewrite<= unpow2_binary64 (pow.f64 A 2)) (-.f64 (*.f64 B B) (pow.f64 (neg.f64 A) 2))) C) (*.f64 A 0)) B))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (+.f64 (pow.f64 A 2) (-.f64 (Rewrite<= unpow2_binary64 (pow.f64 B 2)) (pow.f64 (neg.f64 A) 2))) C) (*.f64 A 0)) B))): 0 points increase in error, 14 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (+.f64 (pow.f64 A 2) (-.f64 (pow.f64 B 2) (pow.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 A)) 2))) C) (*.f64 A 0)) B))): 0 points increase in error, 14 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (pow.f64 A 2) (pow.f64 B 2)) (pow.f64 (*.f64 -1 A) 2))) C) (*.f64 A 0)) B))): 14 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 (pow.f64 B 2) (pow.f64 A 2))) (pow.f64 (*.f64 -1 A) 2)) C) (*.f64 A 0)) B))): 0 points increase in error, 14 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (-.f64 (+.f64 (pow.f64 B 2) (pow.f64 A 2)) (pow.f64 (*.f64 -1 A) 2)) C) (*.f64 A (Rewrite<= metadata-eval (+.f64 -1 1)))) B))): 14 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (-.f64 (+.f64 (pow.f64 B 2) (pow.f64 A 2)) (pow.f64 (*.f64 -1 A) 2)) C) (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 -1 1) A))) B))): 0 points increase in error, 14 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (-.f64 (+.f64 (pow.f64 B 2) (pow.f64 A 2)) (pow.f64 (*.f64 -1 A) 2)) C) (*.f64 (Rewrite=> metadata-eval 0) A)) B))): 14 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (-.f64 (+.f64 (pow.f64 B 2) (pow.f64 A 2)) (pow.f64 (*.f64 -1 A) 2)) C) (*.f64 (Rewrite<= metadata-eval (*.f64 -1 0)) A)) B))): 0 points increase in error, 14 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (-.f64 (+.f64 (pow.f64 B 2) (pow.f64 A 2)) (pow.f64 (*.f64 -1 A) 2)) C) (*.f64 (*.f64 -1 (Rewrite<= metadata-eval (+.f64 -1 1))) A)) B))): 0 points increase in error, 14 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (-.f64 (+.f64 (pow.f64 B 2) (pow.f64 A 2)) (pow.f64 (*.f64 -1 A) 2)) C) (Rewrite<= associate-*r*_binary64 (*.f64 -1 (*.f64 (+.f64 -1 1) A)))) B))): 14 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (fma.f64 -1/2 (/.f64 (-.f64 (+.f64 (pow.f64 B 2) (pow.f64 A 2)) (pow.f64 (*.f64 -1 A) 2)) C) (*.f64 -1 (Rewrite<= distribute-rgt1-in_binary64 (+.f64 A (*.f64 -1 A))))) B))): 0 points increase in error, 14 points decrease in error
      (*.f64 (/.f64 180 (PI.f64)) (atan.f64 (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 -1/2 (/.f64 (-.f64 (+.f64 (pow.f64 B 2) (pow.f64 A 2)) (pow.f64 (*.f64 -1 A) 2)) C)) (*.f64 -1 (+.f64 A (*.f64 -1 A))))) B))): 14 points increase in error, 0 points decrease in error
    5. Taylor expanded in A around 0 16.5

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq 7.2 \cdot 10^{+44} \lor \neg \left(C \leq 8.8 \cdot 10^{+86}\right) \land C \leq 2.3 \cdot 10^{+220}:\\ \;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error25.7
Cost14629
\[\begin{array}{l} t_0 := \frac{\frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{0.005555555555555556}}{\pi}\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ t_2 := \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)\\ \mathbf{if}\;A \leq -4.6 \cdot 10^{+153}:\\ \;\;\;\;\frac{t_2}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -1.4 \cdot 10^{+106}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -7 \cdot 10^{-7}:\\ \;\;\;\;\frac{180}{\frac{\pi}{t_2}}\\ \mathbf{elif}\;A \leq -4.3 \cdot 10^{-121}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -7.5 \cdot 10^{-264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -4.7 \cdot 10^{-293}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-268}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 7 \cdot 10^{-222} \lor \neg \left(A \leq 1.5 \cdot 10^{-6}\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C + B\right) - A}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
Alternative 2
Error28.3
Cost14500
\[\begin{array}{l} t_0 := \frac{\frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{0.005555555555555556}}{\pi}\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ t_2 := \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)\\ \mathbf{if}\;A \leq -2.6 \cdot 10^{+153}:\\ \;\;\;\;\frac{t_2}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -5.4 \cdot 10^{+108}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -4.8 \cdot 10^{-8}:\\ \;\;\;\;\frac{180}{\frac{\pi}{t_2}}\\ \mathbf{elif}\;A \leq -3.8 \cdot 10^{-121}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -9.5 \cdot 10^{-262}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -2.2 \cdot 10^{-293}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{elif}\;A \leq 1.45 \cdot 10^{-268}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-227}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1500000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-2}{\frac{B}{A}}\right)\\ \end{array} \]
Alternative 3
Error26.9
Cost14500
\[\begin{array}{l} t_0 := \frac{\frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{0.005555555555555556}}{\pi}\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ t_2 := \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)\\ \mathbf{if}\;A \leq -5.4 \cdot 10^{+153}:\\ \;\;\;\;\frac{t_2}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -5.8 \cdot 10^{+108}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -2.15 \cdot 10^{-7}:\\ \;\;\;\;\frac{180}{\frac{\pi}{t_2}}\\ \mathbf{elif}\;A \leq -6 \cdot 10^{-124}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -1.4 \cdot 10^{-263}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -1.45 \cdot 10^{-293}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{elif}\;A \leq 1.1 \cdot 10^{-268}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.9 \cdot 10^{-218}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 8 \cdot 10^{-7}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \end{array} \]
Alternative 4
Error26.3
Cost14500
\[\begin{array}{l} t_0 := \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C + B\right) - A}{B}\right)\\ t_2 := 180 \cdot \frac{t_0}{\pi}\\ t_3 := \frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -4.6 \cdot 10^{-226}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 5.8 \cdot 10^{-283}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A \cdot 0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-244}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-231}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 3.2 \cdot 10^{-138}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{elif}\;B \leq 1.12 \cdot 10^{-122}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;B \leq 1.48 \cdot 10^{-77}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 9.2 \cdot 10^{-58}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{t_0}{\pi \cdot 0.005555555555555556}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 5
Error24.3
Cost14365
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -3.8 \cdot 10^{-23}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\left(\frac{B}{A} \cdot \left(\frac{C}{A} + 1\right)\right) \cdot 0.5\right)\\ \mathbf{elif}\;A \leq -2.8 \cdot 10^{-120}:\\ \;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{0.005555555555555556}}{\pi}\\ \mathbf{elif}\;A \leq -5.5 \cdot 10^{-262}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -3.8 \cdot 10^{-293}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{elif}\;A \leq 1.55 \cdot 10^{-266}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 4 \cdot 10^{-228} \lor \neg \left(A \leq 1.15 \cdot 10^{-6}\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C + B\right) - A}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
Alternative 6
Error24.3
Cost14365
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -3.4 \cdot 10^{-23}:\\ \;\;\;\;\frac{\tan^{-1} \left(\left(\frac{B}{A} \cdot \left(\frac{C}{A} + 1\right)\right) \cdot 0.5\right)}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -5.2 \cdot 10^{-121}:\\ \;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{0.005555555555555556}}{\pi}\\ \mathbf{elif}\;A \leq -1.85 \cdot 10^{-261}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -6.2 \cdot 10^{-293}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-266}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-227} \lor \neg \left(A \leq 10^{-5}\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C + B\right) - A}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
Alternative 7
Error33.4
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{if}\;C \leq -1.36 \cdot 10^{+58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq -2.45 \cdot 10^{-15}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -2 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 1.25 \cdot 10^{-280}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq 7.5 \cdot 10^{-188}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-2}{\frac{B}{A}}\right)\\ \mathbf{elif}\;C \leq 1.8 \cdot 10^{-96}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \end{array} \]
Alternative 8
Error28.6
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -2.9 \cdot 10^{-139}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)\\ \mathbf{elif}\;A \leq -8.5 \cdot 10^{-264}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -5.2 \cdot 10^{-293}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{elif}\;A \leq 2.4 \cdot 10^{-265}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 5.8 \cdot 10^{-213}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 9000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-2}{\frac{B}{A}}\right)\\ \end{array} \]
Alternative 9
Error28.7
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -2.9 \cdot 10^{-139}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}}\\ \mathbf{elif}\;A \leq -4.8 \cdot 10^{-261}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -8.2 \cdot 10^{-294}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{elif}\;A \leq 2.35 \cdot 10^{-265}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.6 \cdot 10^{-214}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 56000000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-2}{\frac{B}{A}}\right)\\ \end{array} \]
Alternative 10
Error34.5
Cost13972
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\ \mathbf{if}\;B \leq -2.9 \cdot 10^{+34}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.75 \cdot 10^{-219}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-279}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-142}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 11
Error34.4
Cost13972
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ t_1 := \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)\\ \mathbf{if}\;B \leq -7.2 \cdot 10^{+33}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -8 \cdot 10^{-218}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 4.2 \cdot 10^{-283}:\\ \;\;\;\;\frac{180}{\pi} \cdot t_1\\ \mathbf{elif}\;B \leq 3.7 \cdot 10^{-144}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 7.5 \cdot 10^{-26}:\\ \;\;\;\;180 \cdot \frac{t_1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 12
Error34.5
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -7.8 \cdot 10^{+33}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.15 \cdot 10^{-138}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 13
Error38.5
Cost13188
\[\begin{array}{l} \mathbf{if}\;B \leq -1.3 \cdot 10^{-283}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 14
Error50.7
Cost13056
\[\frac{180 \cdot \tan^{-1} -1}{\pi} \]

Error

Reproduce

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