?

Average Error: 29.5 → 11.1
Time: 20.4s
Precision: binary64
Cost: 60489

?

\[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 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\ \mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\ \;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\pi}{180 \cdot \tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\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
 (let* ((t_0
         (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
   (if (or (<= t_0 -0.5) (not (<= t_0 0.0)))
     (* (atan (/ (- (- C A) (hypot B (- A C))) B)) (/ 180.0 PI))
     (/ 1.0 (/ PI (* 180.0 (atan (/ -0.5 (/ C B)))))))))
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 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
	double tmp;
	if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
		tmp = atan((((C - A) - hypot(B, (A - C))) / B)) * (180.0 / ((double) M_PI));
	} else {
		tmp = 1.0 / (((double) M_PI) / (180.0 * atan((-0.5 / (C / B)))));
	}
	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 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
	double tmp;
	if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
		tmp = Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) * (180.0 / Math.PI);
	} else {
		tmp = 1.0 / (Math.PI / (180.0 * Math.atan((-0.5 / (C / B)))));
	}
	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 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0))))
	tmp = 0
	if (t_0 <= -0.5) or not (t_0 <= 0.0):
		tmp = math.atan((((C - A) - math.hypot(B, (A - C))) / B)) * (180.0 / math.pi)
	else:
		tmp = 1.0 / (math.pi / (180.0 * math.atan((-0.5 / (C / B)))))
	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(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))
	tmp = 0.0
	if ((t_0 <= -0.5) || !(t_0 <= 0.0))
		tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) * Float64(180.0 / pi));
	else
		tmp = Float64(1.0 / Float64(pi / Float64(180.0 * atan(Float64(-0.5 / Float64(C / B))))));
	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 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0))));
	tmp = 0.0;
	if ((t_0 <= -0.5) || ~((t_0 <= 0.0)))
		tmp = atan((((C - A) - hypot(B, (A - C))) / B)) * (180.0 / pi);
	else
		tmp = 1.0 / (pi / (180.0 * atan((-0.5 / (C / B)))));
	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[(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]}, If[Or[LessEqual[t$95$0, -0.5], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], 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[(1.0 / N[(Pi / N[(180.0 * N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right) \cdot \frac{180}{\pi}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\pi}{180 \cdot \tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\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 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.5 or 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 25.9

      \[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. Simplified7.9

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

      [Start]25.9

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

      associate-*r/ [=>]25.9

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

      associate-*l/ [<=]25.9

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

      *-commutative [=>]25.9

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

      associate-*l/ [=>]25.9

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

      *-lft-identity [=>]25.9

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

      +-commutative [=>]25.9

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

      unpow2 [=>]25.9

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

      unpow2 [=>]25.9

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

      hypot-def [=>]7.9

      \[ \tan^{-1} \left(\frac{\left(C - A\right) - \color{blue}{\mathsf{hypot}\left(B, A - C\right)}}{B}\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 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.7

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

      [Start]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} \]

      associate-*r/ [=>]52.6

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

      associate-*l/ [<=]52.6

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

      *-commutative [=>]52.6

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

      associate-*l/ [=>]52.6

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

      *-lft-identity [=>]52.6

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

      +-commutative [=>]52.6

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

      unpow2 [=>]52.6

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

      unpow2 [=>]52.6

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

      hypot-def [=>]51.7

      \[ \tan^{-1} \left(\frac{\left(C - A\right) - \color{blue}{\mathsf{hypot}\left(B, A - C\right)}}{B}\right) \cdot \frac{180}{\pi} \]
    3. Taylor expanded in C around inf 41.3

      \[\leadsto \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) \cdot \frac{180}{\pi} \]
    4. Simplified38.0

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

      [Start]41.3

      \[ \tan^{-1} \left(\frac{-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) \cdot \frac{180}{\pi} \]

      fma-def [=>]41.3

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

      associate--l+ [=>]38.0

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

      unpow2 [=>]38.0

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

      unpow2 [=>]38.0

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

      mul-1-neg [=>]38.0

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

      mul-1-neg [=>]38.0

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

      distribute-rgt1-in [=>]38.0

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

      metadata-eval [=>]38.0

      \[ \tan^{-1} \left(\frac{\mathsf{fma}\left(-0.5, \frac{B \cdot B + \left(A \cdot A - {\left(-A\right)}^{2}\right)}{C}, -\color{blue}{0} \cdot A\right)}{B}\right) \cdot \frac{180}{\pi} \]
    5. Applied egg-rr47.6

      \[\leadsto \color{blue}{\frac{1}{\frac{\pi}{\tan^{-1} \left(\frac{-0.5 \cdot \frac{\mathsf{fma}\left(B, B, \mathsf{fma}\left(A, A, A \cdot A\right)\right)}{C}}{B}\right) \cdot 180}}} \]
    6. Taylor expanded in B around inf 30.9

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

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

      [Start]30.9

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

      associate-*r/ [=>]30.9

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

      associate-/l* [=>]30.9

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

    \[\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 \lor \neg \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \leq 0\right):\\ \;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\pi}{180 \cdot \tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}}\\ \end{array} \]

Alternatives

Alternative 1
Error33.0
Cost14368
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} -1}{\pi}\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{if}\;C \leq -9 \cdot 10^{-75}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;C \leq -6.8 \cdot 10^{-147}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -1.4 \cdot 10^{-198}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \mathbf{elif}\;C \leq -9.5 \cdot 10^{-268}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;C \leq 2.2 \cdot 10^{-287}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1.9 \cdot 10^{-210}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 8.8 \cdot 10^{-134}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 7.5 \cdot 10^{-111}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error32.9
Cost14368
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} -1}{\pi}\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{if}\;C \leq -1.26 \cdot 10^{-73}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;C \leq -6.8 \cdot 10^{-150}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -1.25 \cdot 10^{-198}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \mathbf{elif}\;C \leq -1.05 \cdot 10^{-268}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;C \leq 1.6 \cdot 10^{-284}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1.8 \cdot 10^{-210}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 3.5 \cdot 10^{-133}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 10^{-110}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error25.5
Cost14352
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \mathbf{if}\;C \leq -50000000000000:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{\frac{B}{B + \left(C - A\right)}}\right)\\ \mathbf{elif}\;C \leq -3.5 \cdot 10^{-204}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -2 \cdot 10^{-239}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;C \leq -9.2 \cdot 10^{-268}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B \cdot C}{A \cdot A} + \frac{B}{A}\right)\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.5 \cdot 10^{-138}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 2.4 \cdot 10^{-110}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \end{array} \]
Alternative 4
Error26.0
Cost14236
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)\\ t_2 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \mathbf{if}\;C \leq -4.1 \cdot 10^{-79}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq -1.5 \cdot 10^{-132}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -7.5 \cdot 10^{-229}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq -9.4 \cdot 10^{-268}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.8 \cdot 10^{-210}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;C \leq 3 \cdot 10^{-165}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1.25 \cdot 10^{-110}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \end{array} \]
Alternative 5
Error26.8
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \mathbf{if}\;C \leq -3.05 \cdot 10^{-40}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;C \leq -1.26 \cdot 10^{-228}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -9.5 \cdot 10^{-268}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;C \leq 1.7 \cdot 10^{-210}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1.35 \cdot 10^{-160}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq 2.4 \cdot 10^{-110}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \end{array} \]
Alternative 6
Error26.8
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \mathbf{if}\;C \leq -8.5 \cdot 10^{-44}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;C \leq -3.8 \cdot 10^{-227}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -1.1 \cdot 10^{-268}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;C \leq 1.6 \cdot 10^{-210}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 3.9 \cdot 10^{-165}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{elif}\;C \leq 2.4 \cdot 10^{-110}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \end{array} \]
Alternative 7
Error26.8
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \mathbf{if}\;C \leq -6.5 \cdot 10^{-43}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;C \leq -5.3 \cdot 10^{-222}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -9.5 \cdot 10^{-268}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.9 \cdot 10^{-210}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 3 \cdot 10^{-165}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{elif}\;C \leq 2.4 \cdot 10^{-110}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \end{array} \]
Alternative 8
Error25.6
Cost14104
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \mathbf{if}\;C \leq -5.5 \cdot 10^{+50}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)\\ \mathbf{elif}\;C \leq -3 \cdot 10^{-204}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -3.4 \cdot 10^{-220}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq -9.5 \cdot 10^{-268}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.8 \cdot 10^{-135}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 2.4 \cdot 10^{-110}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \end{array} \]
Alternative 9
Error25.6
Cost14104
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \mathbf{if}\;C \leq -1.5 \cdot 10^{+17}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{\frac{B}{B + \left(C - A\right)}}\right)\\ \mathbf{elif}\;C \leq -3 \cdot 10^{-204}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -8.2 \cdot 10^{-229}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq -8.6 \cdot 10^{-268}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.65 \cdot 10^{-136}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 2.4 \cdot 10^{-110}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \end{array} \]
Alternative 10
Error33.2
Cost13972
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} -1}{\pi}\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{if}\;C \leq -1.2 \cdot 10^{-73}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.3 \cdot 10^{-288}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1.7 \cdot 10^{-210}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 8.4 \cdot 10^{-138}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 9 \cdot 10^{-111}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error29.8
Cost13972
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} -1}{\pi}\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{if}\;C \leq -3 \cdot 10^{-238}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;C \leq 2.15 \cdot 10^{-277}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1.9 \cdot 10^{-210}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 2.5 \cdot 10^{-136}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1.18 \cdot 10^{-110}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error34.1
Cost13776
\[\begin{array}{l} \mathbf{if}\;B \leq -1.7 \cdot 10^{-116}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-176}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9 \cdot 10^{-130}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.4 \cdot 10^{-71}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 13
Error34.1
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -2.1 \cdot 10^{-116}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.2 \cdot 10^{-64}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 14
Error38.2
Cost13188
\[\begin{array}{l} \mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 15
Error50.9
Cost13056
\[\frac{180 \cdot \tan^{-1} -1}{\pi} \]

Error

Reproduce?

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