?

Average Error: 29.5 → 22.9
Time: 18.4s
Precision: binary64
Cost: 33944

?

\[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 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{C \cdot B}{{A}^{2}} + 0.5 \cdot \frac{B}{A}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)}{\pi}\\ \mathbf{if}\;B \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2 \cdot 10^{-252}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 3.2 \cdot 10^{-264}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot 0\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.15 \cdot 10^{-208}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 6.4 \cdot 10^{-187}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 740000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\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
         (*
          180.0
          (/ (atan (+ (* 0.5 (/ (* C B) (pow A 2.0))) (* 0.5 (/ B A)))) PI)))
        (t_1
         (*
          180.0
          (/
           (atan
            (* (/ 1.0 B) (- C (+ A (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
           PI))))
   (if (<= B -1.35e+154)
     (* 180.0 (/ (atan (- (+ 1.0 (/ C B)) (/ A B))) PI))
     (if (<= B -2e-252)
       t_1
       (if (<= B 3.2e-264)
         (* 180.0 (/ (atan (* (/ 1.0 B) 0.0)) PI))
         (if (<= B 3.15e-208)
           t_1
           (if (<= B 6.4e-187)
             t_0
             (if (<= B 6.5e-95)
               t_1
               (if (<= B 740000000.0)
                 t_0
                 (* 180.0 (/ (atan (- (/ C B) (+ 1.0 (/ A 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 = 180.0 * (atan(((0.5 * ((C * B) / pow(A, 2.0))) + (0.5 * (B / A)))) / ((double) M_PI));
	double t_1 = 180.0 * (atan(((1.0 / B) * (C - (A + sqrt((pow((A - C), 2.0) + pow(B, 2.0))))))) / ((double) M_PI));
	double tmp;
	if (B <= -1.35e+154) {
		tmp = 180.0 * (atan(((1.0 + (C / B)) - (A / B))) / ((double) M_PI));
	} else if (B <= -2e-252) {
		tmp = t_1;
	} else if (B <= 3.2e-264) {
		tmp = 180.0 * (atan(((1.0 / B) * 0.0)) / ((double) M_PI));
	} else if (B <= 3.15e-208) {
		tmp = t_1;
	} else if (B <= 6.4e-187) {
		tmp = t_0;
	} else if (B <= 6.5e-95) {
		tmp = t_1;
	} else if (B <= 740000000.0) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (atan(((C / B) - (1.0 + (A / 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 = 180.0 * (Math.atan(((0.5 * ((C * B) / Math.pow(A, 2.0))) + (0.5 * (B / A)))) / Math.PI);
	double t_1 = 180.0 * (Math.atan(((1.0 / B) * (C - (A + Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))))))) / Math.PI);
	double tmp;
	if (B <= -1.35e+154) {
		tmp = 180.0 * (Math.atan(((1.0 + (C / B)) - (A / B))) / Math.PI);
	} else if (B <= -2e-252) {
		tmp = t_1;
	} else if (B <= 3.2e-264) {
		tmp = 180.0 * (Math.atan(((1.0 / B) * 0.0)) / Math.PI);
	} else if (B <= 3.15e-208) {
		tmp = t_1;
	} else if (B <= 6.4e-187) {
		tmp = t_0;
	} else if (B <= 6.5e-95) {
		tmp = t_1;
	} else if (B <= 740000000.0) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (Math.atan(((C / B) - (1.0 + (A / 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 = 180.0 * (math.atan(((0.5 * ((C * B) / math.pow(A, 2.0))) + (0.5 * (B / A)))) / math.pi)
	t_1 = 180.0 * (math.atan(((1.0 / B) * (C - (A + math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0))))))) / math.pi)
	tmp = 0
	if B <= -1.35e+154:
		tmp = 180.0 * (math.atan(((1.0 + (C / B)) - (A / B))) / math.pi)
	elif B <= -2e-252:
		tmp = t_1
	elif B <= 3.2e-264:
		tmp = 180.0 * (math.atan(((1.0 / B) * 0.0)) / math.pi)
	elif B <= 3.15e-208:
		tmp = t_1
	elif B <= 6.4e-187:
		tmp = t_0
	elif B <= 6.5e-95:
		tmp = t_1
	elif B <= 740000000.0:
		tmp = t_0
	else:
		tmp = 180.0 * (math.atan(((C / B) - (1.0 + (A / 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(180.0 * Float64(atan(Float64(Float64(0.5 * Float64(Float64(C * B) / (A ^ 2.0))) + Float64(0.5 * Float64(B / A)))) / pi))
	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(C - Float64(A + sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / pi))
	tmp = 0.0
	if (B <= -1.35e+154)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 + Float64(C / B)) - Float64(A / B))) / pi));
	elseif (B <= -2e-252)
		tmp = t_1;
	elseif (B <= 3.2e-264)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * 0.0)) / pi));
	elseif (B <= 3.15e-208)
		tmp = t_1;
	elseif (B <= 6.4e-187)
		tmp = t_0;
	elseif (B <= 6.5e-95)
		tmp = t_1;
	elseif (B <= 740000000.0)
		tmp = t_0;
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) - Float64(1.0 + Float64(A / 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 = 180.0 * (atan(((0.5 * ((C * B) / (A ^ 2.0))) + (0.5 * (B / A)))) / pi);
	t_1 = 180.0 * (atan(((1.0 / B) * (C - (A + sqrt((((A - C) ^ 2.0) + (B ^ 2.0))))))) / pi);
	tmp = 0.0;
	if (B <= -1.35e+154)
		tmp = 180.0 * (atan(((1.0 + (C / B)) - (A / B))) / pi);
	elseif (B <= -2e-252)
		tmp = t_1;
	elseif (B <= 3.2e-264)
		tmp = 180.0 * (atan(((1.0 / B) * 0.0)) / pi);
	elseif (B <= 3.15e-208)
		tmp = t_1;
	elseif (B <= 6.4e-187)
		tmp = t_0;
	elseif (B <= 6.5e-95)
		tmp = t_1;
	elseif (B <= 740000000.0)
		tmp = t_0;
	else
		tmp = 180.0 * (atan(((C / B) - (1.0 + (A / 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[(180.0 * N[(N[ArcTan[N[(N[(0.5 * N[(N[(C * B), $MachinePrecision] / N[Power[A, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(C - N[(A + N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.35e+154], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision] - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2e-252], t$95$1, If[LessEqual[B, 3.2e-264], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * 0.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.15e-208], t$95$1, If[LessEqual[B, 6.4e-187], t$95$0, If[LessEqual[B, 6.5e-95], t$95$1, If[LessEqual[B, 740000000.0], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] - N[(1.0 + N[(A / B), $MachinePrecision]), $MachinePrecision]), $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 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{C \cdot B}{{A}^{2}} + 0.5 \cdot \frac{B}{A}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)}{\pi}\\
\mathbf{if}\;B \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\

\mathbf{elif}\;B \leq -2 \cdot 10^{-252}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;B \leq 3.2 \cdot 10^{-264}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot 0\right)}{\pi}\\

\mathbf{elif}\;B \leq 3.15 \cdot 10^{-208}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;B \leq 6.4 \cdot 10^{-187}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;B \leq 6.5 \cdot 10^{-95}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;B \leq 740000000:\\
\;\;\;\;t_0\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 5 regimes
  2. if B < -1.35000000000000003e154

    1. Initial program 46.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. Simplified46.9

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

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

      rational.json-simplify-32 [=>]46.9

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

      rational.json-simplify-39 [<=]46.9

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

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

    if -1.35000000000000003e154 < B < -1.99999999999999989e-252 or 3.19999999999999995e-264 < B < 3.14999999999999996e-208 or 6.3999999999999997e-187 < B < 6.49999999999999985e-95

    1. Initial program 24.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. Simplified25.6

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

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

      rational.json-simplify-32 [=>]25.5

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

      rational.json-simplify-39 [<=]25.6

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

    if -1.99999999999999989e-252 < B < 3.19999999999999995e-264

    1. Initial program 21.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. Simplified25.2

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

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

      rational.json-simplify-32 [=>]25.5

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

      rational.json-simplify-39 [<=]25.2

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

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

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

      [Start]41.2

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

      rational.json-simplify-2 [=>]41.2

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

      rational.json-simplify-19 [=>]41.2

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

      metadata-eval [=>]41.2

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

      rational.json-simplify-2 [=>]41.2

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

      rational.json-simplify-11 [=>]41.2

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

      metadata-eval [=>]41.2

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

    if 3.14999999999999996e-208 < B < 6.3999999999999997e-187 or 6.49999999999999985e-95 < B < 7.4e8

    1. Initial program 25.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. Simplified25.9

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

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

      rational.json-simplify-32 [=>]25.9

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

      rational.json-simplify-39 [<=]25.9

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

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

    if 7.4e8 < B

    1. Initial program 33.4

      \[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. Simplified33.4

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

      [Start]33.4

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

      rational.json-simplify-32 [=>]33.4

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

      rational.json-simplify-39 [<=]33.4

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}}{\pi} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification22.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2 \cdot 10^{-252}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.2 \cdot 10^{-264}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot 0\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.15 \cdot 10^{-208}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq 6.4 \cdot 10^{-187}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{C \cdot B}{{A}^{2}} + 0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-95}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq 740000000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{C \cdot B}{{A}^{2}} + 0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]

Alternatives

Alternative 1
Error21.1
Cost33680
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{C \cdot B}{{A}^{2}} + 0.5 \cdot \frac{B}{A}\right)}{\pi}\\ t_1 := \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\\ \mathbf{if}\;B \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.55 \cdot 10^{-209}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - t_1\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.92 \cdot 10^{-187}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-96}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + t_1\right)\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq 430000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]
Alternative 2
Error24.5
Cost33292
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{C \cdot B}{{A}^{2}} + 0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{if}\;B \leq -4.1 \cdot 10^{-194}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.08 \cdot 10^{-187}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 7.6 \cdot 10^{-95}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 \cdot \frac{A + \sqrt{{B}^{2} + {A}^{2}}}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3700000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]
Alternative 3
Error23.9
Cost20816
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{C \cdot B}{{A}^{2}} + 0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{if}\;B \leq -2.55 \cdot 10^{-194}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 8.4 \cdot 10^{-187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-97}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 30000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error24.3
Cost20564
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}{\pi}\\ \mathbf{if}\;B \leq -1.25 \cdot 10^{-197}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.15 \cdot 10^{-265}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot 0\right)}{\pi}\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-97}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{-47}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.05 \cdot 10^{-13}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \frac{{B}^{2}}{C}}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error33.7
Cost14500
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ t_3 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{if}\;A \leq -7.2 \cdot 10^{-75}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -6.2 \cdot 10^{-198}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -6.5 \cdot 10^{-274}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.3 \cdot 10^{-239}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq 1.8 \cdot 10^{-116}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.3 \cdot 10^{-76}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq 10^{-30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq 8 \cdot 10^{-15}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq 4.2 \cdot 10^{+28}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error33.7
Cost14500
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ t_3 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{if}\;A \leq -3.6 \cdot 10^{-73}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -6.2 \cdot 10^{-201}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -1.8 \cdot 10^{-273}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.5 \cdot 10^{-239}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq 2.4 \cdot 10^{-115}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.9 \cdot 10^{-77}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq 6 \cdot 10^{-34}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq 7.4 \cdot 10^{-15}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq 4.2 \cdot 10^{+28}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error25.1
Cost14360
\[\begin{array}{l} t_0 := 1 + \frac{C}{B}\\ t_1 := 180 \cdot \frac{\tan^{-1} t_0}{\pi}\\ \mathbf{if}\;A \leq -2.2 \cdot 10^{-7}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.08 \cdot 10^{-76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -2.7 \cdot 10^{-274}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5.8 \cdot 10^{-240}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.1 \cdot 10^{-115}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.8 \cdot 10^{+41}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_0 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(-1 + \frac{-A}{B}\right)}{\pi} \cdot 180\\ \end{array} \]
Alternative 8
Error25.7
Cost14168
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{if}\;A \leq -1.02 \cdot 10^{-5}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.6 \cdot 10^{-75}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -1.55 \cdot 10^{-274}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 2.5 \cdot 10^{-240}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.2 \cdot 10^{-115}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 6 \cdot 10^{-83}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(-1 + \frac{-A}{B}\right)}{\pi} \cdot 180\\ \end{array} \]
Alternative 9
Error27.5
Cost14104
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{if}\;A \leq -9.4 \cdot 10^{-7}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -3.7 \cdot 10^{-72}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -1.5 \cdot 10^{-273}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-243}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.02 \cdot 10^{-116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 4.8 \cdot 10^{+41}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 10
Error25.8
Cost14104
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{if}\;A \leq -8.8 \cdot 10^{-6}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -6.2 \cdot 10^{-74}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -2.45 \cdot 10^{-273}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 3.2 \cdot 10^{-241}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{-115}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 3.7 \cdot 10^{-101}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi} \cdot 180\\ \end{array} \]
Alternative 11
Error25.2
Cost14096
\[\begin{array}{l} t_0 := 1 + \frac{C}{B}\\ \mathbf{if}\;A \leq -5.5 \cdot 10^{-7}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -8.8 \cdot 10^{-78}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} t_0}{\pi}\\ \mathbf{elif}\;A \leq -3.35 \cdot 10^{-273}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.5 \cdot 10^{+41}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_0 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(-1 + \frac{-A}{B}\right)}{\pi} \cdot 180\\ \end{array} \]
Alternative 12
Error28.5
Cost13840
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;A \leq -1.75 \cdot 10^{-6}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.2 \cdot 10^{-72}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -6.5 \cdot 10^{-139}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 2.05 \cdot 10^{+41}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 13
Error34.0
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -2.8 \cdot 10^{-126}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-42}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 14
Error38.1
Cost13188
\[\begin{array}{l} \mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 15
Error50.1
Cost13056
\[180 \cdot \frac{\tan^{-1} -1}{\pi} \]

Error

Reproduce?

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