?

Average Error: 46.01% → 17.47%
Time: 22.1s
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)\\ \mathbf{if}\;t_0 \leq -4 \cdot 10^{-9}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}}\right)}{\pi}\\ \mathbf{elif}\;t_0 \leq 0:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B \cdot C}{A \cdot A} + \frac{B}{A}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\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)))))))
   (if (<= t_0 -4e-9)
     (/ (* 180.0 (atan (/ 1.0 (/ B (- (- C A) (hypot (- A C) B)))))) PI)
     (if (<= t_0 0.0)
       (* 180.0 (/ (atan (* 0.5 (+ (/ (* B C) (* A A)) (/ B A)))) PI))
       (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) 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 tmp;
	if (t_0 <= -4e-9) {
		tmp = (180.0 * atan((1.0 / (B / ((C - A) - hypot((A - C), B)))))) / ((double) M_PI);
	} else if (t_0 <= 0.0) {
		tmp = 180.0 * (atan((0.5 * (((B * C) / (A * A)) + (B / A)))) / ((double) M_PI));
	} else {
		tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((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 tmp;
	if (t_0 <= -4e-9) {
		tmp = (180.0 * Math.atan((1.0 / (B / ((C - A) - Math.hypot((A - C), B)))))) / Math.PI;
	} else if (t_0 <= 0.0) {
		tmp = 180.0 * (Math.atan((0.5 * (((B * C) / (A * A)) + (B / A)))) / Math.PI);
	} else {
		tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / 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))))
	tmp = 0
	if t_0 <= -4e-9:
		tmp = (180.0 * math.atan((1.0 / (B / ((C - A) - math.hypot((A - C), B)))))) / math.pi
	elif t_0 <= 0.0:
		tmp = 180.0 * (math.atan((0.5 * (((B * C) / (A * A)) + (B / A)))) / math.pi)
	else:
		tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / 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)))))
	tmp = 0.0
	if (t_0 <= -4e-9)
		tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(B / Float64(Float64(C - A) - hypot(Float64(A - C), B)))))) / pi);
	elseif (t_0 <= 0.0)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(Float64(B * C) / Float64(A * A)) + Float64(B / A)))) / pi));
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / 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))));
	tmp = 0.0;
	if (t_0 <= -4e-9)
		tmp = (180.0 * atan((1.0 / (B / ((C - A) - hypot((A - C), B)))))) / pi;
	elseif (t_0 <= 0.0)
		tmp = 180.0 * (atan((0.5 * (((B * C) / (A * A)) + (B / A)))) / pi);
	else
		tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / 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]}, If[LessEqual[t$95$0, -4e-9], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(B / N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(N[(B * C), $MachinePrecision] / N[(A * A), $MachinePrecision]), $MachinePrecision] + N[(B / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $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]]]]
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 -4 \cdot 10^{-9}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}}\right)}{\pi}\\

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

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\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))))) < -4.00000000000000025e-9

    1. Initial program 39.69

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

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

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

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

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

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

      \[ \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. Applied egg-rr11.84

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

    if -4.00000000000000025e-9 < (*.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 81.51

      \[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. Simplified80.64

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

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

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

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

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

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

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

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

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

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

      [Start]49.83

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

      distribute-lft-out [=>]49.83

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

      *-commutative [=>]49.83

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

      unpow2 [=>]49.83

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

    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 41.17

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

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

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

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

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

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

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

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

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

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

Alternatives

Alternative 1
Error32.72%
Cost20368
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\ t_1 := \frac{C - A}{B}\\ \mathbf{if}\;B \leq -1.5 \cdot 10^{-115}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_1\right)}{\pi}\\ \mathbf{elif}\;B \leq -6.6 \cdot 10^{-196}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -4.8 \cdot 10^{-262}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B \cdot C}{A \cdot A} + \frac{B}{A}\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.4 \cdot 10^{-127}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(t_1 + -1\right)}{\pi}\\ \end{array} \]
Alternative 2
Error26.17%
Cost20232
\[\begin{array}{l} \mathbf{if}\;A \leq -2.1 \cdot 10^{+148}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 10^{-174}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - \frac{\mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\mathsf{hypot}\left(A, B\right)}{-B} - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 3
Error26.14%
Cost20168
\[\begin{array}{l} \mathbf{if}\;A \leq -2.3 \cdot 10^{+144}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 10^{-174}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - \frac{\mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\ \end{array} \]
Alternative 4
Error18.84%
Cost20164
\[\begin{array}{l} \mathbf{if}\;A \leq -2.8 \cdot 10^{+157}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\ \end{array} \]
Alternative 5
Error18.83%
Cost20164
\[\begin{array}{l} \mathbf{if}\;A \leq -3.5 \cdot 10^{+160}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}}\\ \end{array} \]
Alternative 6
Error47.18%
Cost14437
\[\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(1 + \frac{C}{B}\right)}{\pi}\\ t_2 := \frac{180 \cdot \tan^{-1} -1}{\pi}\\ \mathbf{if}\;A \leq -9 \cdot 10^{+107}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -5.1 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -8.2 \cdot 10^{-70}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.1 \cdot 10^{-260}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.8 \cdot 10^{-213}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq 9.6 \cdot 10^{-175}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 2.3 \cdot 10^{-135}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq 7.4 \cdot 10^{-122} \lor \neg \left(A \leq 1.4 \cdot 10^{-92}\right):\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \end{array} \]
Alternative 7
Error47.12%
Cost14437
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ t_1 := \frac{180 \cdot \tan^{-1} -1}{\pi}\\ t_2 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{if}\;A \leq -8.8 \cdot 10^{+107}:\\ \;\;\;\;\frac{180 \cdot t_2}{\pi}\\ \mathbf{elif}\;A \leq -5.1 \cdot 10^{+69}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -7 \cdot 10^{-69}:\\ \;\;\;\;180 \cdot \frac{t_2}{\pi}\\ \mathbf{elif}\;A \leq 7 \cdot 10^{-261}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 4.5 \cdot 10^{-213}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 10^{-174}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.02 \cdot 10^{-137}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.55 \cdot 10^{-123} \lor \neg \left(A \leq 5.4 \cdot 10^{-94}\right):\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \end{array} \]
Alternative 8
Error62.11%
Cost14304
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} -1}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;A \leq -3.6 \cdot 10^{+86}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{elif}\;A \leq -2.9 \cdot 10^{-56}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -2.1 \cdot 10^{-200}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq -4.8 \cdot 10^{-226}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 4.4 \cdot 10^{-261}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 3.7 \cdot 10^{-211}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.5 \cdot 10^{-175}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 3.7 \cdot 10^{-135}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 9
Error42.88%
Cost14236
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ t_1 := \frac{180 \cdot \tan^{-1} -1}{\pi}\\ t_2 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{if}\;A \leq -1.4 \cdot 10^{+108}:\\ \;\;\;\;\frac{180 \cdot t_2}{\pi}\\ \mathbf{elif}\;A \leq -5.1 \cdot 10^{+69}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -1.15 \cdot 10^{-65}:\\ \;\;\;\;180 \cdot \frac{t_2}{\pi}\\ \mathbf{elif}\;A \leq 8.5 \cdot 10^{-261}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.45 \cdot 10^{-211}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 9.6 \cdot 10^{-175}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.95 \cdot 10^{-138}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 10
Error40%
Cost14232
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ t_2 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{if}\;A \leq -5.4 \cdot 10^{+108}:\\ \;\;\;\;\frac{180 \cdot t_2}{\pi}\\ \mathbf{elif}\;A \leq -4.6 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -7.7 \cdot 10^{+59}:\\ \;\;\;\;180 \cdot \frac{t_2}{\pi}\\ \mathbf{elif}\;A \leq -1.85 \cdot 10^{-56}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -3.8 \cdot 10^{-80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 3.25 \cdot 10^{-136}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 11
Error41.38%
Cost14104
\[\begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ t_2 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{if}\;A \leq -8.8 \cdot 10^{+107}:\\ \;\;\;\;\frac{180 \cdot t_2}{\pi}\\ \mathbf{elif}\;A \leq -5 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -5.8 \cdot 10^{+60}:\\ \;\;\;\;180 \cdot \frac{t_2}{\pi}\\ \mathbf{elif}\;A \leq -1.75 \cdot 10^{-56}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -3.1 \cdot 10^{-80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 4.1 \cdot 10^{-135}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 12
Error34.15%
Cost14088
\[\begin{array}{l} t_0 := \frac{C - A}{B}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\ \mathbf{if}\;B \leq -5.3 \cdot 10^{-196}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -4.5 \cdot 10^{-264}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B \cdot C}{A \cdot A} + \frac{B}{A}\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-284}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(t_0 + -1\right)}{\pi}\\ \end{array} \]
Alternative 13
Error51.85%
Cost14040
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ t_1 := \frac{180 \cdot \tan^{-1} -1}{\pi}\\ \mathbf{if}\;A \leq -2.7 \cdot 10^{-71}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -5.5 \cdot 10^{-200}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq -3.05 \cdot 10^{-285}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.02 \cdot 10^{-212}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 9.6 \cdot 10^{-175}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-136}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 14
Error33.49%
Cost13572
\[\begin{array}{l} t_0 := \frac{C - A}{B}\\ \mathbf{if}\;B \leq 5 \cdot 10^{-165}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(t_0 + -1\right)}{\pi}\\ \end{array} \]
Alternative 15
Error52.05%
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -3.1 \cdot 10^{-64}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 75000000000000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 16
Error52.02%
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -1.8 \cdot 10^{-53}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 4.5 \cdot 10^{+14}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 17
Error55.07%
Cost13320
\[\begin{array}{l} \mathbf{if}\;B \leq -1.4 \cdot 10^{-120}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-130}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 18
Error70.86%
Cost13188
\[\begin{array}{l} \mathbf{if}\;B \leq 3.7 \cdot 10^{-130}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 19
Error79.05%
Cost13056
\[\frac{180 \cdot \tan^{-1} -1}{\pi} \]

Error

Reproduce?

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