ABCF->ab-angle angle

Percentage Accurate: 53.8% → 81.8%
Time: 14.7s
Alternatives: 15
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 15 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: 53.8% 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: 81.8% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 2.2500000000000001e173

    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-def82.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. Simplified82.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}} \]

    if 2.2500000000000001e173 < C

    1. Initial program 4.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/4.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-identity4.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. +-commutative4.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. unpow24.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. unpow24.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-def36.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. Simplified36.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 C around inf 38.4%

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(B, B, A \cdot A - \color{blue}{\left(-1 \cdot A\right) \cdot \left(-1 \cdot A\right)}\right)}{C \cdot B}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}{\pi} \]
      7. difference-of-squares64.6%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(B, B, \color{blue}{\left(A + -1 \cdot A\right) \cdot \left(A - -1 \cdot A\right)}\right)}{C \cdot B}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}{\pi} \]
      8. distribute-rgt1-in64.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 75.9% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -8.4999999999999999e107

    1. Initial program 85.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/85.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-identity85.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. +-commutative85.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. unpow285.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. unpow285.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-def95.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. Simplified95.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 91.7%

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

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

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

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

    if -8.4999999999999999e107 < C < 6.2e170

    1. Initial program 51.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/51.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-identity51.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. +-commutative51.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. unpow251.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. unpow251.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-def78.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. Simplified78.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 C around 0 44.7%

      \[\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-neg44.7%

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

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

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

        \[\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-def72.7%

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

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

    if 6.2e170 < C

    1. Initial program 4.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/4.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-identity4.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. +-commutative4.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. unpow24.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. unpow24.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-def36.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. Simplified36.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 C around inf 38.4%

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(B, B, A \cdot A - \color{blue}{\left(-1 \cdot A\right) \cdot \left(-1 \cdot A\right)}\right)}{C \cdot B}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}{\pi} \]
      7. difference-of-squares64.6%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(B, B, \color{blue}{\left(A + -1 \cdot A\right) \cdot \left(A - -1 \cdot A\right)}\right)}{C \cdot B}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}{\pi} \]
      8. distribute-rgt1-in64.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 56.6% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\ \mathbf{if}\;C \leq -1.12 \cdot 10^{-33}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -3.5 \cdot 10^{-119}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -2.25 \cdot 10^{-220}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 10^{-258}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 4.8 \cdot 10^{-107}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 6.5 \cdot 10^{+53}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan (/ (- (- A) B) B)) PI))))
   (if (<= C -1.12e-33)
     (* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
     (if (<= C -3.5e-119)
       t_0
       (if (<= C -2.25e-220)
         (* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
         (if (<= C 1e-258)
           t_0
           (if (<= C 4.8e-107)
             (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
             (if (<= C 6.5e+53)
               t_0
               (/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)))))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan(((-A - B) / B)) / ((double) M_PI));
	double tmp;
	if (C <= -1.12e-33) {
		tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
	} else if (C <= -3.5e-119) {
		tmp = t_0;
	} else if (C <= -2.25e-220) {
		tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
	} else if (C <= 1e-258) {
		tmp = t_0;
	} else if (C <= 4.8e-107) {
		tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
	} else if (C <= 6.5e+53) {
		tmp = t_0;
	} else {
		tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan(((-A - B) / B)) / Math.PI);
	double tmp;
	if (C <= -1.12e-33) {
		tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
	} else if (C <= -3.5e-119) {
		tmp = t_0;
	} else if (C <= -2.25e-220) {
		tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
	} else if (C <= 1e-258) {
		tmp = t_0;
	} else if (C <= 4.8e-107) {
		tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
	} else if (C <= 6.5e+53) {
		tmp = t_0;
	} else {
		tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan(((-A - B) / B)) / math.pi)
	tmp = 0
	if C <= -1.12e-33:
		tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi)
	elif C <= -3.5e-119:
		tmp = t_0
	elif C <= -2.25e-220:
		tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A)))
	elif C <= 1e-258:
		tmp = t_0
	elif C <= 4.8e-107:
		tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi)
	elif C <= 6.5e+53:
		tmp = t_0
	else:
		tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi
	return tmp
function code(A, B, C)
	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - B) / B)) / pi))
	tmp = 0.0
	if (C <= -1.12e-33)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi));
	elseif (C <= -3.5e-119)
		tmp = t_0;
	elseif (C <= -2.25e-220)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A))));
	elseif (C <= 1e-258)
		tmp = t_0;
	elseif (C <= 4.8e-107)
		tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi));
	elseif (C <= 6.5e+53)
		tmp = t_0;
	else
		tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi);
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan(((-A - B) / B)) / pi);
	tmp = 0.0;
	if (C <= -1.12e-33)
		tmp = 180.0 * (atan(((C * 2.0) / B)) / pi);
	elseif (C <= -3.5e-119)
		tmp = t_0;
	elseif (C <= -2.25e-220)
		tmp = (180.0 / pi) * atan((0.5 * (B / A)));
	elseif (C <= 1e-258)
		tmp = t_0;
	elseif (C <= 4.8e-107)
		tmp = 180.0 * (atan((1.0 - (A / B))) / pi);
	elseif (C <= 6.5e+53)
		tmp = t_0;
	else
		tmp = (180.0 * atan((-0.5 * (B / C)))) / pi;
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[((-A) - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.12e-33], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -3.5e-119], t$95$0, If[LessEqual[C, -2.25e-220], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1e-258], t$95$0, If[LessEqual[C, 4.8e-107], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.5e+53], t$95$0, N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;C \leq -3.5 \cdot 10^{-119}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;C \leq 10^{-258}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;C \leq 6.5 \cdot 10^{+53}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if C < -1.11999999999999999e-33

    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.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-identity74.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. +-commutative74.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. unpow274.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. unpow274.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-def95.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. Simplified95.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 70.7%

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

    if -1.11999999999999999e-33 < C < -3.5e-119 or -2.24999999999999984e-220 < C < 9.99999999999999954e-259 or 4.79999999999999989e-107 < C < 6.50000000000000017e53

    1. Initial program 56.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/56.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-identity56.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. +-commutative56.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. unpow256.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. unpow256.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-def74.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. Simplified74.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 0 56.2%

      \[\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-neg56.2%

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

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

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

        \[\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-def73.8%

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

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

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

    if -3.5e-119 < C < -2.24999999999999984e-220

    1. Initial program 44.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/44.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-identity44.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. +-commutative44.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. unpow244.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. unpow244.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-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 A around -inf 48.4%

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

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

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

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

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

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

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

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

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

    if 9.99999999999999954e-259 < C < 4.79999999999999989e-107

    1. Initial program 55.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/55.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-identity55.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. +-commutative55.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. unpow255.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. unpow255.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-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 C around 0 55.1%

      \[\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-neg55.1%

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

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

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

        \[\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-def84.7%

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

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

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

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

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

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

    if 6.50000000000000017e53 < C

    1. Initial program 17.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/17.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-identity17.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. +-commutative17.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. unpow217.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. unpow217.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-def51.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. Simplified51.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 C around inf 29.1%

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(B, B, A \cdot A - \color{blue}{\left(-1 \cdot A\right) \cdot \left(-1 \cdot A\right)}\right)}{C \cdot B}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}{\pi} \]
      7. difference-of-squares51.1%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(B, B, \color{blue}{\left(A + -1 \cdot A\right) \cdot \left(A - -1 \cdot A\right)}\right)}{C \cdot B}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}{\pi} \]
      8. distribute-rgt1-in51.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.12 \cdot 10^{-33}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -3.5 \cdot 10^{-119}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -2.25 \cdot 10^{-220}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 10^{-258}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.8 \cdot 10^{-107}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 6.5 \cdot 10^{+53}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]

Alternative 4: 43.8% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.4 \cdot 10^{+168}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.25 \cdot 10^{-214}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-195}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-61}:\\ \;\;\;\;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.5 (/ B C))) PI))))
   (if (<= B -1.4e+168)
     (* 180.0 (/ (atan 1.0) PI))
     (if (<= B -1.25e-214)
       t_0
       (if (<= B 4.8e-195)
         (* 180.0 (/ (atan 0.0) PI))
         (if (<= B 5.2e-61) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
	double tmp;
	if (B <= -1.4e+168) {
		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
	} else if (B <= -1.25e-214) {
		tmp = t_0;
	} else if (B <= 4.8e-195) {
		tmp = 180.0 * (atan(0.0) / ((double) M_PI));
	} else if (B <= 5.2e-61) {
		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.5 * (B / C))) / Math.PI);
	double tmp;
	if (B <= -1.4e+168) {
		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
	} else if (B <= -1.25e-214) {
		tmp = t_0;
	} else if (B <= 4.8e-195) {
		tmp = 180.0 * (Math.atan(0.0) / Math.PI);
	} else if (B <= 5.2e-61) {
		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.5 * (B / C))) / math.pi)
	tmp = 0
	if B <= -1.4e+168:
		tmp = 180.0 * (math.atan(1.0) / math.pi)
	elif B <= -1.25e-214:
		tmp = t_0
	elif B <= 4.8e-195:
		tmp = 180.0 * (math.atan(0.0) / math.pi)
	elif B <= 5.2e-61:
		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.5 * Float64(B / C))) / pi))
	tmp = 0.0
	if (B <= -1.4e+168)
		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
	elseif (B <= -1.25e-214)
		tmp = t_0;
	elseif (B <= 4.8e-195)
		tmp = Float64(180.0 * Float64(atan(0.0) / pi));
	elseif (B <= 5.2e-61)
		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.5 * (B / C))) / pi);
	tmp = 0.0;
	if (B <= -1.4e+168)
		tmp = 180.0 * (atan(1.0) / pi);
	elseif (B <= -1.25e-214)
		tmp = t_0;
	elseif (B <= 4.8e-195)
		tmp = 180.0 * (atan(0.0) / pi);
	elseif (B <= 5.2e-61)
		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.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.4e+168], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.25e-214], t$95$0, If[LessEqual[B, 4.8e-195], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.2e-61], 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(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.4 \cdot 10^{+168}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;B \leq -1.25 \cdot 10^{-214}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;B \leq 4.8 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\

\mathbf{elif}\;B \leq 5.2 \cdot 10^{-61}:\\
\;\;\;\;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 < -1.39999999999999995e168

    1. Initial program 18.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/18.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-identity18.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. +-commutative18.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. unpow218.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. unpow218.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-def96.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. Simplified96.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 93.2%

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

    if -1.39999999999999995e168 < B < -1.2499999999999999e-214 or 4.8e-195 < B < 5.20000000000000021e-61

    1. Initial program 57.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/57.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-identity57.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. +-commutative57.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. unpow257.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. unpow257.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-def66.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. Simplified66.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 C around inf 11.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2499999999999999e-214 < B < 4.8e-195

    1. Initial program 69.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/69.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-identity69.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. +-commutative69.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. unpow269.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. unpow269.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-def95.2%

        \[\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. Simplified95.2%

      \[\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. div-sub62.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
    10. Simplified34.9%

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

    if 5.20000000000000021e-61 < B

    1. Initial program 46.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/46.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-identity46.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. +-commutative46.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. unpow246.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. unpow246.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-def75.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. Simplified75.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 59.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.4 \cdot 10^{+168}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.25 \cdot 10^{-214}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-195}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 5: 43.5% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;B \leq 9.5 \cdot 10^{-165}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if B < -1.39999999999999995e168

    1. Initial program 18.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/18.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-identity18.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. +-commutative18.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. unpow218.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. unpow218.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-def96.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. Simplified96.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 93.2%

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

    if -1.39999999999999995e168 < B < -2.1e-217

    1. Initial program 60.3%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Step-by-step derivation
      1. associate-*l/60.3%

        \[\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.3%

        \[\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.3%

        \[\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.3%

        \[\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.3%

        \[\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-def67.2%

        \[\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. Simplified67.2%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(B, B, A \cdot A - \color{blue}{\left(-1 \cdot A\right) \cdot \left(-1 \cdot A\right)}\right)}{C \cdot B}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}{\pi} \]
      7. difference-of-squares30.4%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(B, B, \color{blue}{\left(A + -1 \cdot A\right) \cdot \left(A - -1 \cdot A\right)}\right)}{C \cdot B}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}{\pi} \]
      8. distribute-rgt1-in30.4%

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

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

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

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

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

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

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

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

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

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

    if -2.1e-217 < B < 9.49999999999999973e-165

    1. Initial program 66.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/66.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-identity66.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. +-commutative66.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. unpow266.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. unpow266.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-def92.2%

        \[\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. Simplified92.2%

      \[\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. div-sub60.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
    10. Simplified34.5%

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

    if 9.49999999999999973e-165 < B < 5.59999999999999994e-34

    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-def67.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. Simplified67.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 36.8%

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

    if 5.59999999999999994e-34 < B

    1. Initial program 42.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/42.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-identity42.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. +-commutative42.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. unpow242.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. unpow242.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-def75.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. Simplified75.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 62.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.4 \cdot 10^{+168}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.1 \cdot 10^{-217}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{-165}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 5.6 \cdot 10^{-34}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 6: 52.1% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{if}\;A \leq -1.9 \cdot 10^{+22}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -7.5 \cdot 10^{-87}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -5.6 \cdot 10^{-251}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.1 \cdot 10^{-276}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{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 -1.9e+22)
     (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
     (if (<= A -7.5e-87)
       t_0
       (if (<= A -5.6e-251)
         (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
         (if (<= A 1.1e-276) t_0 (* 180.0 (/ (atan (- 1.0 (/ 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 <= -1.9e+22) {
		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
	} else if (A <= -7.5e-87) {
		tmp = t_0;
	} else if (A <= -5.6e-251) {
		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
	} else if (A <= 1.1e-276) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (atan((1.0 - (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 <= -1.9e+22) {
		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
	} else if (A <= -7.5e-87) {
		tmp = t_0;
	} else if (A <= -5.6e-251) {
		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
	} else if (A <= 1.1e-276) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (Math.atan((1.0 - (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 <= -1.9e+22:
		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
	elif A <= -7.5e-87:
		tmp = t_0
	elif A <= -5.6e-251:
		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
	elif A <= 1.1e-276:
		tmp = t_0
	else:
		tmp = 180.0 * (math.atan((1.0 - (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 <= -1.9e+22)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
	elseif (A <= -7.5e-87)
		tmp = t_0;
	elseif (A <= -5.6e-251)
		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
	elseif (A <= 1.1e-276)
		tmp = t_0;
	else
		tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(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 <= -1.9e+22)
		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
	elseif (A <= -7.5e-87)
		tmp = t_0;
	elseif (A <= -5.6e-251)
		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
	elseif (A <= 1.1e-276)
		tmp = t_0;
	else
		tmp = 180.0 * (atan((1.0 - (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, -1.9e+22], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7.5e-87], t$95$0, If[LessEqual[A, -5.6e-251], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.1e-276], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;A \leq -7.5 \cdot 10^{-87}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;A \leq 1.1 \cdot 10^{-276}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -1.9000000000000002e22

    1. Initial program 23.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/23.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-identity23.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. +-commutative23.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. unpow223.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. unpow223.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-def64.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. Simplified64.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 A around -inf 64.0%

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

    if -1.9000000000000002e22 < A < -7.5000000000000002e-87 or -5.59999999999999978e-251 < A < 1.0999999999999999e-276

    1. Initial program 51.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/51.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-identity51.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. +-commutative51.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. unpow251.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. unpow251.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-def76.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. Simplified76.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 44.6%

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

    if -7.5000000000000002e-87 < A < -5.59999999999999978e-251

    1. Initial program 55.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/55.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-identity55.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. +-commutative55.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. unpow255.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. unpow255.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-def67.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. Simplified67.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 C around inf 15.8%

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(B, B, A \cdot A - \color{blue}{\left(-1 \cdot A\right) \cdot \left(-1 \cdot A\right)}\right)}{C \cdot B}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}{\pi} \]
      7. difference-of-squares18.4%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(B, B, \color{blue}{\left(A + -1 \cdot A\right) \cdot \left(A - -1 \cdot A\right)}\right)}{C \cdot B}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}{\pi} \]
      8. distribute-rgt1-in18.4%

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

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

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

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

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

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

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

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

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

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

    if 1.0999999999999999e-276 < A

    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-def88.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. Simplified88.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 C around 0 58.2%

      \[\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-neg58.2%

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

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

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

        \[\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-def73.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.9 \cdot 10^{+22}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -7.5 \cdot 10^{-87}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -5.6 \cdot 10^{-251}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.1 \cdot 10^{-276}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 7: 55.7% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;C \leq -1.1 \cdot 10^{-180}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;C \leq 0.9:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if C < -4.60000000000000023e-55

    1. Initial program 74.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/74.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-identity74.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. +-commutative74.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. unpow274.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. unpow274.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-def95.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. Simplified95.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 C around -inf 70.3%

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

    if -4.60000000000000023e-55 < C < -1.10000000000000007e-180 or 2.1500000000000001e-294 < C < 0.900000000000000022

    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-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 C around 0 54.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-neg54.6%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right)}{B}\right)}{\pi} \]
      4. unpow254.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-def81.0%

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

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

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

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

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

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

    if -1.10000000000000007e-180 < C < 2.1500000000000001e-294

    1. Initial program 53.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/53.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-identity53.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. +-commutative53.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. unpow253.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. unpow253.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-def68.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. Simplified68.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 52.2%

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

    if 0.900000000000000022 < C

    1. Initial program 18.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/18.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-identity18.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. +-commutative18.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. unpow218.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. unpow218.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-def50.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. Simplified50.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 C around inf 26.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -4.6 \cdot 10^{-55}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -1.1 \cdot 10^{-180}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 2.15 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq 0.9:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]

Alternative 8: 55.8% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;C \leq -1.9 \cdot 10^{-179}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;C \leq 0.0012:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if C < -5.3999999999999996e-47

    1. Initial program 74.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/74.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-identity74.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. +-commutative74.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. unpow274.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. unpow274.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-def95.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. Simplified95.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 C around -inf 70.3%

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

    if -5.3999999999999996e-47 < C < -1.89999999999999987e-179 or 6.99999999999999977e-295 < C < 0.00119999999999999989

    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-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 C around 0 54.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-neg54.6%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right)}{B}\right)}{\pi} \]
      4. unpow254.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-def81.0%

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

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

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

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

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

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

    if -1.89999999999999987e-179 < C < 6.99999999999999977e-295

    1. Initial program 53.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/53.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-identity53.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. +-commutative53.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. unpow253.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. unpow253.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-def68.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. Simplified68.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 35.4%

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

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

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

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

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

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

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

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

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

    if 0.00119999999999999989 < C

    1. Initial program 18.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/18.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-identity18.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. +-commutative18.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. unpow218.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. unpow218.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-def50.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. Simplified50.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 C around inf 26.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -5.4 \cdot 10^{-47}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -1.9 \cdot 10^{-179}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 7 \cdot 10^{-295}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 0.0012:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]

Alternative 9: 55.8% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;C \leq -5.5 \cdot 10^{-181}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;C \leq 0.85:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if C < -8.2000000000000001e-54

    1. Initial program 74.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/74.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-identity74.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. +-commutative74.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. unpow274.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. unpow274.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-def95.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. Simplified95.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 C around -inf 70.3%

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

    if -8.2000000000000001e-54 < C < -5.50000000000000033e-181 or 4.00000000000000024e-295 < C < 0.849999999999999978

    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-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 C around 0 54.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-neg54.6%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right)}{B}\right)}{\pi} \]
      4. unpow254.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-def81.0%

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

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

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

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

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

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

    if -5.50000000000000033e-181 < C < 4.00000000000000024e-295

    1. Initial program 53.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/53.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-identity53.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. +-commutative53.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. unpow253.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. unpow253.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-def68.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. Simplified68.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 35.4%

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

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

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

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

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

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

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

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

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

    if 0.849999999999999978 < C

    1. Initial program 18.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/18.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-identity18.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. +-commutative18.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. unpow218.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. unpow218.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-def50.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. Simplified50.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 C around inf 26.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -8.2 \cdot 10^{-54}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -5.5 \cdot 10^{-181}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 4 \cdot 10^{-295}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 0.85:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]

Alternative 10: 62.7% accurate, 2.4× speedup?

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

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

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


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

    1. Initial program 56.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/56.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-identity56.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. +-commutative56.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. unpow256.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. unpow256.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-def78.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. Simplified78.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 61.7%

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

    if 1.25000000000000001e-42 < B

    1. Initial program 41.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/41.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-identity41.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. +-commutative41.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. unpow241.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. unpow241.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-def74.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. Simplified74.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 C around 0 36.2%

      \[\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-neg36.2%

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

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

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

        \[\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-def66.0%

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

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

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

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

Alternative 11: 66.0% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1 \cdot 10^{-139}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C + B\right) - A}{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 (<= B -1e-139)
   (* 180.0 (/ (atan (/ (- (+ C B) A) B)) PI))
   (* 180.0 (/ (atan (/ (- (- C B) A) B)) PI))))
double code(double A, double B, double C) {
	double tmp;
	if (B <= -1e-139) {
		tmp = 180.0 * (atan((((C + B) - A) / 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 (B <= -1e-139) {
		tmp = 180.0 * (Math.atan((((C + B) - A) / 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 B <= -1e-139:
		tmp = 180.0 * (math.atan((((C + B) - A) / 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 (B <= -1e-139)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C + B) - A) / 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 (B <= -1e-139)
		tmp = 180.0 * (atan((((C + B) - A) / B)) / pi);
	else
		tmp = 180.0 * (atan((((C - B) - A) / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[B, -1e-139], 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[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-139}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C + B\right) - A}{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 2 regimes
  2. if B < -1.00000000000000003e-139

    1. Initial program 47.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/47.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-identity47.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. +-commutative47.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. unpow247.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. unpow247.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-def77.2%

        \[\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.2%

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

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

    if -1.00000000000000003e-139 < 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-def77.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. Simplified77.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 64.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-164.3%

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

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

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

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

Alternative 12: 66.0% accurate, 2.4× speedup?

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

\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 2 regimes
  2. if B < 1.00000000000000004e-134

    1. Initial program 53.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-*r/54.0%

        \[\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/54.0%

        \[\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/54.0%

        \[\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-identity54.0%

        \[\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-neg54.0%

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

        \[\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-neg53.5%

        \[\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-neg53.5%

        \[\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. +-commutative53.5%

        \[\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. unpow253.5%

        \[\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. unpow253.5%

        \[\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-def70.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. Simplified70.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)} \]
    4. Taylor expanded in B around -inf 63.9%

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

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

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

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

    if 1.00000000000000004e-134 < B

    1. Initial program 49.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/49.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-identity49.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. +-commutative49.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. unpow249.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. unpow249.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-def73.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. Simplified73.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 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} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.7%

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

Alternative 13: 44.7% accurate, 2.5× speedup?

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

\mathbf{elif}\;B \leq 1.12 \cdot 10^{-126}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\

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


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

    1. Initial program 48.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/48.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-identity48.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. +-commutative48.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. unpow248.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. unpow248.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-def77.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. Simplified77.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 50.1%

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

    if -2.6000000000000001e-153 < B < 1.12e-126

    1. Initial program 58.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/58.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-identity58.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. +-commutative58.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. unpow258.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. unpow258.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.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. Step-by-step derivation
      1. div-sub54.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
    10. Simplified29.5%

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

    if 1.12e-126 < B

    1. Initial program 49.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/49.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-identity49.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. +-commutative49.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. unpow249.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. unpow249.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-def73.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. Simplified73.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 53.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.6 \cdot 10^{-153}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.12 \cdot 10^{-126}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 14: 29.3% accurate, 2.5× speedup?

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

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


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

    1. Initial program 53.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/53.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-identity53.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. +-commutative53.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. unpow253.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. unpow253.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-def79.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. Simplified79.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. Step-by-step derivation
      1. div-sub64.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
    10. Simplified18.5%

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

    if 1.15000000000000005e-126 < B

    1. Initial program 49.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/49.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-identity49.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. +-commutative49.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. unpow249.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. unpow249.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-def73.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. Simplified73.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 53.5%

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

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

Alternative 15: 21.1% 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 52.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/52.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-identity52.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. +-commutative52.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. unpow252.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. unpow252.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-def77.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. Simplified77.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 22.4%

    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
  5. Final simplification22.4%

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

Reproduce

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