?

Average Error: 29.6 → 22.2
Time: 31.9s
Precision: binary64
Cost: 34076

?

\[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(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(B \cdot \frac{C}{{A}^{2}} + \frac{B}{A}\right)\right)}{\pi}\\ t_2 := 1 + \frac{C}{B}\\ \mathbf{if}\;B \leq -3 \cdot 10^{-208}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_2 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -8.2 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-276}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-273}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A + \left(-A\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.26 \cdot 10^{-179}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 6.2 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{+134}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_2 + \left(-2 - \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
            (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
           PI)))
        (t_1
         (* 180.0 (/ (atan (* 0.5 (+ (* B (/ C (pow A 2.0))) (/ B A)))) PI)))
        (t_2 (+ 1.0 (/ C B))))
   (if (<= B -3e-208)
     (* 180.0 (/ (atan (- t_2 (/ A B))) PI))
     (if (<= B -8.2e-305)
       t_1
       (if (<= B 7e-276)
         t_0
         (if (<= B 8.5e-273)
           (* 180.0 (/ (atan (- (/ (+ A (- A)) B))) PI))
           (if (<= B 1.26e-179)
             t_0
             (if (<= B 6.2e-95)
               t_1
               (if (<= B 3.5e+134)
                 t_0
                 (* 180.0 (/ (atan (+ t_2 (- -2.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(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
	double t_1 = 180.0 * (atan((0.5 * ((B * (C / pow(A, 2.0))) + (B / A)))) / ((double) M_PI));
	double t_2 = 1.0 + (C / B);
	double tmp;
	if (B <= -3e-208) {
		tmp = 180.0 * (atan((t_2 - (A / B))) / ((double) M_PI));
	} else if (B <= -8.2e-305) {
		tmp = t_1;
	} else if (B <= 7e-276) {
		tmp = t_0;
	} else if (B <= 8.5e-273) {
		tmp = 180.0 * (atan(-((A + -A) / B)) / ((double) M_PI));
	} else if (B <= 1.26e-179) {
		tmp = t_0;
	} else if (B <= 6.2e-95) {
		tmp = t_1;
	} else if (B <= 3.5e+134) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (atan((t_2 + (-2.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(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
	double t_1 = 180.0 * (Math.atan((0.5 * ((B * (C / Math.pow(A, 2.0))) + (B / A)))) / Math.PI);
	double t_2 = 1.0 + (C / B);
	double tmp;
	if (B <= -3e-208) {
		tmp = 180.0 * (Math.atan((t_2 - (A / B))) / Math.PI);
	} else if (B <= -8.2e-305) {
		tmp = t_1;
	} else if (B <= 7e-276) {
		tmp = t_0;
	} else if (B <= 8.5e-273) {
		tmp = 180.0 * (Math.atan(-((A + -A) / B)) / Math.PI);
	} else if (B <= 1.26e-179) {
		tmp = t_0;
	} else if (B <= 6.2e-95) {
		tmp = t_1;
	} else if (B <= 3.5e+134) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (Math.atan((t_2 + (-2.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(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
	t_1 = 180.0 * (math.atan((0.5 * ((B * (C / math.pow(A, 2.0))) + (B / A)))) / math.pi)
	t_2 = 1.0 + (C / B)
	tmp = 0
	if B <= -3e-208:
		tmp = 180.0 * (math.atan((t_2 - (A / B))) / math.pi)
	elif B <= -8.2e-305:
		tmp = t_1
	elif B <= 7e-276:
		tmp = t_0
	elif B <= 8.5e-273:
		tmp = 180.0 * (math.atan(-((A + -A) / B)) / math.pi)
	elif B <= 1.26e-179:
		tmp = t_0
	elif B <= 6.2e-95:
		tmp = t_1
	elif B <= 3.5e+134:
		tmp = t_0
	else:
		tmp = 180.0 * (math.atan((t_2 + (-2.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(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi))
	t_1 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B * Float64(C / (A ^ 2.0))) + Float64(B / A)))) / pi))
	t_2 = Float64(1.0 + Float64(C / B))
	tmp = 0.0
	if (B <= -3e-208)
		tmp = Float64(180.0 * Float64(atan(Float64(t_2 - Float64(A / B))) / pi));
	elseif (B <= -8.2e-305)
		tmp = t_1;
	elseif (B <= 7e-276)
		tmp = t_0;
	elseif (B <= 8.5e-273)
		tmp = Float64(180.0 * Float64(atan(Float64(-Float64(Float64(A + Float64(-A)) / B))) / pi));
	elseif (B <= 1.26e-179)
		tmp = t_0;
	elseif (B <= 6.2e-95)
		tmp = t_1;
	elseif (B <= 3.5e+134)
		tmp = t_0;
	else
		tmp = Float64(180.0 * Float64(atan(Float64(t_2 + Float64(-2.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(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi);
	t_1 = 180.0 * (atan((0.5 * ((B * (C / (A ^ 2.0))) + (B / A)))) / pi);
	t_2 = 1.0 + (C / B);
	tmp = 0.0;
	if (B <= -3e-208)
		tmp = 180.0 * (atan((t_2 - (A / B))) / pi);
	elseif (B <= -8.2e-305)
		tmp = t_1;
	elseif (B <= 7e-276)
		tmp = t_0;
	elseif (B <= 8.5e-273)
		tmp = 180.0 * (atan(-((A + -A) / B)) / pi);
	elseif (B <= 1.26e-179)
		tmp = t_0;
	elseif (B <= 6.2e-95)
		tmp = t_1;
	elseif (B <= 3.5e+134)
		tmp = t_0;
	else
		tmp = 180.0 * (atan((t_2 + (-2.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[(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]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B * N[(C / N[Power[A, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(B / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3e-208], N[(180.0 * N[(N[ArcTan[N[(t$95$2 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.2e-305], t$95$1, If[LessEqual[B, 7e-276], t$95$0, If[LessEqual[B, 8.5e-273], N[(180.0 * N[(N[ArcTan[(-N[(N[(A + (-A)), $MachinePrecision] / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.26e-179], t$95$0, If[LessEqual[B, 6.2e-95], t$95$1, If[LessEqual[B, 3.5e+134], t$95$0, N[(180.0 * N[(N[ArcTan[N[(t$95$2 + N[(-2.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(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(B \cdot \frac{C}{{A}^{2}} + \frac{B}{A}\right)\right)}{\pi}\\
t_2 := 1 + \frac{C}{B}\\
\mathbf{if}\;B \leq -3 \cdot 10^{-208}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_2 - \frac{A}{B}\right)}{\pi}\\

\mathbf{elif}\;B \leq -8.2 \cdot 10^{-305}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;B \leq 7 \cdot 10^{-276}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;B \leq 8.5 \cdot 10^{-273}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A + \left(-A\right)}{B}\right)}{\pi}\\

\mathbf{elif}\;B \leq 1.26 \cdot 10^{-179}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;B \leq 3.5 \cdot 10^{+134}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_2 + \left(-2 - \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 < -2.99999999999999986e-208

    1. Initial program 30.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. Taylor expanded in B around -inf 20.1

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

    if -2.99999999999999986e-208 < B < -8.2000000000000005e-305 or 1.2599999999999999e-179 < B < 6.19999999999999983e-95

    1. Initial program 27.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. Taylor expanded in A around -inf 38.8

      \[\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} \]
    3. Simplified37.8

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

      [Start]38.8

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

      rational.json-simplify-1 [=>]38.8

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

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

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

      rational.json-simplify-51 [=>]38.8

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

      rational.json-simplify-49 [=>]37.8

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

    if -8.2000000000000005e-305 < B < 6.99999999999999986e-276 or 8.5000000000000008e-273 < B < 1.2599999999999999e-179 or 6.19999999999999983e-95 < B < 3.50000000000000003e134

    1. Initial program 23.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} \]

    if 6.99999999999999986e-276 < B < 8.5000000000000008e-273

    1. Initial program 23.3

      \[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. Taylor expanded in C around inf 43.9

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

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

      [Start]43.9

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

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

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

      rational.json-simplify-9 [=>]43.9

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

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

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

      rational.json-simplify-8 [<=]43.9

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

    if 3.50000000000000003e134 < B

    1. Initial program 43.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. Taylor expanded in B around inf 9.1

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

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

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

      [Start]9.1

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

      rational.json-simplify-1 [=>]9.1

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

      rational.json-simplify-10 [=>]9.1

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

      rational.json-simplify-44 [=>]9.1

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

      rational.json-simplify-10 [<=]9.1

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

      rational.json-simplify-12 [=>]9.1

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

      rational.json-simplify-45 [=>]9.1

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

      metadata-eval [=>]9.1

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

      rational.json-simplify-18 [=>]9.1

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

      metadata-eval [<=]9.1

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

      rational.json-simplify-42 [<=]9.1

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

      rational.json-simplify-17 [=>]9.1

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

      rational.json-simplify-45 [=>]9.1

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

      rational.json-simplify-5 [=>]9.1

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

      rational.json-simplify-42 [=>]9.1

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

      metadata-eval [=>]9.1

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3 \cdot 10^{-208}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -8.2 \cdot 10^{-305}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(B \cdot \frac{C}{{A}^{2}} + \frac{B}{A}\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-276}:\\ \;\;\;\;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}\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-273}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A + \left(-A\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.26 \cdot 10^{-179}:\\ \;\;\;\;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}\\ \mathbf{elif}\;B \leq 6.2 \cdot 10^{-95}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(B \cdot \frac{C}{{A}^{2}} + \frac{B}{A}\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{+134}:\\ \;\;\;\;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}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) + \left(-2 - \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]

Alternatives

Alternative 1
Error23.0
Cost20940
\[\begin{array}{l} \mathbf{if}\;B \leq -4 \cdot 10^{-264}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.15 \cdot 10^{-303}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6.2 \cdot 10^{-176}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \left(0.5 \cdot \frac{{\left(A - C\right)}^{2}}{B} + B\right)\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-95}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(B \cdot \frac{C}{{A}^{2}} + \frac{B}{A}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]
Alternative 2
Error23.4
Cost20688
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.12 \cdot 10^{-264}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{-297}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-176}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-95}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(B \cdot \frac{C}{{A}^{2}} + \frac{B}{A}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]
Alternative 3
Error27.0
Cost14236
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi}\\ \mathbf{if}\;A \leq -1.5 \cdot 10^{-20}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.7 \cdot 10^{-74}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 6.2 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 3.15 \cdot 10^{-229}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 3.4 \cdot 10^{-33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.55 \cdot 10^{+17}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2 \cdot 10^{+122}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error26.9
Cost14236
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi}\\ \mathbf{if}\;A \leq -2 \cdot 10^{-22}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.2 \cdot 10^{-68}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 6.2 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 3.3 \cdot 10^{-230}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 245000000000:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 3 \cdot 10^{+135}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error25.7
Cost14104
\[\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(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ t_2 := \tan^{-1} \left(\frac{C}{B} - 1\right)\\ \mathbf{if}\;B \leq -6.3 \cdot 10^{-263}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-297}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-181}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.22 \cdot 10^{-95}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-62}:\\ \;\;\;\;180 \cdot \frac{t_2}{\pi}\\ \mathbf{elif}\;B \leq 4.1 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot t_2}{\pi}\\ \end{array} \]
Alternative 6
Error34.6
Cost13972
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.1 \cdot 10^{-19}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -8.8 \cdot 10^{-264}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{-255}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-178}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.18 \cdot 10^{-88}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 7
Error34.6
Cost13972
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{if}\;B \leq -9.8 \cdot 10^{-23}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -9.4 \cdot 10^{-262}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.42 \cdot 10^{-255}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.9 \cdot 10^{-181}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.22 \cdot 10^{-85}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 8
Error26.9
Cost13972
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi}\\ \mathbf{if}\;A \leq -4.2 \cdot 10^{-22}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.7 \cdot 10^{-68}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 5.3 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 8.2 \cdot 10^{-230}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 8 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 9
Error30.6
Cost13840
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{if}\;A \leq -2 \cdot 10^{-22}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.9 \cdot 10^{-75}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -8.5 \cdot 10^{-261}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 6.8 \cdot 10^{-244}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 10
Error22.9
Cost13832
\[\begin{array}{l} \mathbf{if}\;B \leq -1.95 \cdot 10^{-260}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.15 \cdot 10^{-303}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(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} \]
Alternative 11
Error22.8
Cost13832
\[\begin{array}{l} \mathbf{if}\;B \leq -1.15 \cdot 10^{-264}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.9 \cdot 10^{-299}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]
Alternative 12
Error34.5
Cost13576
\[\begin{array}{l} \mathbf{if}\;B \leq -2.6 \cdot 10^{-99}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 6.6 \cdot 10^{-116}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 13
Error34.5
Cost13512
\[\begin{array}{l} \mathbf{if}\;B \leq -3 \cdot 10^{-99}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 2.25 \cdot 10^{-119}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 14
Error34.6
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -1.3 \cdot 10^{-19}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.45 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 15
Error38.9
Cost13188
\[\begin{array}{l} \mathbf{if}\;B \leq -8.8 \cdot 10^{-305}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 16
Error50.9
Cost13056
\[180 \cdot \frac{\tan^{-1} -1}{\pi} \]

Error

Reproduce?

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