ABCF->ab-angle angle

Percentage Accurate: 55.1% → 80.8%
Time: 18.6s
Alternatives: 17
Speedup: 2.4×

Specification

?
\[\begin{array}{l} \\ 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} \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)))
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));
}
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);
}
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)
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 tmp = code(A, B, C)
	tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi);
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]
\begin{array}{l}

\\
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}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 55.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 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} \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)))
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));
}
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);
}
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)
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 tmp = code(A, B, C)
	tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi);
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]
\begin{array}{l}

\\
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}
\end{array}

Alternative 1: 80.8% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -62000000000000:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -62000000000000.0)
   (* (/ 180.0 PI) (atan (* 0.5 (* (/ B A) (- (/ C A) -1.0)))))
   (* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- A C)))) B)))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -62000000000000.0) {
		tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (A - C)))) / B));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (A <= -62000000000000.0) {
		tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B));
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if A <= -62000000000000.0:
		tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) * ((C / A) - -1.0))))
	else:
		tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (A - C)))) / B))
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (A <= -62000000000000.0)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) - -1.0)))));
	else
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (A <= -62000000000000.0)
		tmp = (180.0 / pi) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	else
		tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (A - C)))) / B));
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[A, -62000000000000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;A \leq -62000000000000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -6.2e13

    1. Initial program 24.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. Step-by-step derivation
      1. associate-*l/24.5%

        \[\leadsto 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} \]
      2. *-lft-identity24.5%

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

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

        \[\leadsto 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} \]
      5. unpow224.5%

        \[\leadsto 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} \]
      6. hypot-def53.3%

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

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

      \[\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} \]
    5. Step-by-step derivation
      1. distribute-lft-out79.4%

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

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

        \[\leadsto 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} \]
      4. times-frac79.3%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(0.5 \cdot \left(\frac{B}{A} \cdot \frac{C}{A} + \frac{B}{A}\right)\right)}}{\pi} \]
    7. Taylor expanded in B around 0 79.4%

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{C \cdot B}{{A}^{2}} + \frac{B}{A}\right)\right)}{\pi}} \]
    8. Step-by-step derivation
      1. associate-*r/79.4%

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\left(\frac{B \cdot C}{\color{blue}{A \cdot A}} + \frac{B}{A}\right) \cdot 0.5\right)}{\pi} \]
      5. times-frac79.3%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\left(\color{blue}{\frac{B}{A} \cdot \frac{C}{A}} + \frac{B}{A}\right) \cdot 0.5\right)}{\pi} \]
      6. fma-udef79.3%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\color{blue}{\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right)} \cdot 0.5\right)}{\pi} \]
      7. associate-/l*79.0%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right) \cdot 0.5\right)}}} \]
      8. associate-/r/79.3%

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right) \cdot 0.5\right)} \]
      9. *-commutative79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right)\right)} \]
      10. remove-double-neg79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \color{blue}{-\left(-\frac{B}{A}\right)}\right)\right) \]
      11. mul-1-neg79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, -\color{blue}{-1 \cdot \frac{B}{A}}\right)\right) \]
      12. fma-neg79.3%

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

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

    if -6.2e13 < A

    1. Initial program 67.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. Step-by-step derivation
      1. associate-*r/67.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/67.2%

        \[\leadsto \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)} \]
      3. associate-*l/67.2%

        \[\leadsto \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)} \]
      4. *-lft-identity67.2%

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{\left(C - A\right) + \left(-\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{B}\right) \]
      6. associate-+l-67.2%

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \color{blue}{\left(A + \left(-\left(-\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)}}{B}\right) \]
      8. remove-double-neg67.2%

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

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

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}\right)}{B}\right) \]
      12. hypot-def86.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -62000000000000:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)\\ \end{array} \]

Alternative 2: 80.8% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -8 \cdot 10^{+14}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\ \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} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -8e+14)
   (* (/ 180.0 PI) (atan (* 0.5 (* (/ B A) (- (/ C A) -1.0)))))
   (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -8e+14) {
		tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	} 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) {
	double tmp;
	if (A <= -8e+14) {
		tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	} else {
		tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if A <= -8e+14:
		tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) * ((C / A) - -1.0))))
	else:
		tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (A <= -8e+14)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) - -1.0)))));
	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_2 = code(A, B, C)
	tmp = 0.0;
	if (A <= -8e+14)
		tmp = (180.0 / pi) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	else
		tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[A, -8e+14], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;A \leq -8 \cdot 10^{+14}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\

\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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -8e14

    1. Initial program 24.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. Step-by-step derivation
      1. associate-*l/24.5%

        \[\leadsto 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} \]
      2. *-lft-identity24.5%

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

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

        \[\leadsto 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} \]
      5. unpow224.5%

        \[\leadsto 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} \]
      6. hypot-def53.3%

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

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

      \[\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} \]
    5. Step-by-step derivation
      1. distribute-lft-out79.4%

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

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

        \[\leadsto 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} \]
      4. times-frac79.3%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(0.5 \cdot \left(\frac{B}{A} \cdot \frac{C}{A} + \frac{B}{A}\right)\right)}}{\pi} \]
    7. Taylor expanded in B around 0 79.4%

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{C \cdot B}{{A}^{2}} + \frac{B}{A}\right)\right)}{\pi}} \]
    8. Step-by-step derivation
      1. associate-*r/79.4%

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\left(\frac{B \cdot C}{\color{blue}{A \cdot A}} + \frac{B}{A}\right) \cdot 0.5\right)}{\pi} \]
      5. times-frac79.3%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\left(\color{blue}{\frac{B}{A} \cdot \frac{C}{A}} + \frac{B}{A}\right) \cdot 0.5\right)}{\pi} \]
      6. fma-udef79.3%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\color{blue}{\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right)} \cdot 0.5\right)}{\pi} \]
      7. associate-/l*79.0%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right) \cdot 0.5\right)}}} \]
      8. associate-/r/79.3%

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right) \cdot 0.5\right)} \]
      9. *-commutative79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right)\right)} \]
      10. remove-double-neg79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \color{blue}{-\left(-\frac{B}{A}\right)}\right)\right) \]
      11. mul-1-neg79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, -\color{blue}{-1 \cdot \frac{B}{A}}\right)\right) \]
      12. fma-neg79.3%

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

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

    if -8e14 < A

    1. Initial program 67.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. Step-by-step derivation
      1. associate-*l/67.2%

        \[\leadsto 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} \]
      2. *-lft-identity67.2%

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

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

        \[\leadsto 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} \]
      5. unpow267.2%

        \[\leadsto 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} \]
      6. hypot-def86.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -8 \cdot 10^{+14}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\ \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 3: 78.3% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -8.2 \cdot 10^{+15}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\ \mathbf{elif}\;A \leq 3.2 \cdot 10^{-43}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -8.2e+15)
   (* (/ 180.0 PI) (atan (* 0.5 (* (/ B A) (- (/ C A) -1.0)))))
   (if (<= A 3.2e-43)
     (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
     (* 180.0 (/ (atan (/ (- (- A) (hypot A B)) B)) PI)))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -8.2e+15) {
		tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	} else if (A <= 3.2e-43) {
		tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
	} else {
		tmp = 180.0 * (atan(((-A - hypot(A, B)) / B)) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (A <= -8.2e+15) {
		tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	} else if (A <= 3.2e-43) {
		tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
	} else {
		tmp = 180.0 * (Math.atan(((-A - Math.hypot(A, B)) / B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if A <= -8.2e+15:
		tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) * ((C / A) - -1.0))))
	elif A <= 3.2e-43:
		tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi)
	else:
		tmp = 180.0 * (math.atan(((-A - math.hypot(A, B)) / B)) / math.pi)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (A <= -8.2e+15)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) - -1.0)))));
	elseif (A <= 3.2e-43)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi));
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (A <= -8.2e+15)
		tmp = (180.0 / pi) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	elseif (A <= 3.2e-43)
		tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi);
	else
		tmp = 180.0 * (atan(((-A - hypot(A, B)) / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[A, -8.2e+15], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.2e-43], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\

\mathbf{elif}\;A \leq 3.2 \cdot 10^{-43}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -8.2e15

    1. Initial program 24.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. Step-by-step derivation
      1. associate-*l/24.5%

        \[\leadsto 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} \]
      2. *-lft-identity24.5%

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

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

        \[\leadsto 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} \]
      5. unpow224.5%

        \[\leadsto 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} \]
      6. hypot-def53.3%

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

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

      \[\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} \]
    5. Step-by-step derivation
      1. distribute-lft-out79.4%

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

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

        \[\leadsto 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} \]
      4. times-frac79.3%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(0.5 \cdot \left(\frac{B}{A} \cdot \frac{C}{A} + \frac{B}{A}\right)\right)}}{\pi} \]
    7. Taylor expanded in B around 0 79.4%

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{C \cdot B}{{A}^{2}} + \frac{B}{A}\right)\right)}{\pi}} \]
    8. Step-by-step derivation
      1. associate-*r/79.4%

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\left(\frac{B \cdot C}{\color{blue}{A \cdot A}} + \frac{B}{A}\right) \cdot 0.5\right)}{\pi} \]
      5. times-frac79.3%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\left(\color{blue}{\frac{B}{A} \cdot \frac{C}{A}} + \frac{B}{A}\right) \cdot 0.5\right)}{\pi} \]
      6. fma-udef79.3%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\color{blue}{\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right)} \cdot 0.5\right)}{\pi} \]
      7. associate-/l*79.0%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right) \cdot 0.5\right)}}} \]
      8. associate-/r/79.3%

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right) \cdot 0.5\right)} \]
      9. *-commutative79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right)\right)} \]
      10. remove-double-neg79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \color{blue}{-\left(-\frac{B}{A}\right)}\right)\right) \]
      11. mul-1-neg79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, -\color{blue}{-1 \cdot \frac{B}{A}}\right)\right) \]
      12. fma-neg79.3%

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

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

    if -8.2e15 < A < 3.19999999999999985e-43

    1. Initial program 59.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. Step-by-step derivation
      1. associate-*l/59.9%

        \[\leadsto 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} \]
      2. *-lft-identity59.9%

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

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

        \[\leadsto 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} \]
      5. unpow259.9%

        \[\leadsto 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} \]
      6. hypot-def81.3%

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Taylor expanded in A around 0 58.2%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{C - \sqrt{{B}^{2} + {C}^{2}}}}{B}\right)}{\pi} \]
    5. Step-by-step derivation
      1. unpow258.2%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
      3. hypot-def79.6%

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

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

    if 3.19999999999999985e-43 < A

    1. Initial program 77.7%

      \[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. Step-by-step derivation
      1. associate-*l/77.7%

        \[\leadsto 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} \]
      2. *-lft-identity77.7%

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

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

        \[\leadsto 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} \]
      5. unpow277.7%

        \[\leadsto 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} \]
      6. hypot-def93.9%

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Taylor expanded in C around 0 76.6%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-1 \cdot \left(A + \sqrt{{B}^{2} + {A}^{2}}\right)}}{B}\right)}{\pi} \]
    5. Step-by-step derivation
      1. mul-1-neg76.6%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right)}{B}\right)}{\pi} \]
      3. unpow276.6%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right)}{B}\right)}{\pi} \]
      5. hypot-def90.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -8.2 \cdot 10^{+15}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\ \mathbf{elif}\;A \leq 3.2 \cdot 10^{-43}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\ \end{array} \]

Alternative 4: 78.3% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -1 \cdot 10^{+15}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\ \mathbf{elif}\;A \leq 1.46 \cdot 10^{-42}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi \cdot 0.005555555555555556}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -1e+15)
   (* (/ 180.0 PI) (atan (* 0.5 (* (/ B A) (- (/ C A) -1.0)))))
   (if (<= A 1.46e-42)
     (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
     (/ (atan (/ (- (- A) (hypot A B)) B)) (* PI 0.005555555555555556)))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -1e+15) {
		tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	} else if (A <= 1.46e-42) {
		tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
	} else {
		tmp = atan(((-A - hypot(A, B)) / B)) / (((double) M_PI) * 0.005555555555555556);
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (A <= -1e+15) {
		tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	} else if (A <= 1.46e-42) {
		tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
	} else {
		tmp = Math.atan(((-A - Math.hypot(A, B)) / B)) / (Math.PI * 0.005555555555555556);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if A <= -1e+15:
		tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) * ((C / A) - -1.0))))
	elif A <= 1.46e-42:
		tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi)
	else:
		tmp = math.atan(((-A - math.hypot(A, B)) / B)) / (math.pi * 0.005555555555555556)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (A <= -1e+15)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) - -1.0)))));
	elseif (A <= 1.46e-42)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi));
	else
		tmp = Float64(atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)) / Float64(pi * 0.005555555555555556));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (A <= -1e+15)
		tmp = (180.0 / pi) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	elseif (A <= 1.46e-42)
		tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi);
	else
		tmp = atan(((-A - hypot(A, B)) / B)) / (pi * 0.005555555555555556);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[A, -1e+15], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.46e-42], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;A \leq -1 \cdot 10^{+15}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\

\mathbf{elif}\;A \leq 1.46 \cdot 10^{-42}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi \cdot 0.005555555555555556}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -1e15

    1. Initial program 24.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. Step-by-step derivation
      1. associate-*l/24.5%

        \[\leadsto 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} \]
      2. *-lft-identity24.5%

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

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

        \[\leadsto 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} \]
      5. unpow224.5%

        \[\leadsto 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} \]
      6. hypot-def53.3%

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

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

      \[\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} \]
    5. Step-by-step derivation
      1. distribute-lft-out79.4%

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

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

        \[\leadsto 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} \]
      4. times-frac79.3%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(0.5 \cdot \left(\frac{B}{A} \cdot \frac{C}{A} + \frac{B}{A}\right)\right)}}{\pi} \]
    7. Taylor expanded in B around 0 79.4%

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{C \cdot B}{{A}^{2}} + \frac{B}{A}\right)\right)}{\pi}} \]
    8. Step-by-step derivation
      1. associate-*r/79.4%

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\left(\frac{B \cdot C}{\color{blue}{A \cdot A}} + \frac{B}{A}\right) \cdot 0.5\right)}{\pi} \]
      5. times-frac79.3%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\left(\color{blue}{\frac{B}{A} \cdot \frac{C}{A}} + \frac{B}{A}\right) \cdot 0.5\right)}{\pi} \]
      6. fma-udef79.3%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\color{blue}{\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right)} \cdot 0.5\right)}{\pi} \]
      7. associate-/l*79.0%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right) \cdot 0.5\right)}}} \]
      8. associate-/r/79.3%

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right) \cdot 0.5\right)} \]
      9. *-commutative79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right)\right)} \]
      10. remove-double-neg79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \color{blue}{-\left(-\frac{B}{A}\right)}\right)\right) \]
      11. mul-1-neg79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, -\color{blue}{-1 \cdot \frac{B}{A}}\right)\right) \]
      12. fma-neg79.3%

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

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

    if -1e15 < A < 1.46000000000000001e-42

    1. Initial program 59.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. Step-by-step derivation
      1. associate-*l/59.9%

        \[\leadsto 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} \]
      2. *-lft-identity59.9%

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

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

        \[\leadsto 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} \]
      5. unpow259.9%

        \[\leadsto 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} \]
      6. hypot-def81.3%

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Taylor expanded in A around 0 58.2%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{C - \sqrt{{B}^{2} + {C}^{2}}}}{B}\right)}{\pi} \]
    5. Step-by-step derivation
      1. unpow258.2%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
      3. hypot-def79.6%

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

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

    if 1.46000000000000001e-42 < A

    1. Initial program 77.7%

      \[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. Step-by-step derivation
      1. associate-*l/77.7%

        \[\leadsto 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} \]
      2. *-lft-identity77.7%

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

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

        \[\leadsto 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} \]
      5. unpow277.7%

        \[\leadsto 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} \]
      6. hypot-def93.9%

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Step-by-step derivation
      1. associate-*r/93.9%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      2. associate--r+93.9%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}}{B}\right)}{\pi} \]
      3. associate-*l/93.8%

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)} \]
      4. *-commutative93.8%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right) \cdot \frac{180}{\pi}} \]
      5. associate--r+93.8%

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

        \[\leadsto \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right) \cdot \color{blue}{\frac{1}{\frac{\pi}{180}}} \]
      7. un-div-inv93.9%

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\frac{\pi}{180}}} \]
      8. associate--r+93.9%

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

        \[\leadsto \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\color{blue}{\pi \cdot \frac{1}{180}}} \]
      10. metadata-eval93.9%

        \[\leadsto \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi \cdot \color{blue}{0.005555555555555556}} \]
    5. Applied egg-rr93.9%

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi \cdot 0.005555555555555556}} \]
    6. Step-by-step derivation
      1. associate--r+93.9%

        \[\leadsto \frac{\tan^{-1} \left(\frac{\color{blue}{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}}{B}\right)}{\pi \cdot 0.005555555555555556} \]
    7. Simplified93.9%

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi \cdot 0.005555555555555556}} \]
    8. Taylor expanded in C around 0 76.6%

      \[\leadsto \frac{\tan^{-1} \left(\frac{\color{blue}{-1 \cdot \left(A + \sqrt{{B}^{2} + {A}^{2}}\right)}}{B}\right)}{\pi \cdot 0.005555555555555556} \]
    9. Step-by-step derivation
      1. mul-1-neg76.6%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right)}{B}\right)}{\pi} \]
      3. unpow276.6%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right)}{B}\right)}{\pi} \]
      5. hypot-def90.1%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \color{blue}{\mathsf{hypot}\left(A, B\right)}\right)}{B}\right)}{\pi} \]
    10. Simplified90.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1 \cdot 10^{+15}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\ \mathbf{elif}\;A \leq 1.46 \cdot 10^{-42}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi \cdot 0.005555555555555556}\\ \end{array} \]

Alternative 5: 75.5% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -34000000000000:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\ \mathbf{elif}\;A \leq 2.36 \cdot 10^{+83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -34000000000000.0)
   (* (/ 180.0 PI) (atan (* 0.5 (* (/ B A) (- (/ C A) -1.0)))))
   (if (<= A 2.36e+83)
     (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
     (* 180.0 (/ (atan (/ (- (- C B) A) B)) PI)))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -34000000000000.0) {
		tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	} else if (A <= 2.36e+83) {
		tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
	} else {
		tmp = 180.0 * (atan((((C - B) - A) / B)) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (A <= -34000000000000.0) {
		tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	} else if (A <= 2.36e+83) {
		tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
	} else {
		tmp = 180.0 * (Math.atan((((C - B) - A) / B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if A <= -34000000000000.0:
		tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) * ((C / A) - -1.0))))
	elif A <= 2.36e+83:
		tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi)
	else:
		tmp = 180.0 * (math.atan((((C - B) - A) / B)) / math.pi)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (A <= -34000000000000.0)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) - -1.0)))));
	elseif (A <= 2.36e+83)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi));
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - B) - A) / B)) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (A <= -34000000000000.0)
		tmp = (180.0 / pi) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	elseif (A <= 2.36e+83)
		tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi);
	else
		tmp = 180.0 * (atan((((C - B) - A) / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[A, -34000000000000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.36e+83], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;A \leq -34000000000000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\

\mathbf{elif}\;A \leq 2.36 \cdot 10^{+83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -3.4e13

    1. Initial program 24.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. Step-by-step derivation
      1. associate-*l/24.5%

        \[\leadsto 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} \]
      2. *-lft-identity24.5%

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

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

        \[\leadsto 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} \]
      5. unpow224.5%

        \[\leadsto 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} \]
      6. hypot-def53.3%

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

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

      \[\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} \]
    5. Step-by-step derivation
      1. distribute-lft-out79.4%

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

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

        \[\leadsto 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} \]
      4. times-frac79.3%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(0.5 \cdot \left(\frac{B}{A} \cdot \frac{C}{A} + \frac{B}{A}\right)\right)}}{\pi} \]
    7. Taylor expanded in B around 0 79.4%

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{C \cdot B}{{A}^{2}} + \frac{B}{A}\right)\right)}{\pi}} \]
    8. Step-by-step derivation
      1. associate-*r/79.4%

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\left(\frac{B \cdot C}{\color{blue}{A \cdot A}} + \frac{B}{A}\right) \cdot 0.5\right)}{\pi} \]
      5. times-frac79.3%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\left(\color{blue}{\frac{B}{A} \cdot \frac{C}{A}} + \frac{B}{A}\right) \cdot 0.5\right)}{\pi} \]
      6. fma-udef79.3%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\color{blue}{\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right)} \cdot 0.5\right)}{\pi} \]
      7. associate-/l*79.0%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right) \cdot 0.5\right)}}} \]
      8. associate-/r/79.3%

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right) \cdot 0.5\right)} \]
      9. *-commutative79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right)\right)} \]
      10. remove-double-neg79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \color{blue}{-\left(-\frac{B}{A}\right)}\right)\right) \]
      11. mul-1-neg79.3%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, -\color{blue}{-1 \cdot \frac{B}{A}}\right)\right) \]
      12. fma-neg79.3%

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

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

    if -3.4e13 < A < 2.3599999999999999e83

    1. Initial program 60.7%

      \[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. Step-by-step derivation
      1. associate-*l/60.7%

        \[\leadsto 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} \]
      2. *-lft-identity60.7%

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

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

        \[\leadsto 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} \]
      5. unpow260.7%

        \[\leadsto 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} \]
      6. hypot-def82.4%

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Taylor expanded in A around 0 57.0%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{C - \sqrt{{B}^{2} + {C}^{2}}}}{B}\right)}{\pi} \]
    5. Step-by-step derivation
      1. unpow257.0%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
      3. hypot-def78.7%

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

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

    if 2.3599999999999999e83 < A

    1. Initial program 83.7%

      \[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. Step-by-step derivation
      1. associate-*l/83.7%

        \[\leadsto 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} \]
      2. *-lft-identity83.7%

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

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

        \[\leadsto 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} \]
      5. unpow283.7%

        \[\leadsto 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} \]
      6. hypot-def96.6%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{\left(C + -1 \cdot B\right) - A}}{B}\right)}{\pi} \]
    5. Step-by-step derivation
      1. neg-mul-184.8%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{\left(C - B\right)} - A}{B}\right)}{\pi} \]
    6. Simplified84.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -34000000000000:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\ \mathbf{elif}\;A \leq 2.36 \cdot 10^{+83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 6: 55.3% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{if}\;A \leq -2.2 \cdot 10^{-77}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.1 \cdot 10^{-122}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -2.7 \cdot 10^{-294}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.15 \cdot 10^{-282}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 350:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 2.7 \cdot 10^{+19}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.55 \cdot 10^{+82}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan -1.0) PI)))
        (t_1 (* 180.0 (/ (atan (/ (+ B C) B)) PI))))
   (if (<= A -2.2e-77)
     (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
     (if (<= A -4.1e-122)
       t_0
       (if (<= A -2.7e-294)
         t_1
         (if (<= A 1.15e-282)
           t_0
           (if (<= A 350.0)
             t_1
             (if (<= A 2.7e+19)
               t_0
               (if (<= A 1.55e+82)
                 t_1
                 (* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
	double t_1 = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
	double tmp;
	if (A <= -2.2e-77) {
		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
	} else if (A <= -4.1e-122) {
		tmp = t_0;
	} else if (A <= -2.7e-294) {
		tmp = t_1;
	} else if (A <= 1.15e-282) {
		tmp = t_0;
	} else if (A <= 350.0) {
		tmp = t_1;
	} else if (A <= 2.7e+19) {
		tmp = t_0;
	} else if (A <= 1.55e+82) {
		tmp = t_1;
	} else {
		tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
	double t_1 = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
	double tmp;
	if (A <= -2.2e-77) {
		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
	} else if (A <= -4.1e-122) {
		tmp = t_0;
	} else if (A <= -2.7e-294) {
		tmp = t_1;
	} else if (A <= 1.15e-282) {
		tmp = t_0;
	} else if (A <= 350.0) {
		tmp = t_1;
	} else if (A <= 2.7e+19) {
		tmp = t_0;
	} else if (A <= 1.55e+82) {
		tmp = t_1;
	} else {
		tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan(-1.0) / math.pi)
	t_1 = 180.0 * (math.atan(((B + C) / B)) / math.pi)
	tmp = 0
	if A <= -2.2e-77:
		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
	elif A <= -4.1e-122:
		tmp = t_0
	elif A <= -2.7e-294:
		tmp = t_1
	elif A <= 1.15e-282:
		tmp = t_0
	elif A <= 350.0:
		tmp = t_1
	elif A <= 2.7e+19:
		tmp = t_0
	elif A <= 1.55e+82:
		tmp = t_1
	else:
		tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi)
	return tmp
function code(A, B, C)
	t_0 = Float64(180.0 * Float64(atan(-1.0) / pi))
	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi))
	tmp = 0.0
	if (A <= -2.2e-77)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
	elseif (A <= -4.1e-122)
		tmp = t_0;
	elseif (A <= -2.7e-294)
		tmp = t_1;
	elseif (A <= 1.15e-282)
		tmp = t_0;
	elseif (A <= 350.0)
		tmp = t_1;
	elseif (A <= 2.7e+19)
		tmp = t_0;
	elseif (A <= 1.55e+82)
		tmp = t_1;
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan(-1.0) / pi);
	t_1 = 180.0 * (atan(((B + C) / B)) / pi);
	tmp = 0.0;
	if (A <= -2.2e-77)
		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
	elseif (A <= -4.1e-122)
		tmp = t_0;
	elseif (A <= -2.7e-294)
		tmp = t_1;
	elseif (A <= 1.15e-282)
		tmp = t_0;
	elseif (A <= 350.0)
		tmp = t_1;
	elseif (A <= 2.7e+19)
		tmp = t_0;
	elseif (A <= 1.55e+82)
		tmp = t_1;
	else
		tmp = 180.0 * (atan(((A * -2.0) / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.2e-77], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -4.1e-122], t$95$0, If[LessEqual[A, -2.7e-294], t$95$1, If[LessEqual[A, 1.15e-282], t$95$0, If[LessEqual[A, 350.0], t$95$1, If[LessEqual[A, 2.7e+19], t$95$0, If[LessEqual[A, 1.55e+82], t$95$1, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -2.2 \cdot 10^{-77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\

\mathbf{elif}\;A \leq -4.1 \cdot 10^{-122}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq -2.7 \cdot 10^{-294}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;A \leq 1.15 \cdot 10^{-282}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq 350:\\
\;\;\;\;t_1\\

\mathbf{elif}\;A \leq 2.7 \cdot 10^{+19}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq 1.55 \cdot 10^{+82}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -2.20000000000000007e-77

    1. Initial program 26.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. Step-by-step derivation
      1. associate-*l/26.6%

        \[\leadsto 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} \]
      2. *-lft-identity26.6%

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

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

        \[\leadsto 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} \]
      5. unpow226.6%

        \[\leadsto 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} \]
      6. hypot-def54.8%

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

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

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

    if -2.20000000000000007e-77 < A < -4.1e-122 or -2.7000000000000001e-294 < A < 1.1499999999999999e-282 or 350 < A < 2.7e19

    1. Initial program 55.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. Step-by-step derivation
      1. associate-*l/55.4%

        \[\leadsto 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} \]
      2. *-lft-identity55.4%

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

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

        \[\leadsto 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} \]
      5. unpow255.4%

        \[\leadsto 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} \]
      6. hypot-def85.7%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]

    if -4.1e-122 < A < -2.7000000000000001e-294 or 1.1499999999999999e-282 < A < 350 or 2.7e19 < A < 1.55000000000000016e82

    1. Initial program 65.8%

      \[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. Step-by-step derivation
      1. associate-*l/65.8%

        \[\leadsto 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} \]
      2. *-lft-identity65.8%

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

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

        \[\leadsto 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} \]
      5. unpow265.8%

        \[\leadsto 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} \]
      6. hypot-def84.6%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{\left(C + B\right) - A}}{B}\right)}{\pi} \]
    5. Taylor expanded in A around 0 58.4%

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

    if 1.55000000000000016e82 < A

    1. Initial program 83.7%

      \[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. Step-by-step derivation
      1. associate-*l/83.7%

        \[\leadsto 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} \]
      2. *-lft-identity83.7%

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

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

        \[\leadsto 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} \]
      5. unpow283.7%

        \[\leadsto 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} \]
      6. hypot-def96.6%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-2 \cdot A}}{B}\right)}{\pi} \]
    5. Step-by-step derivation
      1. *-commutative79.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.2 \cdot 10^{-77}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.1 \cdot 10^{-122}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -2.7 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.15 \cdot 10^{-282}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 350:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.7 \cdot 10^{+19}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 1.55 \cdot 10^{+82}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]

Alternative 7: 61.6% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -1.55 \cdot 10^{-36}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.4 \cdot 10^{-183} \lor \neg \left(A \leq -3 \cdot 10^{-267}\right) \land \left(A \leq 5 \cdot 10^{-282} \lor \neg \left(A \leq 5.5 \cdot 10^{-186}\right)\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -1.55e-36)
   (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
   (if (or (<= A -2.4e-183)
           (and (not (<= A -3e-267)) (or (<= A 5e-282) (not (<= A 5.5e-186)))))
     (* 180.0 (/ (atan (/ (- (- C B) A) B)) PI))
     (* 180.0 (/ (atan (/ (+ B C) B)) PI)))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -1.55e-36) {
		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
	} else if ((A <= -2.4e-183) || (!(A <= -3e-267) && ((A <= 5e-282) || !(A <= 5.5e-186)))) {
		tmp = 180.0 * (atan((((C - B) - A) / B)) / ((double) M_PI));
	} else {
		tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (A <= -1.55e-36) {
		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
	} else if ((A <= -2.4e-183) || (!(A <= -3e-267) && ((A <= 5e-282) || !(A <= 5.5e-186)))) {
		tmp = 180.0 * (Math.atan((((C - B) - A) / B)) / Math.PI);
	} else {
		tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if A <= -1.55e-36:
		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
	elif (A <= -2.4e-183) or (not (A <= -3e-267) and ((A <= 5e-282) or not (A <= 5.5e-186))):
		tmp = 180.0 * (math.atan((((C - B) - A) / B)) / math.pi)
	else:
		tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (A <= -1.55e-36)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
	elseif ((A <= -2.4e-183) || (!(A <= -3e-267) && ((A <= 5e-282) || !(A <= 5.5e-186))))
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - B) - A) / B)) / pi));
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (A <= -1.55e-36)
		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
	elseif ((A <= -2.4e-183) || (~((A <= -3e-267)) && ((A <= 5e-282) || ~((A <= 5.5e-186)))))
		tmp = 180.0 * (atan((((C - B) - A) / B)) / pi);
	else
		tmp = 180.0 * (atan(((B + C) / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[A, -1.55e-36], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -2.4e-183], And[N[Not[LessEqual[A, -3e-267]], $MachinePrecision], Or[LessEqual[A, 5e-282], N[Not[LessEqual[A, 5.5e-186]], $MachinePrecision]]]], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.55 \cdot 10^{-36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\

\mathbf{elif}\;A \leq -2.4 \cdot 10^{-183} \lor \neg \left(A \leq -3 \cdot 10^{-267}\right) \land \left(A \leq 5 \cdot 10^{-282} \lor \neg \left(A \leq 5.5 \cdot 10^{-186}\right)\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -1.5499999999999999e-36

    1. Initial program 24.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. Step-by-step derivation
      1. associate-*l/24.4%

        \[\leadsto 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} \]
      2. *-lft-identity24.4%

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

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

        \[\leadsto 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} \]
      5. unpow224.4%

        \[\leadsto 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} \]
      6. hypot-def54.3%

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

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

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

    if -1.5499999999999999e-36 < A < -2.39999999999999993e-183 or -3e-267 < A < 5.0000000000000001e-282 or 5.5000000000000001e-186 < A

    1. Initial program 68.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} \]
    2. Step-by-step derivation
      1. associate-*l/68.0%

        \[\leadsto 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} \]
      2. *-lft-identity68.0%

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

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

        \[\leadsto 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} \]
      5. unpow268.0%

        \[\leadsto 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} \]
      6. hypot-def87.0%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \color{blue}{\mathsf{hypot}\left(B, A - C\right)}}{B}\right)}{\pi} \]
    3. 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}} \]
    4. Taylor expanded in B around inf 71.4%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{\left(C + -1 \cdot B\right) - A}}{B}\right)}{\pi} \]
    5. Step-by-step derivation
      1. neg-mul-171.4%

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

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

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

    if -2.39999999999999993e-183 < A < -3e-267 or 5.0000000000000001e-282 < A < 5.5000000000000001e-186

    1. Initial program 76.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. Step-by-step derivation
      1. associate-*l/76.1%

        \[\leadsto 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} \]
      2. *-lft-identity76.1%

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

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

        \[\leadsto 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} \]
      5. unpow276.1%

        \[\leadsto 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} \]
      6. hypot-def90.7%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{\left(C + B\right) - A}}{B}\right)}{\pi} \]
    5. Taylor expanded in A around 0 78.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.55 \cdot 10^{-36}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.4 \cdot 10^{-183} \lor \neg \left(A \leq -3 \cdot 10^{-267}\right) \land \left(A \leq 5 \cdot 10^{-282} \lor \neg \left(A \leq 5.5 \cdot 10^{-186}\right)\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \end{array} \]

Alternative 8: 62.2% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -4 \cdot 10^{-76}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\ \mathbf{elif}\;A \leq -9 \cdot 10^{-181} \lor \neg \left(A \leq -5 \cdot 10^{-271}\right) \land \left(A \leq 9 \cdot 10^{-282} \lor \neg \left(A \leq 5.8 \cdot 10^{-186}\right)\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -4e-76)
   (* (/ 180.0 PI) (atan (* 0.5 (* (/ B A) (- (/ C A) -1.0)))))
   (if (or (<= A -9e-181)
           (and (not (<= A -5e-271)) (or (<= A 9e-282) (not (<= A 5.8e-186)))))
     (* 180.0 (/ (atan (/ (- (- C B) A) B)) PI))
     (* 180.0 (/ (atan (/ (+ B C) B)) PI)))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -4e-76) {
		tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	} else if ((A <= -9e-181) || (!(A <= -5e-271) && ((A <= 9e-282) || !(A <= 5.8e-186)))) {
		tmp = 180.0 * (atan((((C - B) - A) / B)) / ((double) M_PI));
	} else {
		tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (A <= -4e-76) {
		tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	} else if ((A <= -9e-181) || (!(A <= -5e-271) && ((A <= 9e-282) || !(A <= 5.8e-186)))) {
		tmp = 180.0 * (Math.atan((((C - B) - A) / B)) / Math.PI);
	} else {
		tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if A <= -4e-76:
		tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) * ((C / A) - -1.0))))
	elif (A <= -9e-181) or (not (A <= -5e-271) and ((A <= 9e-282) or not (A <= 5.8e-186))):
		tmp = 180.0 * (math.atan((((C - B) - A) / B)) / math.pi)
	else:
		tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (A <= -4e-76)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) - -1.0)))));
	elseif ((A <= -9e-181) || (!(A <= -5e-271) && ((A <= 9e-282) || !(A <= 5.8e-186))))
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - B) - A) / B)) / pi));
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (A <= -4e-76)
		tmp = (180.0 / pi) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
	elseif ((A <= -9e-181) || (~((A <= -5e-271)) && ((A <= 9e-282) || ~((A <= 5.8e-186)))))
		tmp = 180.0 * (atan((((C - B) - A) / B)) / pi);
	else
		tmp = 180.0 * (atan(((B + C) / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[A, -4e-76], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -9e-181], And[N[Not[LessEqual[A, -5e-271]], $MachinePrecision], Or[LessEqual[A, 9e-282], N[Not[LessEqual[A, 5.8e-186]], $MachinePrecision]]]], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;A \leq -4 \cdot 10^{-76}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\

\mathbf{elif}\;A \leq -9 \cdot 10^{-181} \lor \neg \left(A \leq -5 \cdot 10^{-271}\right) \land \left(A \leq 9 \cdot 10^{-282} \lor \neg \left(A \leq 5.8 \cdot 10^{-186}\right)\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -3.99999999999999971e-76

    1. Initial program 26.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. Step-by-step derivation
      1. associate-*l/26.9%

        \[\leadsto 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} \]
      2. *-lft-identity26.9%

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

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

        \[\leadsto 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} \]
      5. unpow226.9%

        \[\leadsto 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} \]
      6. hypot-def55.4%

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

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

      \[\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} \]
    5. Step-by-step derivation
      1. distribute-lft-out74.1%

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

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

        \[\leadsto 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} \]
      4. times-frac74.0%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(0.5 \cdot \left(\frac{B}{A} \cdot \frac{C}{A} + \frac{B}{A}\right)\right)}}{\pi} \]
    7. Taylor expanded in B around 0 74.1%

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{C \cdot B}{{A}^{2}} + \frac{B}{A}\right)\right)}{\pi}} \]
    8. Step-by-step derivation
      1. associate-*r/74.2%

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\left(\frac{B \cdot C}{\color{blue}{A \cdot A}} + \frac{B}{A}\right) \cdot 0.5\right)}{\pi} \]
      5. times-frac74.0%

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\color{blue}{\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right)} \cdot 0.5\right)}{\pi} \]
      7. associate-/l*73.8%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{A}, \frac{C}{A}, \frac{B}{A}\right) \cdot 0.5\right)}}} \]
      8. associate-/r/74.0%

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

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

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

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \color{blue}{\left(\frac{B}{A} \cdot \frac{C}{A} - -1 \cdot \frac{B}{A}\right)}\right) \]
    9. Simplified74.0%

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

    if -3.99999999999999971e-76 < A < -8.9999999999999998e-181 or -5.0000000000000002e-271 < A < 9.00000000000000017e-282 or 5.80000000000000038e-186 < A

    1. Initial program 67.8%

      \[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. Step-by-step derivation
      1. associate-*l/67.8%

        \[\leadsto 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} \]
      2. *-lft-identity67.8%

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

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

        \[\leadsto 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} \]
      5. unpow267.8%

        \[\leadsto 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} \]
      6. hypot-def87.3%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{\left(C + -1 \cdot B\right) - A}}{B}\right)}{\pi} \]
    5. Step-by-step derivation
      1. neg-mul-171.3%

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

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

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

    if -8.9999999999999998e-181 < A < -5.0000000000000002e-271 or 9.00000000000000017e-282 < A < 5.80000000000000038e-186

    1. Initial program 76.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. Step-by-step derivation
      1. associate-*l/76.1%

        \[\leadsto 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} \]
      2. *-lft-identity76.1%

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

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

        \[\leadsto 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} \]
      5. unpow276.1%

        \[\leadsto 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} \]
      6. hypot-def90.7%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{\left(C + B\right) - A}}{B}\right)}{\pi} \]
    5. Taylor expanded in A around 0 78.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4 \cdot 10^{-76}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\ \mathbf{elif}\;A \leq -9 \cdot 10^{-181} \lor \neg \left(A \leq -5 \cdot 10^{-271}\right) \land \left(A \leq 9 \cdot 10^{-282} \lor \neg \left(A \leq 5.8 \cdot 10^{-186}\right)\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \end{array} \]

Alternative 9: 48.7% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{if}\;A \leq -2.9 \cdot 10^{-78}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.6 \cdot 10^{-181}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -1.9 \cdot 10^{-267}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.9 \cdot 10^{-282}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.9 \cdot 10^{-123}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan -1.0) PI))) (t_1 (* 180.0 (/ (atan 1.0) PI))))
   (if (<= A -2.9e-78)
     (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
     (if (<= A -1.6e-181)
       t_0
       (if (<= A -1.9e-267)
         t_1
         (if (<= A 1.9e-282)
           t_0
           (if (<= A 1.9e-123)
             t_1
             (* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
	double t_1 = 180.0 * (atan(1.0) / ((double) M_PI));
	double tmp;
	if (A <= -2.9e-78) {
		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
	} else if (A <= -1.6e-181) {
		tmp = t_0;
	} else if (A <= -1.9e-267) {
		tmp = t_1;
	} else if (A <= 1.9e-282) {
		tmp = t_0;
	} else if (A <= 1.9e-123) {
		tmp = t_1;
	} else {
		tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
	double t_1 = 180.0 * (Math.atan(1.0) / Math.PI);
	double tmp;
	if (A <= -2.9e-78) {
		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
	} else if (A <= -1.6e-181) {
		tmp = t_0;
	} else if (A <= -1.9e-267) {
		tmp = t_1;
	} else if (A <= 1.9e-282) {
		tmp = t_0;
	} else if (A <= 1.9e-123) {
		tmp = t_1;
	} else {
		tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan(-1.0) / math.pi)
	t_1 = 180.0 * (math.atan(1.0) / math.pi)
	tmp = 0
	if A <= -2.9e-78:
		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
	elif A <= -1.6e-181:
		tmp = t_0
	elif A <= -1.9e-267:
		tmp = t_1
	elif A <= 1.9e-282:
		tmp = t_0
	elif A <= 1.9e-123:
		tmp = t_1
	else:
		tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi)
	return tmp
function code(A, B, C)
	t_0 = Float64(180.0 * Float64(atan(-1.0) / pi))
	t_1 = Float64(180.0 * Float64(atan(1.0) / pi))
	tmp = 0.0
	if (A <= -2.9e-78)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
	elseif (A <= -1.6e-181)
		tmp = t_0;
	elseif (A <= -1.9e-267)
		tmp = t_1;
	elseif (A <= 1.9e-282)
		tmp = t_0;
	elseif (A <= 1.9e-123)
		tmp = t_1;
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan(-1.0) / pi);
	t_1 = 180.0 * (atan(1.0) / pi);
	tmp = 0.0;
	if (A <= -2.9e-78)
		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
	elseif (A <= -1.6e-181)
		tmp = t_0;
	elseif (A <= -1.9e-267)
		tmp = t_1;
	elseif (A <= 1.9e-282)
		tmp = t_0;
	elseif (A <= 1.9e-123)
		tmp = t_1;
	else
		tmp = 180.0 * (atan(((A * -2.0) / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.9e-78], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.6e-181], t$95$0, If[LessEqual[A, -1.9e-267], t$95$1, If[LessEqual[A, 1.9e-282], t$95$0, If[LessEqual[A, 1.9e-123], t$95$1, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;A \leq -2.9 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\

\mathbf{elif}\;A \leq -1.6 \cdot 10^{-181}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq -1.9 \cdot 10^{-267}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;A \leq 1.9 \cdot 10^{-282}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq 1.9 \cdot 10^{-123}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -2.9000000000000001e-78

    1. Initial program 26.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. Step-by-step derivation
      1. associate-*l/26.6%

        \[\leadsto 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} \]
      2. *-lft-identity26.6%

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

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

        \[\leadsto 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} \]
      5. unpow226.6%

        \[\leadsto 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} \]
      6. hypot-def54.8%

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

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

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

    if -2.9000000000000001e-78 < A < -1.6000000000000001e-181 or -1.90000000000000001e-267 < A < 1.89999999999999996e-282

    1. Initial program 58.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} \]
    2. Step-by-step derivation
      1. associate-*l/58.0%

        \[\leadsto 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} \]
      2. *-lft-identity58.0%

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

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

        \[\leadsto 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} \]
      5. unpow258.0%

        \[\leadsto 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} \]
      6. hypot-def81.9%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]

    if -1.6000000000000001e-181 < A < -1.90000000000000001e-267 or 1.89999999999999996e-282 < A < 1.89999999999999998e-123

    1. Initial program 70.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. Step-by-step derivation
      1. associate-*l/70.2%

        \[\leadsto 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} \]
      2. *-lft-identity70.2%

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

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

        \[\leadsto 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} \]
      5. unpow270.2%

        \[\leadsto 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} \]
      6. hypot-def83.4%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{1}}{\pi} \]

    if 1.89999999999999998e-123 < A

    1. Initial program 74.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. Step-by-step derivation
      1. associate-*l/74.2%

        \[\leadsto 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} \]
      2. *-lft-identity74.2%

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

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

        \[\leadsto 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} \]
      5. unpow274.2%

        \[\leadsto 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} \]
      6. hypot-def93.7%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-2 \cdot A}}{B}\right)}{\pi} \]
    5. Step-by-step derivation
      1. *-commutative62.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.9 \cdot 10^{-78}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.6 \cdot 10^{-181}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -1.9 \cdot 10^{-267}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.9 \cdot 10^{-282}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 1.9 \cdot 10^{-123}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]

Alternative 10: 58.7% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{if}\;A \leq -3.2 \cdot 10^{-78}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -8.4 \cdot 10^{-122}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -2.55 \cdot 10^{-294}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 2 \cdot 10^{-282}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-120}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan -1.0) PI)))
        (t_1 (* 180.0 (/ (atan (/ (+ B C) B)) PI))))
   (if (<= A -3.2e-78)
     (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
     (if (<= A -8.4e-122)
       t_0
       (if (<= A -2.55e-294)
         t_1
         (if (<= A 2e-282)
           t_0
           (if (<= A 3.9e-120) t_1 (* 180.0 (/ (atan (/ (- B A) B)) PI)))))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
	double t_1 = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
	double tmp;
	if (A <= -3.2e-78) {
		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
	} else if (A <= -8.4e-122) {
		tmp = t_0;
	} else if (A <= -2.55e-294) {
		tmp = t_1;
	} else if (A <= 2e-282) {
		tmp = t_0;
	} else if (A <= 3.9e-120) {
		tmp = t_1;
	} else {
		tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
	double t_1 = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
	double tmp;
	if (A <= -3.2e-78) {
		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
	} else if (A <= -8.4e-122) {
		tmp = t_0;
	} else if (A <= -2.55e-294) {
		tmp = t_1;
	} else if (A <= 2e-282) {
		tmp = t_0;
	} else if (A <= 3.9e-120) {
		tmp = t_1;
	} else {
		tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan(-1.0) / math.pi)
	t_1 = 180.0 * (math.atan(((B + C) / B)) / math.pi)
	tmp = 0
	if A <= -3.2e-78:
		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
	elif A <= -8.4e-122:
		tmp = t_0
	elif A <= -2.55e-294:
		tmp = t_1
	elif A <= 2e-282:
		tmp = t_0
	elif A <= 3.9e-120:
		tmp = t_1
	else:
		tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi)
	return tmp
function code(A, B, C)
	t_0 = Float64(180.0 * Float64(atan(-1.0) / pi))
	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi))
	tmp = 0.0
	if (A <= -3.2e-78)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
	elseif (A <= -8.4e-122)
		tmp = t_0;
	elseif (A <= -2.55e-294)
		tmp = t_1;
	elseif (A <= 2e-282)
		tmp = t_0;
	elseif (A <= 3.9e-120)
		tmp = t_1;
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan(-1.0) / pi);
	t_1 = 180.0 * (atan(((B + C) / B)) / pi);
	tmp = 0.0;
	if (A <= -3.2e-78)
		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
	elseif (A <= -8.4e-122)
		tmp = t_0;
	elseif (A <= -2.55e-294)
		tmp = t_1;
	elseif (A <= 2e-282)
		tmp = t_0;
	elseif (A <= 3.9e-120)
		tmp = t_1;
	else
		tmp = 180.0 * (atan(((B - A) / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.2e-78], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.4e-122], t$95$0, If[LessEqual[A, -2.55e-294], t$95$1, If[LessEqual[A, 2e-282], t$95$0, If[LessEqual[A, 3.9e-120], t$95$1, N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -3.2 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\

\mathbf{elif}\;A \leq -8.4 \cdot 10^{-122}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq -2.55 \cdot 10^{-294}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;A \leq 2 \cdot 10^{-282}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq 3.9 \cdot 10^{-120}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -3.2e-78

    1. Initial program 26.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. Step-by-step derivation
      1. associate-*l/26.6%

        \[\leadsto 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} \]
      2. *-lft-identity26.6%

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

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

        \[\leadsto 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} \]
      5. unpow226.6%

        \[\leadsto 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} \]
      6. hypot-def54.8%

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

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

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

    if -3.2e-78 < A < -8.39999999999999969e-122 or -2.55000000000000003e-294 < A < 2e-282

    1. Initial program 58.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. Step-by-step derivation
      1. associate-*l/58.5%

        \[\leadsto 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} \]
      2. *-lft-identity58.5%

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

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

        \[\leadsto 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} \]
      5. unpow258.5%

        \[\leadsto 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} \]
      6. hypot-def86.3%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]

    if -8.39999999999999969e-122 < A < -2.55000000000000003e-294 or 2e-282 < A < 3.9000000000000002e-120

    1. Initial program 67.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. Step-by-step derivation
      1. associate-*l/67.4%

        \[\leadsto 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} \]
      2. *-lft-identity67.4%

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

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

        \[\leadsto 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} \]
      5. unpow267.4%

        \[\leadsto 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} \]
      6. hypot-def81.8%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{\left(C + B\right) - A}}{B}\right)}{\pi} \]
    5. Taylor expanded in A around 0 62.5%

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

    if 3.9000000000000002e-120 < A

    1. Initial program 73.8%

      \[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. Step-by-step derivation
      1. associate-*l/73.9%

        \[\leadsto 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} \]
      2. *-lft-identity73.9%

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

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

        \[\leadsto 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} \]
      5. unpow273.9%

        \[\leadsto 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} \]
      6. hypot-def93.6%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{\left(C + B\right) - A}}{B}\right)}{\pi} \]
    5. Taylor expanded in C around 0 68.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.2 \cdot 10^{-78}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -8.4 \cdot 10^{-122}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -2.55 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2 \cdot 10^{-282}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-120}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 11: 60.2% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{if}\;A \leq -4.5 \cdot 10^{-78}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -6.6 \cdot 10^{-122}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -2.8 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5.5 \cdot 10^{-282}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
   (if (<= A -4.5e-78)
     (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
     (if (<= A -6.6e-122)
       t_0
       (if (<= A -2.8e-294)
         (* 180.0 (/ (atan (/ (+ B C) B)) PI))
         (if (<= A 5.5e-282)
           t_0
           (* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI))))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
	double tmp;
	if (A <= -4.5e-78) {
		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
	} else if (A <= -6.6e-122) {
		tmp = t_0;
	} else if (A <= -2.8e-294) {
		tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
	} else if (A <= 5.5e-282) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
	double tmp;
	if (A <= -4.5e-78) {
		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
	} else if (A <= -6.6e-122) {
		tmp = t_0;
	} else if (A <= -2.8e-294) {
		tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
	} else if (A <= 5.5e-282) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan(-1.0) / math.pi)
	tmp = 0
	if A <= -4.5e-78:
		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
	elif A <= -6.6e-122:
		tmp = t_0
	elif A <= -2.8e-294:
		tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi)
	elif A <= 5.5e-282:
		tmp = t_0
	else:
		tmp = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi)
	return tmp
function code(A, B, C)
	t_0 = Float64(180.0 * Float64(atan(-1.0) / pi))
	tmp = 0.0
	if (A <= -4.5e-78)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
	elseif (A <= -6.6e-122)
		tmp = t_0;
	elseif (A <= -2.8e-294)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi));
	elseif (A <= 5.5e-282)
		tmp = t_0;
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan(-1.0) / pi);
	tmp = 0.0;
	if (A <= -4.5e-78)
		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
	elseif (A <= -6.6e-122)
		tmp = t_0;
	elseif (A <= -2.8e-294)
		tmp = 180.0 * (atan(((B + C) / B)) / pi);
	elseif (A <= 5.5e-282)
		tmp = t_0;
	else
		tmp = 180.0 * (atan((((B + C) - A) / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.5e-78], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6.6e-122], t$95$0, If[LessEqual[A, -2.8e-294], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.5e-282], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;A \leq -4.5 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\

\mathbf{elif}\;A \leq -6.6 \cdot 10^{-122}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;A \leq 5.5 \cdot 10^{-282}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -4.5e-78

    1. Initial program 26.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. Step-by-step derivation
      1. associate-*l/26.6%

        \[\leadsto 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} \]
      2. *-lft-identity26.6%

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

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

        \[\leadsto 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} \]
      5. unpow226.6%

        \[\leadsto 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} \]
      6. hypot-def54.8%

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

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

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

    if -4.5e-78 < A < -6.59999999999999999e-122 or -2.79999999999999991e-294 < A < 5.5000000000000001e-282

    1. Initial program 58.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. Step-by-step derivation
      1. associate-*l/58.5%

        \[\leadsto 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} \]
      2. *-lft-identity58.5%

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

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

        \[\leadsto 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} \]
      5. unpow258.5%

        \[\leadsto 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} \]
      6. hypot-def86.3%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]

    if -6.59999999999999999e-122 < A < -2.79999999999999991e-294

    1. Initial program 62.7%

      \[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. Step-by-step derivation
      1. associate-*l/62.7%

        \[\leadsto 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} \]
      2. *-lft-identity62.7%

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

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

        \[\leadsto 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} \]
      5. unpow262.7%

        \[\leadsto 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} \]
      6. hypot-def85.5%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{\left(C + B\right) - A}}{B}\right)}{\pi} \]
    5. Taylor expanded in A around 0 61.1%

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

    if 5.5000000000000001e-282 < A

    1. Initial program 73.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. Step-by-step derivation
      1. associate-*l/73.6%

        \[\leadsto 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} \]
      2. *-lft-identity73.6%

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

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

        \[\leadsto 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} \]
      5. unpow273.6%

        \[\leadsto 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} \]
      6. hypot-def89.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.5 \cdot 10^{-78}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -6.6 \cdot 10^{-122}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -2.8 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5.5 \cdot 10^{-282}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 12: 48.6% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{if}\;A \leq -2.5 \cdot 10^{-77}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -8.2 \cdot 10^{-175}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -1.66 \cdot 10^{-267}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 2.8 \cdot 10^{-282}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.35 \cdot 10^{-130}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan -1.0) PI))) (t_1 (* 180.0 (/ (atan 1.0) PI))))
   (if (<= A -2.5e-77)
     (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
     (if (<= A -8.2e-175)
       t_0
       (if (<= A -1.66e-267)
         t_1
         (if (<= A 2.8e-282)
           t_0
           (if (<= A 1.35e-130) t_1 (* 180.0 (/ (atan (/ (- A) B)) PI)))))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
	double t_1 = 180.0 * (atan(1.0) / ((double) M_PI));
	double tmp;
	if (A <= -2.5e-77) {
		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
	} else if (A <= -8.2e-175) {
		tmp = t_0;
	} else if (A <= -1.66e-267) {
		tmp = t_1;
	} else if (A <= 2.8e-282) {
		tmp = t_0;
	} else if (A <= 1.35e-130) {
		tmp = t_1;
	} else {
		tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
	double t_1 = 180.0 * (Math.atan(1.0) / Math.PI);
	double tmp;
	if (A <= -2.5e-77) {
		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
	} else if (A <= -8.2e-175) {
		tmp = t_0;
	} else if (A <= -1.66e-267) {
		tmp = t_1;
	} else if (A <= 2.8e-282) {
		tmp = t_0;
	} else if (A <= 1.35e-130) {
		tmp = t_1;
	} else {
		tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan(-1.0) / math.pi)
	t_1 = 180.0 * (math.atan(1.0) / math.pi)
	tmp = 0
	if A <= -2.5e-77:
		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
	elif A <= -8.2e-175:
		tmp = t_0
	elif A <= -1.66e-267:
		tmp = t_1
	elif A <= 2.8e-282:
		tmp = t_0
	elif A <= 1.35e-130:
		tmp = t_1
	else:
		tmp = 180.0 * (math.atan((-A / B)) / math.pi)
	return tmp
function code(A, B, C)
	t_0 = Float64(180.0 * Float64(atan(-1.0) / pi))
	t_1 = Float64(180.0 * Float64(atan(1.0) / pi))
	tmp = 0.0
	if (A <= -2.5e-77)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
	elseif (A <= -8.2e-175)
		tmp = t_0;
	elseif (A <= -1.66e-267)
		tmp = t_1;
	elseif (A <= 2.8e-282)
		tmp = t_0;
	elseif (A <= 1.35e-130)
		tmp = t_1;
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan(-1.0) / pi);
	t_1 = 180.0 * (atan(1.0) / pi);
	tmp = 0.0;
	if (A <= -2.5e-77)
		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
	elseif (A <= -8.2e-175)
		tmp = t_0;
	elseif (A <= -1.66e-267)
		tmp = t_1;
	elseif (A <= 2.8e-282)
		tmp = t_0;
	elseif (A <= 1.35e-130)
		tmp = t_1;
	else
		tmp = 180.0 * (atan((-A / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.5e-77], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.2e-175], t$95$0, If[LessEqual[A, -1.66e-267], t$95$1, If[LessEqual[A, 2.8e-282], t$95$0, If[LessEqual[A, 1.35e-130], t$95$1, N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;A \leq -2.5 \cdot 10^{-77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\

\mathbf{elif}\;A \leq -8.2 \cdot 10^{-175}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq -1.66 \cdot 10^{-267}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;A \leq 2.8 \cdot 10^{-282}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq 1.35 \cdot 10^{-130}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -2.49999999999999982e-77

    1. Initial program 26.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. Step-by-step derivation
      1. associate-*l/26.6%

        \[\leadsto 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} \]
      2. *-lft-identity26.6%

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

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

        \[\leadsto 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} \]
      5. unpow226.6%

        \[\leadsto 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} \]
      6. hypot-def54.8%

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

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

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

    if -2.49999999999999982e-77 < A < -8.19999999999999997e-175 or -1.6600000000000001e-267 < A < 2.7999999999999999e-282

    1. Initial program 58.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} \]
    2. Step-by-step derivation
      1. associate-*l/58.0%

        \[\leadsto 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} \]
      2. *-lft-identity58.0%

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

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

        \[\leadsto 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} \]
      5. unpow258.0%

        \[\leadsto 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} \]
      6. hypot-def81.9%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]

    if -8.19999999999999997e-175 < A < -1.6600000000000001e-267 or 2.7999999999999999e-282 < A < 1.34999999999999996e-130

    1. Initial program 70.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. Step-by-step derivation
      1. associate-*l/70.2%

        \[\leadsto 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} \]
      2. *-lft-identity70.2%

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

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

        \[\leadsto 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} \]
      5. unpow270.2%

        \[\leadsto 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} \]
      6. hypot-def83.4%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{1}}{\pi} \]

    if 1.34999999999999996e-130 < A

    1. Initial program 74.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. Step-by-step derivation
      1. associate-*l/74.2%

        \[\leadsto 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} \]
      2. *-lft-identity74.2%

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

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

        \[\leadsto 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} \]
      5. unpow274.2%

        \[\leadsto 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} \]
      6. hypot-def93.7%

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A}{B}\right)}}{\pi} \]
    6. Step-by-step derivation
      1. associate-*r/61.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.5 \cdot 10^{-77}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -8.2 \cdot 10^{-175}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -1.66 \cdot 10^{-267}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 2.8 \cdot 10^{-282}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 1.35 \cdot 10^{-130}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 13: 44.4% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -7 \cdot 10^{-185}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{-289}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 8 \cdot 10^{-161}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.08 \cdot 10^{-66}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
   (if (<= B -7e-185)
     (* 180.0 (/ (atan 1.0) PI))
     (if (<= B 5.5e-289)
       t_0
       (if (<= B 8e-161)
         (* 180.0 (/ (atan (/ C B)) PI))
         (if (<= B 1.08e-66) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
	double tmp;
	if (B <= -7e-185) {
		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
	} else if (B <= 5.5e-289) {
		tmp = t_0;
	} else if (B <= 8e-161) {
		tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
	} else if (B <= 1.08e-66) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
	double tmp;
	if (B <= -7e-185) {
		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
	} else if (B <= 5.5e-289) {
		tmp = t_0;
	} else if (B <= 8e-161) {
		tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
	} else if (B <= 1.08e-66) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi)
	tmp = 0
	if B <= -7e-185:
		tmp = 180.0 * (math.atan(1.0) / math.pi)
	elif B <= 5.5e-289:
		tmp = t_0
	elif B <= 8e-161:
		tmp = 180.0 * (math.atan((C / B)) / math.pi)
	elif B <= 1.08e-66:
		tmp = t_0
	else:
		tmp = 180.0 * (math.atan(-1.0) / math.pi)
	return tmp
function code(A, B, C)
	t_0 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi))
	tmp = 0.0
	if (B <= -7e-185)
		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
	elseif (B <= 5.5e-289)
		tmp = t_0;
	elseif (B <= 8e-161)
		tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi));
	elseif (B <= 1.08e-66)
		tmp = t_0;
	else
		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan((0.0 / B)) / pi);
	tmp = 0.0;
	if (B <= -7e-185)
		tmp = 180.0 * (atan(1.0) / pi);
	elseif (B <= 5.5e-289)
		tmp = t_0;
	elseif (B <= 8e-161)
		tmp = 180.0 * (atan((C / B)) / pi);
	elseif (B <= 1.08e-66)
		tmp = t_0;
	else
		tmp = 180.0 * (atan(-1.0) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -7e-185], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.5e-289], t$95$0, If[LessEqual[B, 8e-161], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.08e-66], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -7 \cdot 10^{-185}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;B \leq 5.5 \cdot 10^{-289}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;B \leq 8 \cdot 10^{-161}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\

\mathbf{elif}\;B \leq 1.08 \cdot 10^{-66}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < -6.9999999999999996e-185

    1. Initial program 56.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. Step-by-step derivation
      1. associate-*l/56.4%

        \[\leadsto 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} \]
      2. *-lft-identity56.4%

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

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

        \[\leadsto 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} \]
      5. unpow256.4%

        \[\leadsto 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} \]
      6. hypot-def74.5%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{1}}{\pi} \]

    if -6.9999999999999996e-185 < B < 5.5000000000000004e-289 or 8.00000000000000022e-161 < B < 1.08000000000000006e-66

    1. Initial program 47.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. Step-by-step derivation
      1. associate-*l/47.2%

        \[\leadsto 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} \]
      2. *-lft-identity47.2%

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

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

        \[\leadsto 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} \]
      5. unpow247.2%

        \[\leadsto 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} \]
      6. hypot-def76.1%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-1 \cdot \left(A + -1 \cdot A\right)}}{B}\right)}{\pi} \]
    5. Step-by-step derivation
      1. distribute-rgt1-in42.8%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1 \cdot \left(\color{blue}{0} \cdot A\right)}{B}\right)}{\pi} \]
      3. mul0-lft42.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1 \cdot \color{blue}{0}}{B}\right)}{\pi} \]
      4. metadata-eval42.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{0}}{B}\right)}{\pi} \]
    6. Simplified42.8%

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

    if 5.5000000000000004e-289 < B < 8.00000000000000022e-161

    1. Initial program 72.7%

      \[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. Step-by-step derivation
      1. associate-*l/72.7%

        \[\leadsto 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} \]
      2. *-lft-identity72.7%

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

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

        \[\leadsto 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} \]
      5. unpow272.7%

        \[\leadsto 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} \]
      6. hypot-def79.0%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \color{blue}{\mathsf{hypot}\left(B, A - C\right)}}{B}\right)}{\pi} \]
    3. Simplified79.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}} \]
    4. Taylor expanded in B around -inf 65.5%

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

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

    if 1.08000000000000006e-66 < B

    1. Initial program 55.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} \]
    2. Step-by-step derivation
      1. associate-*l/55.0%

        \[\leadsto 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} \]
      2. *-lft-identity55.0%

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

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

        \[\leadsto 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} \]
      5. unpow255.0%

        \[\leadsto 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} \]
      6. hypot-def81.9%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -7 \cdot 10^{-185}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{-289}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 8 \cdot 10^{-161}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.08 \cdot 10^{-66}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 14: 45.1% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -8.2 \cdot 10^{-197}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.7 \cdot 10^{-163}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.04 \cdot 10^{-66}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= B -8.2e-197)
   (* 180.0 (/ (atan 1.0) PI))
   (if (<= B 3.7e-163)
     (* 180.0 (/ (atan (/ (- A) B)) PI))
     (if (<= B 1.04e-66)
       (* 180.0 (/ (atan (/ 0.0 B)) PI))
       (* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
	double tmp;
	if (B <= -8.2e-197) {
		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
	} else if (B <= 3.7e-163) {
		tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
	} else if (B <= 1.04e-66) {
		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
	} else {
		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (B <= -8.2e-197) {
		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
	} else if (B <= 3.7e-163) {
		tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
	} else if (B <= 1.04e-66) {
		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
	} else {
		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if B <= -8.2e-197:
		tmp = 180.0 * (math.atan(1.0) / math.pi)
	elif B <= 3.7e-163:
		tmp = 180.0 * (math.atan((-A / B)) / math.pi)
	elif B <= 1.04e-66:
		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
	else:
		tmp = 180.0 * (math.atan(-1.0) / math.pi)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (B <= -8.2e-197)
		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
	elseif (B <= 3.7e-163)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi));
	elseif (B <= 1.04e-66)
		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
	else
		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (B <= -8.2e-197)
		tmp = 180.0 * (atan(1.0) / pi);
	elseif (B <= 3.7e-163)
		tmp = 180.0 * (atan((-A / B)) / pi);
	elseif (B <= 1.04e-66)
		tmp = 180.0 * (atan((0.0 / B)) / pi);
	else
		tmp = 180.0 * (atan(-1.0) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[B, -8.2e-197], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.7e-163], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.04e-66], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.2 \cdot 10^{-197}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

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

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

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < -8.2e-197

    1. Initial program 54.7%

      \[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. Step-by-step derivation
      1. associate-*l/54.7%

        \[\leadsto 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} \]
      2. *-lft-identity54.7%

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

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

        \[\leadsto 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} \]
      5. unpow254.7%

        \[\leadsto 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} \]
      6. hypot-def73.3%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{1}}{\pi} \]

    if -8.2e-197 < B < 3.6999999999999999e-163

    1. Initial program 68.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. Step-by-step derivation
      1. associate-*l/68.4%

        \[\leadsto 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} \]
      2. *-lft-identity68.4%

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

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

        \[\leadsto 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} \]
      5. unpow268.4%

        \[\leadsto 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} \]
      6. hypot-def85.0%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \color{blue}{\mathsf{hypot}\left(B, A - C\right)}}{B}\right)}{\pi} \]
    3. Simplified85.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}} \]
    4. Taylor expanded in B around -inf 55.6%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A}{B}\right)}}{\pi} \]
    6. Step-by-step derivation
      1. associate-*r/47.3%

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

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

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

    if 3.6999999999999999e-163 < B < 1.04e-66

    1. Initial program 21.7%

      \[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. Step-by-step derivation
      1. associate-*l/21.7%

        \[\leadsto 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} \]
      2. *-lft-identity21.7%

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

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

        \[\leadsto 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} \]
      5. unpow221.7%

        \[\leadsto 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} \]
      6. hypot-def57.3%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-1 \cdot \left(A + -1 \cdot A\right)}}{B}\right)}{\pi} \]
    5. Step-by-step derivation
      1. distribute-rgt1-in39.6%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1 \cdot \left(\color{blue}{0} \cdot A\right)}{B}\right)}{\pi} \]
      3. mul0-lft39.6%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1 \cdot \color{blue}{0}}{B}\right)}{\pi} \]
      4. metadata-eval39.6%

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

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

    if 1.04e-66 < B

    1. Initial program 55.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} \]
    2. Step-by-step derivation
      1. associate-*l/55.0%

        \[\leadsto 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} \]
      2. *-lft-identity55.0%

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

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

        \[\leadsto 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} \]
      5. unpow255.0%

        \[\leadsto 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} \]
      6. hypot-def81.9%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8.2 \cdot 10^{-197}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.7 \cdot 10^{-163}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.04 \cdot 10^{-66}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 15: 43.7% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -4.1 \cdot 10^{-190}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.04 \cdot 10^{-66}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= B -4.1e-190)
   (* 180.0 (/ (atan 1.0) PI))
   (if (<= B 1.04e-66)
     (* 180.0 (/ (atan (/ 0.0 B)) PI))
     (* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
	double tmp;
	if (B <= -4.1e-190) {
		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
	} else if (B <= 1.04e-66) {
		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
	} else {
		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (B <= -4.1e-190) {
		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
	} else if (B <= 1.04e-66) {
		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
	} else {
		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if B <= -4.1e-190:
		tmp = 180.0 * (math.atan(1.0) / math.pi)
	elif B <= 1.04e-66:
		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
	else:
		tmp = 180.0 * (math.atan(-1.0) / math.pi)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (B <= -4.1e-190)
		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
	elseif (B <= 1.04e-66)
		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
	else
		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (B <= -4.1e-190)
		tmp = 180.0 * (atan(1.0) / pi);
	elseif (B <= 1.04e-66)
		tmp = 180.0 * (atan((0.0 / B)) / pi);
	else
		tmp = 180.0 * (atan(-1.0) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[B, -4.1e-190], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.04e-66], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.1 \cdot 10^{-190}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

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

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -4.1000000000000002e-190

    1. Initial program 56.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. Step-by-step derivation
      1. associate-*l/56.4%

        \[\leadsto 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} \]
      2. *-lft-identity56.4%

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

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

        \[\leadsto 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} \]
      5. unpow256.4%

        \[\leadsto 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} \]
      6. hypot-def74.5%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{1}}{\pi} \]

    if -4.1000000000000002e-190 < B < 1.04e-66

    1. Initial program 55.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. Step-by-step derivation
      1. associate-*l/55.5%

        \[\leadsto 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} \]
      2. *-lft-identity55.5%

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

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

        \[\leadsto 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} \]
      5. unpow255.5%

        \[\leadsto 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} \]
      6. hypot-def77.1%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-1 \cdot \left(A + -1 \cdot A\right)}}{B}\right)}{\pi} \]
    5. Step-by-step derivation
      1. distribute-rgt1-in34.2%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1 \cdot \left(\color{blue}{0} \cdot A\right)}{B}\right)}{\pi} \]
      3. mul0-lft34.2%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1 \cdot \color{blue}{0}}{B}\right)}{\pi} \]
      4. metadata-eval34.2%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{0}}{B}\right)}{\pi} \]
    6. Simplified34.2%

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

    if 1.04e-66 < B

    1. Initial program 55.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} \]
    2. Step-by-step derivation
      1. associate-*l/55.0%

        \[\leadsto 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} \]
      2. *-lft-identity55.0%

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

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

        \[\leadsto 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} \]
      5. unpow255.0%

        \[\leadsto 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} \]
      6. hypot-def81.9%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification45.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.1 \cdot 10^{-190}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.04 \cdot 10^{-66}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 16: 39.8% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -5.5 \cdot 10^{-305}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= B -5.5e-305)
   (* 180.0 (/ (atan 1.0) PI))
   (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
	double tmp;
	if (B <= -5.5e-305) {
		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
	} else {
		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (B <= -5.5e-305) {
		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
	} else {
		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if B <= -5.5e-305:
		tmp = 180.0 * (math.atan(1.0) / math.pi)
	else:
		tmp = 180.0 * (math.atan(-1.0) / math.pi)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (B <= -5.5e-305)
		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
	else
		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (B <= -5.5e-305)
		tmp = 180.0 * (atan(1.0) / pi);
	else
		tmp = 180.0 * (atan(-1.0) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[B, -5.5e-305], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.5 \cdot 10^{-305}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < -5.5e-305

    1. Initial program 57.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. Step-by-step derivation
      1. associate-*l/57.4%

        \[\leadsto 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} \]
      2. *-lft-identity57.4%

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

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

        \[\leadsto 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} \]
      5. unpow257.4%

        \[\leadsto 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} \]
      6. hypot-def76.4%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{1}}{\pi} \]

    if -5.5e-305 < B

    1. Initial program 54.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. Step-by-step derivation
      1. associate-*l/54.1%

        \[\leadsto 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} \]
      2. *-lft-identity54.1%

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

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

        \[\leadsto 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} \]
      5. unpow254.1%

        \[\leadsto 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} \]
      6. hypot-def78.5%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.5 \cdot 10^{-305}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 17: 20.8% accurate, 2.5× speedup?

\[\begin{array}{l} \\ 180 \cdot \frac{\tan^{-1} -1}{\pi} \end{array} \]
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
	return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
	return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C):
	return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C)
	return Float64(180.0 * Float64(atan(-1.0) / pi))
end
function tmp = code(A, B, C)
	tmp = 180.0 * (atan(-1.0) / pi);
end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Derivation
  1. Initial program 55.7%

    \[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. Step-by-step derivation
    1. associate-*l/55.7%

      \[\leadsto 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} \]
    2. *-lft-identity55.7%

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

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

      \[\leadsto 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} \]
    5. unpow255.7%

      \[\leadsto 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} \]
    6. hypot-def77.5%

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

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

    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
  5. Final simplification20.5%

    \[\leadsto 180 \cdot \frac{\tan^{-1} -1}{\pi} \]

Reproduce

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