?

Average Accuracy: 53.4% → 82.2%
Time: 28.3s
Precision: binary64
Cost: 60488

?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\frac{t_1}{0.005555555555555556}}{\pi}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

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

    1. Initial program 59.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. Simplified87.0%

      \[\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]59.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-*l/ [=>]59.6

      \[ 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 [=>]59.6

      \[ 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 [=>]59.6

      \[ 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 [=>]59.6

      \[ 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 [=>]59.6

      \[ 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 [=>]87.0

      \[ 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 19.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. Simplified13.4%

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

      [Start]19.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-*r/ [=>]19.5

      \[ \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/ [<=]19.5

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

      associate-*l/ [=>]19.5

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

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

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

      [Start]52.7

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

      associate-*r/ [=>]52.7

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

      associate-/l* [=>]52.3

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

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

    1. Initial program 58.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. Simplified82.1%

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

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

      associate-*r/ [=>]58.1

      \[ \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/ [<=]58.1

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

      associate-*l/ [=>]58.1

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

      \[\leadsto \color{blue}{\frac{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{0.005555555555555556}}{\pi}} \]
      Proof

      [Start]82.1

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

      associate-*l/ [=>]82.1

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

      *-un-lft-identity [=>]82.1

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

      associate-/r* [=>]82.1

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

      *-commutative [=>]82.1

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

      associate-/l* [=>]82.1

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

      associate--r+ [=>]87.1

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

      metadata-eval [=>]87.1

      \[ \frac{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\color{blue}{0.005555555555555556}}}{\pi} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification82.2%

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

Alternatives

Alternative 1
Accuracy80.8%
Cost20164
\[\begin{array}{l} \mathbf{if}\;C \leq 2.3 \cdot 10^{+145}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
Alternative 2
Accuracy60.2%
Cost15018
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(1 + \frac{C}{A}\right)\right)\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_2 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)\\ \mathbf{if}\;B \leq -7.6 \cdot 10^{-49}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -1.18 \cdot 10^{-67}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -4.2 \cdot 10^{-105}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -7 \cdot 10^{-161}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -8 \cdot 10^{-197}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -4.6 \cdot 10^{-200}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.5 \cdot 10^{-287} \lor \neg \left(B \leq 1.4 \cdot 10^{-221}\right) \land \left(B \leq 3.2 \cdot 10^{-154} \lor \neg \left(B \leq 8.2 \cdot 10^{+80}\right)\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Accuracy60.1%
Cost15018
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)\\ \mathbf{if}\;B \leq -5.6 \cdot 10^{-49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -1.18 \cdot 10^{-67}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -7.5 \cdot 10^{-110}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -3.2 \cdot 10^{-159}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{\frac{A}{\frac{C}{A}}}\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-197}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -8 \cdot 10^{-201}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{-289} \lor \neg \left(B \leq 6.7 \cdot 10^{-217}\right) \land \left(B \leq 1.65 \cdot 10^{-160} \lor \neg \left(B \leq 8.2 \cdot 10^{+80}\right)\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(1 + \frac{C}{A}\right)\right)\right)}{\pi}\\ \end{array} \]
Alternative 4
Accuracy48.4%
Cost14633
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.45 \cdot 10^{+38}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.15 \cdot 10^{-7}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -2.9 \cdot 10^{-27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -2.7 \cdot 10^{-106}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -2.8 \cdot 10^{-159}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -5.5 \cdot 10^{-201}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-286}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 8.6 \cdot 10^{-218}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.36 \cdot 10^{-161} \lor \neg \left(B \leq 5.3 \cdot 10^{+57}\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\ \end{array} \]
Alternative 5
Accuracy46.6%
Cost14632
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.4 \cdot 10^{+38}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.85 \cdot 10^{-8}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -4 \cdot 10^{-26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -1 \cdot 10^{-109}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-156}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -1.06 \cdot 10^{-200}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 8 \cdot 10^{-288}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 6.8 \cdot 10^{-217}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.65 \cdot 10^{-161}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{+67}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 6
Accuracy46.7%
Cost14632
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.66 \cdot 10^{+38}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.6 \cdot 10^{-7}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -1.32 \cdot 10^{-23}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -8.3 \cdot 10^{-109}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -4.5 \cdot 10^{-159}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -1.65 \cdot 10^{-199}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-287}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 9.4 \cdot 10^{-219}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 7.1 \cdot 10^{-162}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.28 \cdot 10^{+64}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 7
Accuracy46.5%
Cost14632
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.38 \cdot 10^{+38}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.9 \cdot 10^{-7}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -1 \cdot 10^{-27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -2.25 \cdot 10^{-109}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -5.8 \cdot 10^{-157}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -2.5 \cdot 10^{-203}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-289}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 7.5 \cdot 10^{-221}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-162}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{+69}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 8
Accuracy60.0%
Cost14365
\[\begin{array}{l} t_0 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_2 := \frac{\frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{0.005555555555555556}}{\pi}\\ \mathbf{if}\;B \leq -5.9 \cdot 10^{-49}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -1.72 \cdot 10^{-71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -3.3 \cdot 10^{-105}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -5.2 \cdot 10^{-159}:\\ \;\;\;\;\frac{180 \cdot t_0}{\pi}\\ \mathbf{elif}\;B \leq -8.1 \cdot 10^{-199}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{-286} \lor \neg \left(B \leq 2.3 \cdot 10^{-217}\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{t_0}{\pi}\\ \end{array} \]
Alternative 9
Accuracy62.8%
Cost14365
\[\begin{array}{l} t_0 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_2 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)\\ \mathbf{if}\;B \leq -6.7 \cdot 10^{-49}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -1.18 \cdot 10^{-67}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -9.2 \cdot 10^{-110}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -2.5 \cdot 10^{-160}:\\ \;\;\;\;\frac{180 \cdot t_0}{\pi}\\ \mathbf{elif}\;B \leq -5.8 \cdot 10^{-202}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{-286} \lor \neg \left(B \leq 1.22 \cdot 10^{-217}\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{t_0}{\pi}\\ \end{array} \]
Alternative 10
Accuracy58.2%
Cost13972
\[\begin{array}{l} t_0 := \frac{\frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{0.005555555555555556}}{\pi}\\ \mathbf{if}\;A \leq -1.92 \cdot 10^{-47}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\ \mathbf{elif}\;A \leq -7.4 \cdot 10^{-57}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -2 \cdot 10^{-105}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{elif}\;A \leq -4.4 \cdot 10^{-185}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.4 \cdot 10^{-103}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 11
Accuracy56.6%
Cost13840
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \mathbf{if}\;C \leq -5.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{elif}\;C \leq -4 \cdot 10^{-285}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 7.2 \cdot 10^{-156}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\ \mathbf{elif}\;C \leq 850000000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
Alternative 12
Accuracy56.6%
Cost13840
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \mathbf{if}\;C \leq -1.1 \cdot 10^{-25}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{elif}\;C \leq -3.7 \cdot 10^{-285}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 7.2 \cdot 10^{-156}:\\ \;\;\;\;\frac{\frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{0.005555555555555556}}{\pi}\\ \mathbf{elif}\;C \leq 230000000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
Alternative 13
Accuracy46.9%
Cost13708
\[\begin{array}{l} \mathbf{if}\;C \leq -6.3 \cdot 10^{-24}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;C \leq -1.95 \cdot 10^{-292}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.2 \cdot 10^{-20}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
Alternative 14
Accuracy46.2%
Cost13512
\[\begin{array}{l} \mathbf{if}\;B \leq -2.7 \cdot 10^{+41}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 4 \cdot 10^{-57}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 15
Accuracy46.5%
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -8.5 \cdot 10^{+61}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-15}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 16
Accuracy40.0%
Cost13188
\[\begin{array}{l} \mathbf{if}\;B \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 17
Accuracy21.0%
Cost13056
\[\frac{180 \cdot \tan^{-1} -1}{\pi} \]

Error

Reproduce?

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