ABCF->ab-angle angle

Percentage Accurate: 54.1% → 80.7%
Time: 16.2s
Alternatives: 19
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 19 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: 54.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (*
  180.0
  (/
   (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
   PI)))
double code(double A, double B, double C) {
	return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
	return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C):
	return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C)
	return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi))
end
function tmp = code(A, B, C)
	tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi);
end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}

Alternative 1: 80.7% accurate, 1.6× speedup?

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

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

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


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

    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-def48.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. Simplified48.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 A around -inf 78.4%

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

    if -7.5000000000000006e57 < A

    1. Initial program 63.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/63.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-identity63.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. +-commutative63.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. unpow263.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. unpow263.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-def84.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. Simplified84.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. Step-by-step derivation
      1. clear-num84.8%

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

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

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

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

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

Alternative 2: 80.9% accurate, 1.6× speedup?

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

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

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


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

    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-def48.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. Simplified48.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 A around -inf 78.4%

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

    if -1.32e60 < A

    1. Initial program 63.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/63.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-identity63.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. +-commutative63.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. unpow263.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. unpow263.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-def84.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. Simplified84.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}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification83.3%

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

Alternative 3: 80.7% accurate, 1.6× speedup?

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

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

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


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

    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-def48.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. Simplified48.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 A around -inf 78.4%

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

    if -7.39999999999999995e59 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.1% accurate, 1.6× speedup?

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

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

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

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


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

    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-def48.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. Simplified48.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 A around -inf 78.4%

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

    if -5.5000000000000002e57 < A < 1.9999999999999999e61

    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-*r/55.1%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 A around 0 51.7%

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

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

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

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

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

    if 1.9999999999999999e61 < A

    1. Initial program 88.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/88.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-identity88.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. +-commutative88.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. unpow288.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. unpow288.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-def99.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. Simplified99.9%

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

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

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

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

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

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

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

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

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

Alternative 5: 75.6% accurate, 1.7× speedup?

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

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

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

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


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

    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-def48.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. Simplified48.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 A around -inf 78.4%

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

    if -1.04999999999999992e59 < A < 4e51

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

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

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

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

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

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

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

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

        \[\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. +-commutative54.6%

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

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

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

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

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

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

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

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

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

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

    if 4e51 < A

    1. Initial program 88.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/88.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-identity88.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. +-commutative88.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. unpow288.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. unpow288.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-def99.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. Simplified99.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 90.9%

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

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

Alternative 6: 54.7% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -1.7 \cdot 10^{+44}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -8.2 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq -8.6 \cdot 10^{-108} \lor \neg \left(A \leq -9.2 \cdot 10^{-225}\right) \land A \leq 3 \cdot 10^{+62}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -1.7e+44)
   (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
   (if (<= A -8.2e-32)
     (* 180.0 (/ (atan 1.0) PI))
     (if (or (<= A -8.6e-108) (and (not (<= A -9.2e-225)) (<= A 3e+62)))
       (* 180.0 (/ (atan (/ (- C B) B)) PI))
       (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -1.7e+44) {
		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
	} else if (A <= -8.2e-32) {
		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
	} else if ((A <= -8.6e-108) || (!(A <= -9.2e-225) && (A <= 3e+62))) {
		tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
	} 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 tmp;
	if (A <= -1.7e+44) {
		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
	} else if (A <= -8.2e-32) {
		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
	} else if ((A <= -8.6e-108) || (!(A <= -9.2e-225) && (A <= 3e+62))) {
		tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
	} else {
		tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if A <= -1.7e+44:
		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
	elif A <= -8.2e-32:
		tmp = 180.0 * (math.atan(1.0) / math.pi)
	elif (A <= -8.6e-108) or (not (A <= -9.2e-225) and (A <= 3e+62)):
		tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi)
	else:
		tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (A <= -1.7e+44)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
	elseif (A <= -8.2e-32)
		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
	elseif ((A <= -8.6e-108) || (!(A <= -9.2e-225) && (A <= 3e+62)))
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi));
	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)
	tmp = 0.0;
	if (A <= -1.7e+44)
		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
	elseif (A <= -8.2e-32)
		tmp = 180.0 * (atan(1.0) / pi);
	elseif ((A <= -8.6e-108) || (~((A <= -9.2e-225)) && (A <= 3e+62)))
		tmp = 180.0 * (atan(((C - B) / B)) / pi);
	else
		tmp = 180.0 * (atan((1.0 - (A / B))) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[A, -1.7e+44], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.2e-32], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -8.6e-108], And[N[Not[LessEqual[A, -9.2e-225]], $MachinePrecision], LessEqual[A, 3e+62]]], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;A \leq -8.2 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;A \leq -8.6 \cdot 10^{-108} \lor \neg \left(A \leq -9.2 \cdot 10^{-225}\right) \land A \leq 3 \cdot 10^{+62}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\

\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.7e44

    1. Initial program 20.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/20.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-identity20.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. +-commutative20.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. unpow220.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. unpow220.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-def49.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. Simplified49.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 A around -inf 77.3%

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

    if -1.7e44 < A < -8.1999999999999995e-32

    1. Initial program 62.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/62.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-identity62.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. +-commutative62.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. unpow262.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. unpow262.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-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. Taylor expanded in B around -inf 50.9%

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

    if -8.1999999999999995e-32 < A < -8.6000000000000001e-108 or -9.1999999999999995e-225 < A < 3e62

    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-def79.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. Simplified79.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 52.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-152.3%

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

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

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

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

    if -8.6000000000000001e-108 < A < -9.1999999999999995e-225 or 3e62 < A

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-\left(A + \sqrt{B \cdot B + A \cdot A}\right)}}{B}\right)}{\pi} \]
    7. Taylor expanded in B around -inf 75.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-neg75.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.7 \cdot 10^{+44}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -8.2 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq -8.6 \cdot 10^{-108} \lor \neg \left(A \leq -9.2 \cdot 10^{-225}\right) \land A \leq 3 \cdot 10^{+62}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 7: 59.1% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;A \leq -5 \cdot 10^{-274}:\\
\;\;\;\;t_0\\

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

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

\mathbf{else}:\\
\;\;\;\;t_0\\


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

    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-def48.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. Simplified48.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 A around -inf 78.4%

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

    if -6.00000000000000033e55 < A < -5e-274 or 1.19999999999999992e-62 < A

    1. Initial program 66.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/66.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-identity66.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. +-commutative66.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. unpow266.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. unpow266.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-def87.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. Simplified87.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 69.3%

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

    if -5e-274 < A < 9.40000000000000011e-98

    1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.40000000000000011e-98 < A < 1.19999999999999992e-62

    1. Initial program 27.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/27.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-identity27.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. +-commutative27.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. unpow227.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. unpow227.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-def41.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. Simplified41.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. Step-by-step derivation
      1. clear-num41.5%

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

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

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

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

      \[\leadsto \frac{180}{\frac{\pi}{\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)}}} \]
    7. Step-by-step derivation
      1. fma-def41.0%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}}} \]
      2. *-commutative41.0%

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

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\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)}}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      6. unpow253.2%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      7. unpow253.2%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      8. difference-of-squares53.2%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      9. distribute-rgt1-in53.2%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      10. metadata-eval53.2%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      11. mul0-lft53.2%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      12. mul-1-neg53.2%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      13. associate-*r/53.2%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}} \]
    8. Simplified53.2%

      \[\leadsto \frac{180}{\frac{\pi}{\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)}}} \]
    9. Taylor expanded in B around 0 75.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -6 \cdot 10^{+55}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -5 \cdot 10^{-274}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 9.4 \cdot 10^{-98}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-62}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 8: 47.2% accurate, 2.4× speedup?

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

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

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

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

\mathbf{elif}\;B \leq 2.1 \cdot 10^{+34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\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 < -8.00000000000000025e-53

    1. Initial program 53.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/53.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-identity53.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. +-commutative53.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. unpow253.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. unpow253.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-def78.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. Simplified78.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 59.4%

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

    if -8.00000000000000025e-53 < B < -6.0000000000000001e-191

    1. Initial program 53.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/53.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-identity53.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. +-commutative53.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. unpow253.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. unpow253.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-def62.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. Simplified62.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 38.5%

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

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

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

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

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

    if -6.0000000000000001e-191 < B < 3.04999999999999982e-242

    1. Initial program 47.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/47.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-identity47.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. +-commutative47.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. unpow247.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. unpow247.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-def89.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. Simplified89.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 58.3%

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

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

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

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

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

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

    if 3.04999999999999982e-242 < B < 2.10000000000000017e34

    1. Initial program 56.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/56.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-identity56.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. +-commutative56.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. unpow256.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. unpow256.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-def69.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. Simplified69.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 53.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-153.3%

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

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

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

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

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

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

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

    if 2.10000000000000017e34 < B

    1. Initial program 51.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/51.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-identity51.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. +-commutative51.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. unpow251.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. unpow251.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-def79.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. Simplified79.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8 \cdot 10^{-53}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -6 \cdot 10^{-191}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.05 \cdot 10^{-242}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{+34}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 9: 58.9% accurate, 2.4× speedup?

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

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

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

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

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


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

    1. Initial program 70.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/70.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-identity70.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. +-commutative70.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. unpow270.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. unpow270.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-def89.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. Simplified89.0%

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

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

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

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

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

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

    if -9.0000000000000003e-27 < C < 1.10000000000000005e-74

    1. Initial program 61.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/61.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-identity61.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. +-commutative61.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. unpow261.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. unpow261.9%

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-\left(A + \sqrt{B \cdot B + A \cdot A}\right)}}{B}\right)}{\pi} \]
    7. Taylor expanded in B around -inf 58.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-neg58.0%

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

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

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

    if 1.10000000000000005e-74 < C < 4.4499999999999999e77

    1. Initial program 35.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/35.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-identity35.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. +-commutative35.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. unpow235.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. unpow235.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-def71.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. Simplified71.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 35.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-neg35.6%

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

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

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

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

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

    if 4.4499999999999999e77 < C

    1. Initial program 18.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/18.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-identity18.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. +-commutative18.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. unpow218.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. unpow218.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-def52.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. Simplified52.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. clear-num52.3%

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

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

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

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

      \[\leadsto \frac{180}{\frac{\pi}{\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)}}} \]
    7. Step-by-step derivation
      1. fma-def47.4%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}}} \]
      2. *-commutative47.4%

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

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\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)}}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      6. unpow256.9%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      7. unpow256.9%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      8. difference-of-squares65.6%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      9. distribute-rgt1-in65.6%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      10. metadata-eval65.6%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      11. mul0-lft65.6%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      12. mul-1-neg65.6%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      13. associate-*r/65.6%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}} \]
    8. Simplified65.6%

      \[\leadsto \frac{180}{\frac{\pi}{\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)}}} \]
    9. Taylor expanded in B around 0 81.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -9 \cdot 10^{-27}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.1 \cdot 10^{-74}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.45 \cdot 10^{+77}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\ \end{array} \]

Alternative 10: 47.5% accurate, 2.4× speedup?

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

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

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

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

\mathbf{elif}\;B \leq 6 \cdot 10^{+28}:\\
\;\;\;\;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 < -4.9999999999999999e-61

    1. Initial program 53.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/53.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-identity53.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. +-commutative53.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. unpow253.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. unpow253.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-def78.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. Simplified78.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 59.4%

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

    if -4.9999999999999999e-61 < B < -3.80000000000000025e-187 or 2.9000000000000001e-242 < B < 6.0000000000000002e28

    1. Initial program 54.7%

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}}{B}\right)}{\pi} \]
      6. hypot-def67.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. Simplified67.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 B around inf 48.0%

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

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

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

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

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

    if -3.80000000000000025e-187 < B < 2.9000000000000001e-242

    1. Initial program 47.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/47.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-identity47.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. +-commutative47.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. unpow247.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. unpow247.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-def89.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. Simplified89.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 58.3%

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

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

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

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

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

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

    if 6.0000000000000002e28 < B

    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-def79.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. Simplified79.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 B around inf 62.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.8 \cdot 10^{-187}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.9 \cdot 10^{-242}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{+28}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 11: 47.3% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{if}\;B \leq -3.6 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.4 \cdot 10^{-190}:\\ \;\;\;\;180 \cdot \frac{t_0}{\pi}\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-242}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{+28}:\\ \;\;\;\;\frac{180}{\frac{\pi}{t_0}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (atan (/ C B))))
   (if (<= B -3.6e-48)
     (* 180.0 (/ (atan 1.0) PI))
     (if (<= B -1.4e-190)
       (* 180.0 (/ t_0 PI))
       (if (<= B 3.1e-242)
         (* 180.0 (/ (atan (/ 0.0 B)) PI))
         (if (<= B 6e+28)
           (/ 180.0 (/ PI t_0))
           (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
	double t_0 = atan((C / B));
	double tmp;
	if (B <= -3.6e-48) {
		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
	} else if (B <= -1.4e-190) {
		tmp = 180.0 * (t_0 / ((double) M_PI));
	} else if (B <= 3.1e-242) {
		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
	} else if (B <= 6e+28) {
		tmp = 180.0 / (((double) M_PI) / 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 = Math.atan((C / B));
	double tmp;
	if (B <= -3.6e-48) {
		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
	} else if (B <= -1.4e-190) {
		tmp = 180.0 * (t_0 / Math.PI);
	} else if (B <= 3.1e-242) {
		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
	} else if (B <= 6e+28) {
		tmp = 180.0 / (Math.PI / t_0);
	} else {
		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = math.atan((C / B))
	tmp = 0
	if B <= -3.6e-48:
		tmp = 180.0 * (math.atan(1.0) / math.pi)
	elif B <= -1.4e-190:
		tmp = 180.0 * (t_0 / math.pi)
	elif B <= 3.1e-242:
		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
	elif B <= 6e+28:
		tmp = 180.0 / (math.pi / t_0)
	else:
		tmp = 180.0 * (math.atan(-1.0) / math.pi)
	return tmp
function code(A, B, C)
	t_0 = atan(Float64(C / B))
	tmp = 0.0
	if (B <= -3.6e-48)
		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
	elseif (B <= -1.4e-190)
		tmp = Float64(180.0 * Float64(t_0 / pi));
	elseif (B <= 3.1e-242)
		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
	elseif (B <= 6e+28)
		tmp = Float64(180.0 / Float64(pi / 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 = atan((C / B));
	tmp = 0.0;
	if (B <= -3.6e-48)
		tmp = 180.0 * (atan(1.0) / pi);
	elseif (B <= -1.4e-190)
		tmp = 180.0 * (t_0 / pi);
	elseif (B <= 3.1e-242)
		tmp = 180.0 * (atan((0.0 / B)) / pi);
	elseif (B <= 6e+28)
		tmp = 180.0 / (pi / t_0);
	else
		tmp = 180.0 * (atan(-1.0) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, -3.6e-48], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.4e-190], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-242], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6e+28], N[(180.0 / N[(Pi / t$95$0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;B \leq -1.4 \cdot 10^{-190}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\

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

\mathbf{elif}\;B \leq 6 \cdot 10^{+28}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t_0}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if B < -3.6000000000000002e-48

    1. Initial program 53.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/53.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-identity53.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. +-commutative53.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. unpow253.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. unpow253.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-def78.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. Simplified78.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 59.4%

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

    if -3.6000000000000002e-48 < B < -1.40000000000000003e-190

    1. Initial program 53.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/53.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-identity53.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. +-commutative53.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. unpow253.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. unpow253.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-def62.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. Simplified62.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 38.5%

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

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

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

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

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

    if -1.40000000000000003e-190 < B < 3.10000000000000015e-242

    1. Initial program 47.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/47.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-identity47.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. +-commutative47.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. unpow247.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. unpow247.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-def89.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. Simplified89.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 58.3%

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

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

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

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

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

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

    if 3.10000000000000015e-242 < B < 6.0000000000000002e28

    1. Initial program 55.4%

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}}{B}\right)}{\pi} \]
      6. hypot-def69.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. Simplified69.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 52.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}} \]
    9. Applied egg-rr29.7%

      \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}} \]
    10. Step-by-step derivation
      1. associate-/l*29.7%

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

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

    if 6.0000000000000002e28 < B

    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-def79.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. Simplified79.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 B around inf 62.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.6 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.4 \cdot 10^{-190}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-242}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{+28}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 12: 50.6% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;A \leq -8.5 \cdot 10^{-272}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;A \leq 2.7 \cdot 10^{-182}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\

\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.65000000000000007e44

    1. Initial program 20.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/20.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-identity20.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. +-commutative20.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. unpow220.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. unpow220.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-def49.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. Simplified49.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 A around -inf 77.3%

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

    if -1.65000000000000007e44 < A < -8.5000000000000001e-272

    1. Initial program 46.9%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Step-by-step derivation
      1. associate-*l/46.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-identity46.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. +-commutative46.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. unpow246.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. unpow246.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-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 39.2%

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

    if -8.5000000000000001e-272 < A < 2.69999999999999999e-182

    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-def80.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. Simplified80.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 45.6%

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

    if 2.69999999999999999e-182 < A

    1. Initial program 79.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/79.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-identity79.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. +-commutative79.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. unpow279.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. unpow279.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-def92.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. Simplified92.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 72.5%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.65 \cdot 10^{+44}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -8.5 \cdot 10^{-272}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 2.7 \cdot 10^{-182}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 13: 58.0% accurate, 2.4× speedup?

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

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

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

\mathbf{elif}\;C \leq 2.8 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\

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


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

    1. Initial program 70.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/70.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-identity70.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. +-commutative70.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. unpow270.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. unpow270.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-def89.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. Simplified89.0%

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

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

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

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

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

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

    if -9.7999999999999998e-26 < C < 1.8999999999999999e-69

    1. Initial program 62.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/62.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-identity62.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. +-commutative62.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. unpow262.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. unpow262.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-def81.3%

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-\left(A + \sqrt{B \cdot B + A \cdot A}\right)}}{B}\right)}{\pi} \]
    7. Taylor expanded in B around -inf 58.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-neg58.3%

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

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

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

    if 1.8999999999999999e-69 < C < 2.80000000000000017e31

    1. Initial program 32.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/32.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-identity32.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. +-commutative32.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. unpow232.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. unpow232.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-def80.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. Simplified80.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 53.9%

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

    if 2.80000000000000017e31 < C

    1. Initial program 21.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/21.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-identity21.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. +-commutative21.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. unpow221.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. unpow221.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-def52.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. Simplified52.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. clear-num52.4%

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

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

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

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

      \[\leadsto \frac{180}{\frac{\pi}{\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)}}} \]
    7. Step-by-step derivation
      1. fma-def42.6%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}}} \]
      2. *-commutative42.6%

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

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\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)}}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      6. unpow250.6%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      7. unpow250.6%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      8. difference-of-squares59.7%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      9. distribute-rgt1-in59.7%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      10. metadata-eval59.7%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      11. mul0-lft59.7%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      12. mul-1-neg59.7%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}{B \cdot C}, -1 \cdot \frac{A + -1 \cdot A}{B}\right)\right)}} \]
      13. associate-*r/59.7%

        \[\leadsto \frac{180}{\frac{\pi}{\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)}} \]
    8. Simplified59.7%

      \[\leadsto \frac{180}{\frac{\pi}{\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)}}} \]
    9. Taylor expanded in B around 0 74.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -9.8 \cdot 10^{-26}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.9 \cdot 10^{-69}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 2.8 \cdot 10^{+31}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\ \end{array} \]

Alternative 14: 64.8% accurate, 2.4× speedup?

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

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

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


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

    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-def74.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. Simplified74.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 70.6%

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

    if -6.8000000000000004e-193 < B < 2.7e-242

    1. Initial program 46.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/46.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-identity46.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. +-commutative46.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. unpow246.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. unpow246.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-def89.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. Simplified89.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 C around inf 59.9%

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

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

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

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

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

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

    if 2.7e-242 < B

    1. Initial program 53.7%

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}}{B}\right)}{\pi} \]
      6. hypot-def74.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. Simplified74.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 65.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-165.4%

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

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

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

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

Alternative 15: 64.8% accurate, 2.4× speedup?

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

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

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

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


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

    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-def74.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. Simplified74.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 70.6%

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

    if -5.60000000000000007e-192 < B < 2.29999999999999985e-242

    1. Initial program 46.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/46.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-identity46.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. +-commutative46.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. unpow246.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. unpow246.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-def89.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. Simplified89.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 C around inf 59.9%

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

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

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

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

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

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

    if 2.29999999999999985e-242 < B

    1. Initial program 53.7%

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}}{B}\right)}{\pi} \]
      6. hypot-def74.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. Simplified74.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. Step-by-step derivation
      1. clear-num74.4%

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

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

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

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

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

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

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

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

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

Alternative 16: 45.8% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;A \leq -1.6 \cdot 10^{-271}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;A \leq 1.75 \cdot 10^{-112}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\

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


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

    1. Initial program 20.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/20.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-identity20.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. +-commutative20.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. unpow220.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. unpow220.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-def49.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. Simplified49.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 A around -inf 77.3%

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

    if -1.54999999999999998e44 < A < -1.59999999999999989e-271

    1. Initial program 46.9%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Step-by-step derivation
      1. associate-*l/46.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-identity46.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. +-commutative46.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. unpow246.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. unpow246.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-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 39.2%

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

    if -1.59999999999999989e-271 < A < 1.74999999999999997e-112

    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-def84.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. Simplified84.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 42.9%

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

    if 1.74999999999999997e-112 < A

    1. Initial program 81.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/81.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-identity81.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. +-commutative81.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. unpow281.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. unpow281.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.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. Simplified92.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. Step-by-step derivation
      1. clear-num92.8%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.55 \cdot 10^{+44}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.6 \cdot 10^{-271}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.75 \cdot 10^{-112}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{-A}{B}\right)}}\\ \end{array} \]

Alternative 17: 45.4% accurate, 2.5× speedup?

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

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

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

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


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

    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-def74.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. Simplified74.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 49.4%

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

    if -2.5e-191 < B < 2.59999999999999994e-94

    1. Initial program 53.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/53.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-identity53.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. +-commutative53.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. unpow253.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. unpow253.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-def87.3%

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

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

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

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

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

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

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

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

    if 2.59999999999999994e-94 < B

    1. Initial program 50.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/50.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-identity50.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. +-commutative50.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. unpow250.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. unpow250.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-def70.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. Simplified70.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 48.2%

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

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

Alternative 18: 40.6% accurate, 2.5× speedup?

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

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

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


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

    1. Initial program 52.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/52.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-identity52.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. +-commutative52.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. unpow252.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. unpow252.4%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}}{B}\right)}{\pi} \]
      6. hypot-def74.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. Simplified74.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 43.5%

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

    if -2.6999999999999999e-281 < B

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}}{B}\right)}{\pi} \]
      6. hypot-def78.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. Simplified78.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 35.2%

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

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

Alternative 19: 21.7% 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.7%

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}}{B}\right)}{\pi} \]
    6. hypot-def76.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. Simplified76.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 19.6%

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

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

Reproduce

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