?

Average Error: 30.0 → 11.1
Time: 19.9s
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):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi \cdot 0.005555555555555556}\\ \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)))
     (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))
     (/ (atan (/ (* B -0.5) C)) (* PI 0.005555555555555556)))))
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 = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
	} else {
		tmp = atan(((B * -0.5) / C)) / (((double) M_PI) * 0.005555555555555556);
	}
	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 = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
	} else {
		tmp = Math.atan(((B * -0.5) / C)) / (Math.PI * 0.005555555555555556);
	}
	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 = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi)
	else:
		tmp = math.atan(((B * -0.5) / C)) / (math.pi * 0.005555555555555556)
	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(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi));
	else
		tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) / Float64(pi * 0.005555555555555556));
	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 = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi);
	else
		tmp = atan(((B * -0.5) / C)) / (pi * 0.005555555555555556);
	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[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $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):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\

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


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

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

      associate-*l/ [=>]26.5

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

      *-lft-identity [=>]26.5

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

      +-commutative [=>]26.5

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

      unpow2 [=>]26.5

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

      unpow2 [=>]26.5

      \[ 180 \cdot \frac{\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)}{\pi} \]

      hypot-def [=>]8.2

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

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

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

      associate-*r/ [=>]52.2

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

      sub-neg [=>]52.2

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

      sub-neg [<=]52.2

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

      unpow2 [=>]52.2

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

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

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

      [Start]43.4

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

      fma-def [=>]43.4

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

      associate--l+ [=>]39.0

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

      unpow2 [=>]39.0

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

      unpow2 [=>]39.0

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

      mul-1-neg [=>]39.0

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

      *-commutative [=>]39.0

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

      associate-*r/ [=>]39.0

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

      distribute-rgt1-in [=>]39.0

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

      associate-*r* [=>]39.0

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

      metadata-eval [=>]39.0

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

      metadata-eval [=>]39.0

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

      metadata-eval [<=]39.0

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

      *-commutative [=>]39.0

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

      metadata-eval [=>]39.0

      \[ \frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{B \cdot B + \left(A \cdot A - {\left(-A\right)}^{2}\right)}{B \cdot C}, \frac{A \cdot \color{blue}{0}}{B}\right)\right)}{\pi} \]
    5. Taylor expanded in B around 0 43.4

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

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

      [Start]43.4

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

      mul-1-neg [<=]43.4

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(-0.5 \cdot \frac{B \cdot B}{B \cdot C}\right)}{\pi \cdot 0.005555555555555556}} \]
    8. Taylor expanded in B around 0 29.6

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

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

      [Start]29.6

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

      associate-*r/ [=>]29.6

      \[ \frac{\tan^{-1} \color{blue}{\left(\frac{-0.5 \cdot B}{C}\right)}}{\pi \cdot 0.005555555555555556} \]
  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):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi \cdot 0.005555555555555556}\\ \end{array} \]

Alternatives

Alternative 1
Error22.4
Cost14348
\[\begin{array}{l} t_0 := \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{if}\;B \leq 4.8 \cdot 10^{-203}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-156}:\\ \;\;\;\;\frac{180 \cdot t_0}{\pi}\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-124}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{A - C} + \frac{\left(C - A\right) \cdot 2}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{-87}:\\ \;\;\;\;\frac{t_0}{\pi \cdot 0.005555555555555556}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-\pi} \cdot \left(-180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)\right)\\ \end{array} \]
Alternative 2
Error27.3
Cost14236
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -5.3 \cdot 10^{+60}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq -3.5 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -8.5 \cdot 10^{-84}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 6.2 \cdot 10^{-165}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 4.8 \cdot 10^{-123}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.3 \cdot 10^{-45}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;A \leq 1.46 \cdot 10^{+50}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 3
Error27.5
Cost14236
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -1.42 \cdot 10^{+60}:\\ \;\;\;\;\frac{-\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\frac{-\pi}{180}}\\ \mathbf{elif}\;A \leq -4.7 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -4.4 \cdot 10^{-86}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3 \cdot 10^{-173}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 6.5 \cdot 10^{-123}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.6 \cdot 10^{-44}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;A \leq 2.1 \cdot 10^{+54}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 4
Error33.7
Cost14104
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} 1}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{if}\;B \leq -3.5 \cdot 10^{+55}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -4 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq -5.8 \cdot 10^{-24}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -1.4 \cdot 10^{-149}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{-217}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 29500000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 5
Error33.6
Cost14104
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{if}\;B \leq -2.6 \cdot 10^{+54}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -2.06 \cdot 10^{-10}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq -5.8 \cdot 10^{-24}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -3.1 \cdot 10^{-152}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-217}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.9 \cdot 10^{+16}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 6
Error33.6
Cost14104
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{if}\;B \leq -7.5 \cdot 10^{+53}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -7.5 \cdot 10^{-10}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\ \mathbf{elif}\;B \leq -5.5 \cdot 10^{-24}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -2.5 \cdot 10^{-146}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.6 \cdot 10^{-217}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 21000000000000:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 7
Error33.6
Cost14104
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{if}\;B \leq -3.4 \cdot 10^{+54}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -3.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\ \mathbf{elif}\;B \leq -6 \cdot 10^{-24}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -8 \cdot 10^{-283}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6.9 \cdot 10^{-217}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \mathbf{elif}\;B \leq 2.65 \cdot 10^{+20}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 8
Error29.8
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -2.25 \cdot 10^{+61}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq -1.5 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -4.2 \cdot 10^{-84}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 8.5 \cdot 10^{-167}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.65 \cdot 10^{-121}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq 4.1 \cdot 10^{+121}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \end{array} \]
Alternative 9
Error29.8
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -1.8 \cdot 10^{+60}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq -1.95 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -8.2 \cdot 10^{-84}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 6.4 \cdot 10^{-165}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 5.8 \cdot 10^{-123}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq 1.15 \cdot 10^{+122}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \end{array} \]
Alternative 10
Error29.8
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -1.02 \cdot 10^{+62}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq -1.5 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -6.6 \cdot 10^{-84}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 6.4 \cdot 10^{-165}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.32 \cdot 10^{-117}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.1 \cdot 10^{+121}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \end{array} \]
Alternative 11
Error26.2
Cost13968
\[\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^{+60}:\\ \;\;\;\;\frac{-\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\frac{-\pi}{180}}\\ \mathbf{elif}\;A \leq -8 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -6.5 \cdot 10^{-85}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.4 \cdot 10^{-170}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 12
Error26.2
Cost13968
\[\begin{array}{l} \mathbf{if}\;A \leq -1.2 \cdot 10^{+62}:\\ \;\;\;\;\frac{-\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\frac{-\pi}{180}}\\ \mathbf{elif}\;A \leq -1.5 \cdot 10^{-11}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \mathbf{elif}\;A \leq -9 \cdot 10^{-84}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-178}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 13
Error26.2
Cost13968
\[\begin{array}{l} \mathbf{if}\;A \leq -1.65 \cdot 10^{+60}:\\ \;\;\;\;\frac{-\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\frac{-\pi}{180}}\\ \mathbf{elif}\;A \leq -1.6 \cdot 10^{-11}:\\ \;\;\;\;\frac{1}{-\pi} \cdot \left(-180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)\right)\\ \mathbf{elif}\;A \leq -1.6 \cdot 10^{-85}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-168}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 14
Error34.2
Cost13840
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{if}\;B \leq -8.5 \cdot 10^{+53}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.48 \cdot 10^{-221}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-181}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7 \cdot 10^{+28}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 15
Error27.1
Cost13840
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -3.6 \cdot 10^{+60}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq -1.6 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -2.5 \cdot 10^{-84}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 6.4 \cdot 10^{-165}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 16
Error34.8
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -4.5 \cdot 10^{-57}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.3 \cdot 10^{-157}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 17
Error37.9
Cost13188
\[\begin{array}{l} \mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 18
Error50.6
Cost13056
\[\frac{180 \cdot \tan^{-1} -1}{\pi} \]

Error

Reproduce?

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