ABCF->ab-angle angle

Percentage Accurate: 53.9% → 88.4%
Time: 17.8s
Alternatives: 22
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 22 alternatives:

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

Initial Program: 53.9% 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: 88.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\ \mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\ \;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0
         (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
   (if (or (<= t_0 -0.5) (not (<= t_0 0.0)))
     (* (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ 180.0 PI))
     (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))))
double code(double A, double B, double C) {
	double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
	double tmp;
	if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
		tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / ((double) M_PI));
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
	double tmp;
	if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
		tmp = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) * (180.0 / Math.PI);
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
	}
	return tmp;
}
def code(A, B, C):
	t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0))))
	tmp = 0
	if (t_0 <= -0.5) or not (t_0 <= 0.0):
		tmp = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) * (180.0 / math.pi)
	else:
		tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A)))
	return tmp
function code(A, B, C)
	t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))
	tmp = 0.0
	if ((t_0 <= -0.5) || !(t_0 <= 0.0))
		tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) * Float64(180.0 / pi));
	else
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A))));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0))));
	tmp = 0.0;
	if ((t_0 <= -0.5) || ~((t_0 <= 0.0)))
		tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / pi);
	else
		tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A)));
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[Or[LessEqual[t$95$0, -0.5], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.5 or -0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))

    1. Initial program 55.9%

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

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

        \[\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. *-commutative55.9%

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

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

    if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0

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

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

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

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

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

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

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

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

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

Alternative 2: 77.0% accurate, 1.6× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.09999999999999998e96 < C < 2.2e67

    1. Initial program 54.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/54.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/54.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. *-commutative54.2%

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

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

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

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

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

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

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

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

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

    if 2.2e67 < C

    1. Initial program 15.9%

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

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

        \[\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. *-commutative15.9%

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

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

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

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

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

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

Alternative 3: 77.0% accurate, 1.7× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.54999999999999991e97 < C < 9.2e66

    1. Initial program 54.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/54.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/54.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/54.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-identity54.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-neg54.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-53.0%

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

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

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

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

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

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

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

      \[\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. Step-by-step derivation
      1. add-cube-cbrt70.1%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{-\left(A + \mathsf{hypot}\left(A, B\right)\right)}{B}\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u45.5%

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(-\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}\right)} - 1 \]
      4. atan-neg45.5%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \left(-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)\right)\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def45.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.2e66 < C

    1. Initial program 15.9%

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

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

        \[\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. *-commutative15.9%

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

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

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

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

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

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

Alternative 4: 43.0% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} 0\\ \mathbf{if}\;B \leq -2.35 \cdot 10^{-35}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -1.3 \cdot 10^{-180}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -6.4 \cdot 10^{-227}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -1.45 \cdot 10^{-291}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;B \leq 2.9 \cdot 10^{-115}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{+133}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (/ 180.0 PI) (atan (/ (- A) B))))
        (t_1 (* (/ 180.0 PI) (atan 0.0))))
   (if (<= B -2.35e-35)
     (* (/ 180.0 PI) (atan 1.0))
     (if (<= B -1.3e-180)
       t_0
       (if (<= B -6.4e-227)
         t_1
         (if (<= B -1.45e-291)
           (* (/ 180.0 PI) (atan (/ C B)))
           (if (<= B 2.9e-115)
             t_1
             (if (<= B 4.4e+133) t_0 (* (/ 180.0 PI) (atan -1.0))))))))))
double code(double A, double B, double C) {
	double t_0 = (180.0 / ((double) M_PI)) * atan((-A / B));
	double t_1 = (180.0 / ((double) M_PI)) * atan(0.0);
	double tmp;
	if (B <= -2.35e-35) {
		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
	} else if (B <= -1.3e-180) {
		tmp = t_0;
	} else if (B <= -6.4e-227) {
		tmp = t_1;
	} else if (B <= -1.45e-291) {
		tmp = (180.0 / ((double) M_PI)) * atan((C / B));
	} else if (B <= 2.9e-115) {
		tmp = t_1;
	} else if (B <= 4.4e+133) {
		tmp = t_0;
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = (180.0 / Math.PI) * Math.atan((-A / B));
	double t_1 = (180.0 / Math.PI) * Math.atan(0.0);
	double tmp;
	if (B <= -2.35e-35) {
		tmp = (180.0 / Math.PI) * Math.atan(1.0);
	} else if (B <= -1.3e-180) {
		tmp = t_0;
	} else if (B <= -6.4e-227) {
		tmp = t_1;
	} else if (B <= -1.45e-291) {
		tmp = (180.0 / Math.PI) * Math.atan((C / B));
	} else if (B <= 2.9e-115) {
		tmp = t_1;
	} else if (B <= 4.4e+133) {
		tmp = t_0;
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(-1.0);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = (180.0 / math.pi) * math.atan((-A / B))
	t_1 = (180.0 / math.pi) * math.atan(0.0)
	tmp = 0
	if B <= -2.35e-35:
		tmp = (180.0 / math.pi) * math.atan(1.0)
	elif B <= -1.3e-180:
		tmp = t_0
	elif B <= -6.4e-227:
		tmp = t_1
	elif B <= -1.45e-291:
		tmp = (180.0 / math.pi) * math.atan((C / B))
	elif B <= 2.9e-115:
		tmp = t_1
	elif B <= 4.4e+133:
		tmp = t_0
	else:
		tmp = (180.0 / math.pi) * math.atan(-1.0)
	return tmp
function code(A, B, C)
	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B)))
	t_1 = Float64(Float64(180.0 / pi) * atan(0.0))
	tmp = 0.0
	if (B <= -2.35e-35)
		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
	elseif (B <= -1.3e-180)
		tmp = t_0;
	elseif (B <= -6.4e-227)
		tmp = t_1;
	elseif (B <= -1.45e-291)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B)));
	elseif (B <= 2.9e-115)
		tmp = t_1;
	elseif (B <= 4.4e+133)
		tmp = t_0;
	else
		tmp = Float64(Float64(180.0 / pi) * atan(-1.0));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = (180.0 / pi) * atan((-A / B));
	t_1 = (180.0 / pi) * atan(0.0);
	tmp = 0.0;
	if (B <= -2.35e-35)
		tmp = (180.0 / pi) * atan(1.0);
	elseif (B <= -1.3e-180)
		tmp = t_0;
	elseif (B <= -6.4e-227)
		tmp = t_1;
	elseif (B <= -1.45e-291)
		tmp = (180.0 / pi) * atan((C / B));
	elseif (B <= 2.9e-115)
		tmp = t_1;
	elseif (B <= 4.4e+133)
		tmp = t_0;
	else
		tmp = (180.0 / pi) * atan(-1.0);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.35e-35], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.3e-180], t$95$0, If[LessEqual[B, -6.4e-227], t$95$1, If[LessEqual[B, -1.45e-291], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.9e-115], t$95$1, If[LessEqual[B, 4.4e+133], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;B \leq -1.3 \cdot 10^{-180}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;B \leq -6.4 \cdot 10^{-227}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;B \leq 2.9 \cdot 10^{-115}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;B \leq 4.4 \cdot 10^{+133}:\\
\;\;\;\;t_0\\

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


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

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

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

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

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

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

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

    if -2.35e-35 < B < -1.2999999999999999e-180 or 2.8999999999999998e-115 < B < 4.4e133

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

        \[\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/72.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-identity72.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-neg72.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-72.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2999999999999999e-180 < B < -6.40000000000000021e-227 or -1.45000000000000001e-291 < B < 2.8999999999999998e-115

    1. Initial program 36.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/36.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/36.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/36.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-identity36.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-neg36.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-32.8%

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

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

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

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

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

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

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

      \[\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. Step-by-step derivation
      1. div-sub27.4%

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

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

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

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

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

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

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

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

    if -6.40000000000000021e-227 < B < -1.45000000000000001e-291

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.4e133 < B

    1. Initial program 29.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/29.6%

        \[\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/29.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. *-commutative29.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.35 \cdot 10^{-35}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -1.3 \cdot 10^{-180}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \mathbf{elif}\;B \leq -6.4 \cdot 10^{-227}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\ \mathbf{elif}\;B \leq -1.45 \cdot 10^{-291}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;B \leq 2.9 \cdot 10^{-115}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{+133}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]

Alternative 5: 47.8% accurate, 2.4× speedup?

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

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

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

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

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

\mathbf{elif}\;A \leq 2.35 \cdot 10^{-79}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if A < -4.09999999999999993e-97

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

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

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

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

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

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

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

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

    if -4.09999999999999993e-97 < A < -2.0999999999999999e-172

    1. Initial program 28.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/28.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/28.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. *-commutative28.2%

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

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

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

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

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

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

    if -2.0999999999999999e-172 < A < -1.9000000000000001e-239 or 2.90000000000000009e-259 < A < 2.3500000000000001e-79

    1. Initial program 74.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/74.6%

        \[\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/74.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. *-commutative74.6%

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

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

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

    if -1.9000000000000001e-239 < A < 2.90000000000000009e-259

    1. Initial program 50.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/50.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/50.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. *-commutative50.2%

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

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

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

    if 2.3500000000000001e-79 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.1 \cdot 10^{-97}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;A \leq -2.1 \cdot 10^{-172}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq -1.9 \cdot 10^{-239}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;A \leq 2.9 \cdot 10^{-259}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;A \leq 2.35 \cdot 10^{-79}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \end{array} \]

Alternative 6: 47.9% accurate, 2.4× speedup?

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

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

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

\mathbf{elif}\;A \leq -3.8 \cdot 10^{-239}:\\
\;\;\;\;t_0\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if A < -2.85000000000000016e-99

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

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

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

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

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

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

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

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

    if -2.85000000000000016e-99 < A < -3.89999999999999987e-173

    1. Initial program 28.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/28.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/28.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. *-commutative28.2%

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

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

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

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

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

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

    if -3.89999999999999987e-173 < A < -3.8000000000000002e-239 or 1.3e-256 < A < 7.50000000000000041e-78

    1. Initial program 74.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/74.6%

        \[\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/74.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. *-commutative74.6%

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

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

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

    if -3.8000000000000002e-239 < A < 1.3e-256

    1. Initial program 50.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/50.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/50.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. *-commutative50.2%

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

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

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

    if 7.50000000000000041e-78 < A

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.85 \cdot 10^{-99}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;A \leq -3.9 \cdot 10^{-173}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq -3.8 \cdot 10^{-239}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;A \leq 1.3 \cdot 10^{-256}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;A \leq 7.5 \cdot 10^{-78}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \end{array} \]

Alternative 7: 51.8% accurate, 2.4× speedup?

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

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

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

\mathbf{elif}\;A \leq -1.45 \cdot 10^{-236}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;A \leq 4.6 \cdot 10^{-97}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if A < -2.89999999999999985e-99

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

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

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

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

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

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

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

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

    if -2.89999999999999985e-99 < A < -3.05e-171

    1. Initial program 28.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/28.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/28.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. *-commutative28.2%

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

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

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

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

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

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

    if -3.05e-171 < A < -1.45e-236 or 3.00000000000000002e-255 < A < 4.59999999999999988e-97

    1. Initial program 73.5%

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

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

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

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

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

    if -1.45e-236 < A < 3.00000000000000002e-255

    1. Initial program 50.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/50.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/50.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. *-commutative50.2%

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

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

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

    if 4.59999999999999988e-97 < A

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

        \[\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. +-commutative79.9%

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

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

        \[\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-def95.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. Simplified95.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. Step-by-step derivation
      1. add-cube-cbrt94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.9 \cdot 10^{-99}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;A \leq -3.05 \cdot 10^{-171}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq -1.45 \cdot 10^{-236}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;A \leq 3 \cdot 10^{-255}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;A \leq 4.6 \cdot 10^{-97}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\ \end{array} \]

Alternative 8: 57.7% accurate, 2.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if A < -6.9999999999999998e96

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

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

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

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

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

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

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

    if -6.9999999999999998e96 < A < -1.4499999999999999e-71

    1. Initial program 24.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/24.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/24.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/24.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-identity24.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-neg24.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-24.0%

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

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

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

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

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

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

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

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

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

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

    if -1.4499999999999999e-71 < A < -5.79999999999999971e-99

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

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

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

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

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

    if -5.79999999999999971e-99 < A < -3.9499999999999999e-171

    1. Initial program 28.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/28.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/28.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. *-commutative28.2%

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

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

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

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

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

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

    if -3.9499999999999999e-171 < A < 3.8000000000000001e-79

    1. Initial program 67.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/67.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/67.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/67.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-identity67.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-neg67.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-67.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-neg67.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-neg67.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. +-commutative67.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. unpow267.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. unpow267.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-def88.7%

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

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

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

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

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

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

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

    if 3.8000000000000001e-79 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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. Step-by-step derivation
      1. add-cube-cbrt94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7 \cdot 10^{+96}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;A \leq -1.45 \cdot 10^{-71}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{elif}\;A \leq -5.8 \cdot 10^{-99}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -3.95 \cdot 10^{-171}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{-79}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\ \end{array} \]

Alternative 9: 57.6% accurate, 2.4× speedup?

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

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

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

\mathbf{elif}\;A \leq -3 \cdot 10^{-99}:\\
\;\;\;\;\frac{180}{\pi} \cdot t_0\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if A < -6.9999999999999998e96

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right) \cdot \frac{180}{\pi}\right)\right)} \]
      2. expm1-udef51.7%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right) \cdot \frac{180}{\pi}\right)} - 1} \]
      3. *-commutative51.7%

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{0.5}{\frac{A}{B}}\right)}\right)} - 1 \]
    8. Applied egg-rr51.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\right)} - 1} \]
    9. Step-by-step derivation
      1. expm1-def78.4%

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

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)} \]
      3. associate-/r/81.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)}{\frac{\pi}{180}}} \]
      5. associate-/r/81.1%

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

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

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

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

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

        \[\leadsto \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi \cdot \color{blue}{0.005555555555555556}} \]
    12. Applied egg-rr81.2%

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

    if -6.9999999999999998e96 < A < -7.00000000000000026e-68

    1. Initial program 24.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/24.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/24.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/24.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-identity24.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-neg24.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-24.0%

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

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

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

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

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

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

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

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

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

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

    if -7.00000000000000026e-68 < A < -3.00000000000000006e-99

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

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

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

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

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

    if -3.00000000000000006e-99 < A < -8.2e-171

    1. Initial program 28.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/28.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/28.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. *-commutative28.2%

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

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

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

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

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

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

    if -8.2e-171 < A < 2.3000000000000002e-78

    1. Initial program 67.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/67.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/67.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/67.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-identity67.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-neg67.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-67.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-neg67.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-neg67.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. +-commutative67.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. unpow267.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. unpow267.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-def88.7%

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

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

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

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

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

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

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

    if 2.3000000000000002e-78 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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. Step-by-step derivation
      1. add-cube-cbrt94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7 \cdot 10^{+96}:\\ \;\;\;\;\frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -7 \cdot 10^{-68}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{elif}\;A \leq -3 \cdot 10^{-99}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -8.2 \cdot 10^{-171}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq 2.3 \cdot 10^{-78}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\ \end{array} \]

Alternative 10: 47.7% accurate, 2.4× speedup?

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

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

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

\mathbf{elif}\;A \leq -9.8 \cdot 10^{-237}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;A \leq 3.1 \cdot 10^{-77}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if A < -2.2999999999999998e-99

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

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

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

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

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

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

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

    if -2.2999999999999998e-99 < A < -6.50000000000000009e-174

    1. Initial program 28.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/28.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/28.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. *-commutative28.2%

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

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

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

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

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

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

    if -6.50000000000000009e-174 < A < -9.8000000000000002e-237 or 1.4e-259 < A < 3.10000000000000008e-77

    1. Initial program 74.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/74.6%

        \[\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/74.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/74.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-identity74.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-neg74.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-74.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-neg74.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-neg74.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. +-commutative74.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. unpow274.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. unpow274.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-def92.7%

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

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

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

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

    if -9.8000000000000002e-237 < A < 1.4e-259

    1. Initial program 50.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/50.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/50.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. *-commutative50.2%

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

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

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

    if 3.10000000000000008e-77 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.3 \cdot 10^{-99}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -6.5 \cdot 10^{-174}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq -9.8 \cdot 10^{-237}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;A \leq 1.4 \cdot 10^{-259}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;A \leq 3.1 \cdot 10^{-77}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \end{array} \]

Alternative 11: 47.8% accurate, 2.4× speedup?

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

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

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

\mathbf{elif}\;A \leq -1.3 \cdot 10^{-237}:\\
\;\;\;\;t_0\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if A < -3.29999999999999986e-99

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

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

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

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

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

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

    if -3.29999999999999986e-99 < A < -9.4999999999999994e-171

    1. Initial program 28.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/28.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/28.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. *-commutative28.2%

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

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

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

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

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

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

    if -9.4999999999999994e-171 < A < -1.3000000000000001e-237 or 1.05e-262 < A < 2.80000000000000024e-78

    1. Initial program 74.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/74.6%

        \[\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/74.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/74.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-identity74.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-neg74.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-74.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-neg74.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-neg74.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. +-commutative74.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. unpow274.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. unpow274.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-def92.7%

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

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

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

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

    if -1.3000000000000001e-237 < A < 1.05e-262

    1. Initial program 50.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/50.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/50.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. *-commutative50.2%

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

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

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

    if 2.80000000000000024e-78 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.3 \cdot 10^{-99}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -9.5 \cdot 10^{-171}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq -1.3 \cdot 10^{-237}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;A \leq 1.05 \cdot 10^{-262}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;A \leq 2.8 \cdot 10^{-78}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \end{array} \]

Alternative 12: 47.8% accurate, 2.4× speedup?

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

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

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

\mathbf{elif}\;A \leq -1.5 \cdot 10^{-240}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;A \leq 5.6 \cdot 10^{-80}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if A < -2.49999999999999985e-99

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

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

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

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

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

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

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

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

    if -2.49999999999999985e-99 < A < -4.40000000000000018e-172

    1. Initial program 28.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/28.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/28.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. *-commutative28.2%

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

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

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

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

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

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

    if -4.40000000000000018e-172 < A < -1.49999999999999995e-240 or 3.50000000000000014e-256 < A < 5.59999999999999978e-80

    1. Initial program 74.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/74.6%

        \[\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/74.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/74.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-identity74.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-neg74.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-74.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-neg74.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-neg74.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. +-commutative74.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. unpow274.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. unpow274.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-def92.7%

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

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

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

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

    if -1.49999999999999995e-240 < A < 3.50000000000000014e-256

    1. Initial program 50.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/50.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/50.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. *-commutative50.2%

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

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

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

    if 5.59999999999999978e-80 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.5 \cdot 10^{-99}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;A \leq -4.4 \cdot 10^{-172}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq -1.5 \cdot 10^{-240}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;A \leq 3.5 \cdot 10^{-256}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;A \leq 5.6 \cdot 10^{-80}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \end{array} \]

Alternative 13: 44.0% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;B \leq -4.1 \cdot 10^{-227}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;B \leq -1.5 \cdot 10^{-293}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;B \leq 4.5 \cdot 10^{-121}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;B \leq 94000:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 55.5%

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

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

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

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

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

    if -1.86e-180 < B < -4.10000000000000009e-227 or -1.5000000000000001e-293 < B < 4.5000000000000003e-121

    1. Initial program 37.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/37.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/37.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/37.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-identity37.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-neg37.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-33.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-neg33.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-neg33.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. +-commutative33.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. unpow233.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. unpow233.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-def48.7%

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

      \[\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. Step-by-step derivation
      1. div-sub28.0%

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

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

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

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

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

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

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

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

    if -4.10000000000000009e-227 < B < -1.5000000000000001e-293 or 4.5000000000000003e-121 < B < 94000

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

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

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

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{\left(C - A\right) + \left(-\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{B}\right) \]
      6. associate-+l-74.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-neg74.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-neg74.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. +-commutative74.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. unpow274.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. unpow274.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-def78.5%

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

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

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

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

    if 94000 < B

    1. Initial program 42.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/42.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/42.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. *-commutative42.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.86 \cdot 10^{-180}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -4.1 \cdot 10^{-227}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\ \mathbf{elif}\;B \leq -1.5 \cdot 10^{-293}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;B \leq 4.5 \cdot 10^{-121}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\ \mathbf{elif}\;B \leq 94000:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]

Alternative 14: 53.3% accurate, 2.4× speedup?

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

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

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

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

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


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

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

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

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

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

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

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

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

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

    if -8.59999999999999977e-98 < A < -2.0999999999999999e-172

    1. Initial program 28.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/28.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/28.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. *-commutative28.2%

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

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

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

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

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

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

    if -2.0999999999999999e-172 < A < -2.10000000000000019e-242

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

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

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

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

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

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

    if -2.10000000000000019e-242 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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. Step-by-step derivation
      1. add-cube-cbrt90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -8.6 \cdot 10^{-98}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;A \leq -2.1 \cdot 10^{-172}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq -2.1 \cdot 10^{-242}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\ \end{array} \]

Alternative 15: 58.0% accurate, 2.4× speedup?

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

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

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

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

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


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

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

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

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

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

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

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

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

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

    if -3.4999999999999999e-99 < A < -3.7999999999999998e-170

    1. Initial program 28.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/28.2%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}} \]
      2. associate-*l/28.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. *-commutative28.2%

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

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

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

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

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

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

    if -3.7999999999999998e-170 < A < 1.25e-79

    1. Initial program 67.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/67.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/67.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/67.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-identity67.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-neg67.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-67.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-neg67.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-neg67.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. +-commutative67.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. unpow267.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. unpow267.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-def88.7%

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

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

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

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

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

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

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

    if 1.25e-79 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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. Step-by-step derivation
      1. add-cube-cbrt94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 61.0% accurate, 2.4× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7999999999999998e-170 < A < 8.4000000000000002e-78

    1. Initial program 67.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/67.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/67.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/67.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-identity67.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-neg67.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-67.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-neg67.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-neg67.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. +-commutative67.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. unpow267.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. unpow267.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-def88.7%

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

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

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

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

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

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

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

    if 8.4000000000000002e-78 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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. Step-by-step derivation
      1. add-cube-cbrt94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 61.1% accurate, 2.4× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

    if -3.75000000000000017e-171 < A < 2.7000000000000002e-79

    1. Initial program 67.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/67.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/67.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/67.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-identity67.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-neg67.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-67.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-neg67.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-neg67.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. +-commutative67.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. unpow267.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. unpow267.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-def88.7%

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

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

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

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

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

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

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

    if 2.7000000000000002e-79 < A

    1. Initial program 79.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-*r/79.4%

        \[\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/79.4%

        \[\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/79.4%

        \[\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-identity79.4%

        \[\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-neg79.4%

        \[\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-79.4%

        \[\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-neg79.4%

        \[\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-neg79.4%

        \[\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. +-commutative79.4%

        \[\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. unpow279.4%

        \[\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. unpow279.4%

        \[\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-def95.0%

        \[\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. Simplified95.0%

      \[\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. Step-by-step derivation
      1. add-cube-cbrt94.6%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{\left(\sqrt[3]{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt[3]{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}\right) \cdot \sqrt[3]{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}}}{B}\right) \]
      2. pow394.6%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{{\left(\sqrt[3]{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}^{3}}}{B}\right) \]
    5. Applied egg-rr94.6%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{{\left(\sqrt[3]{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}^{3}}}{B}\right) \]
    6. Taylor expanded in C around 0 78.1%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(-1 \cdot \frac{A + \sqrt{{B}^{2} + {A}^{2}}}{B}\right)} \]
    7. Step-by-step derivation
      1. associate-*r/78.1%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left(A + \sqrt{{B}^{2} + {A}^{2}}\right)}{B}\right)} \]
      2. mul-1-neg78.1%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{-\left(A + \sqrt{{B}^{2} + {A}^{2}}\right)}}{B}\right) \]
      3. +-commutative78.1%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-\left(A + \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right)}{B}\right) \]
      4. unpow278.1%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-\left(A + \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right)}{B}\right) \]
      5. unpow278.1%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-\left(A + \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right)}{B}\right) \]
      6. hypot-def89.5%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-\left(A + \color{blue}{\mathsf{hypot}\left(A, B\right)}\right)}{B}\right) \]
    8. Simplified89.5%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{-\left(A + \mathsf{hypot}\left(A, B\right)\right)}{B}\right)} \]
    9. Taylor expanded in B around -inf 80.8%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(1 + -1 \cdot \frac{A}{B}\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg80.8%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(1 + \color{blue}{\left(-\frac{A}{B}\right)}\right) \]
      2. unsub-neg80.8%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(1 - \frac{A}{B}\right)} \]
    11. Simplified80.8%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(1 - \frac{A}{B}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.75 \cdot 10^{-171}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{elif}\;A \leq 2.7 \cdot 10^{-79}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\ \end{array} \]

Alternative 18: 62.6% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -7.8 \cdot 10^{-175}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -7.8e-175)
   (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
   (* (/ 180.0 PI) (atan (/ (- C (- A B)) B)))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -7.8e-175) {
		tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (A <= -7.8e-175) {
		tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if A <= -7.8e-175:
		tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A)))
	else:
		tmp = (180.0 / math.pi) * math.atan(((C - (A - B)) / B))
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (A <= -7.8e-175)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A))));
	else
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B)));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (A <= -7.8e-175)
		tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A)));
	else
		tmp = (180.0 / pi) * atan(((C - (A - B)) / B));
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[A, -7.8e-175], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.8 \cdot 10^{-175}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -7.79999999999999997e-175

    1. Initial program 20.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-*r/20.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/20.5%

        \[\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. *-commutative20.5%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\pi}} \]
    3. Simplified65.4%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
    4. Taylor expanded in B around 0 68.4%

      \[\leadsto \tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{B}{C - A}\right)} \cdot \frac{180}{\pi} \]
    5. Step-by-step derivation
      1. associate-*r/68.4%

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5 \cdot B}{C - A}\right)} \cdot \frac{180}{\pi} \]
    6. Simplified68.4%

      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5 \cdot B}{C - A}\right)} \cdot \frac{180}{\pi} \]

    if -7.79999999999999997e-175 < A

    1. Initial program 73.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-*r/73.3%

        \[\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/73.3%

        \[\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/73.3%

        \[\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-identity73.3%

        \[\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-neg73.3%

        \[\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-73.3%

        \[\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-neg73.3%

        \[\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-neg73.3%

        \[\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. +-commutative73.3%

        \[\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. unpow273.3%

        \[\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. unpow273.3%

        \[\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-def91.9%

        \[\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. Simplified91.9%

      \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)} \]
    4. Taylor expanded in B around -inf 76.0%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \color{blue}{\left(A + -1 \cdot B\right)}}{B}\right) \]
    5. Step-by-step derivation
      1. neg-mul-176.0%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \color{blue}{\left(-B\right)}\right)}{B}\right) \]
      2. unsub-neg76.0%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \color{blue}{\left(A - B\right)}}{B}\right) \]
    6. Simplified76.0%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \color{blue}{\left(A - B\right)}}{B}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7.8 \cdot 10^{-175}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\ \end{array} \]

Alternative 19: 47.9% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -2.4 \cdot 10^{-174}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 6.5 \cdot 10^{-80}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -2.4e-174)
   (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
   (if (<= A 6.5e-80)
     (* (/ 180.0 PI) (atan (/ C B)))
     (* (/ 180.0 PI) (atan (/ (- A) B))))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -2.4e-174) {
		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
	} else if (A <= 6.5e-80) {
		tmp = (180.0 / ((double) M_PI)) * atan((C / B));
	} 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 <= -2.4e-174) {
		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
	} else if (A <= 6.5e-80) {
		tmp = (180.0 / Math.PI) * Math.atan((C / B));
	} else {
		tmp = (180.0 / Math.PI) * Math.atan((-A / B));
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if A <= -2.4e-174:
		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
	elif A <= 6.5e-80:
		tmp = (180.0 / math.pi) * math.atan((C / B))
	else:
		tmp = (180.0 / math.pi) * math.atan((-A / B))
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (A <= -2.4e-174)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
	elseif (A <= 6.5e-80)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B)));
	else
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B)));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (A <= -2.4e-174)
		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
	elseif (A <= 6.5e-80)
		tmp = (180.0 / pi) * atan((C / B));
	else
		tmp = (180.0 / pi) * atan((-A / B));
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[A, -2.4e-174], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.5e-80], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.4 \cdot 10^{-174}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\

\mathbf{elif}\;A \leq 6.5 \cdot 10^{-80}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -2.4e-174

    1. Initial program 20.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-*r/20.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/20.5%

        \[\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. *-commutative20.5%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\pi}} \]
    3. Simplified65.4%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
    4. Taylor expanded in A around -inf 57.0%

      \[\leadsto \tan^{-1} \color{blue}{\left(0.5 \cdot \frac{B}{A}\right)} \cdot \frac{180}{\pi} \]
    5. Taylor expanded in B around 0 56.9%

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}} \]

    if -2.4e-174 < A < 6.49999999999999984e-80

    1. Initial program 67.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/67.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/67.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/67.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-identity67.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-neg67.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-67.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-neg67.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-neg67.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. +-commutative67.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. unpow267.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. unpow267.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-def88.7%

        \[\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. Simplified88.7%

      \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)} \]
    4. Taylor expanded in B around inf 55.5%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \color{blue}{\left(A + B\right)}}{B}\right) \]
    5. Taylor expanded in C around inf 43.2%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{C}}{B}\right) \]

    if 6.49999999999999984e-80 < A

    1. Initial program 79.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-*r/79.4%

        \[\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/79.4%

        \[\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/79.4%

        \[\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-identity79.4%

        \[\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-neg79.4%

        \[\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-79.4%

        \[\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-neg79.4%

        \[\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-neg79.4%

        \[\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. +-commutative79.4%

        \[\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. unpow279.4%

        \[\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. unpow279.4%

        \[\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-def95.0%

        \[\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. Simplified95.0%

      \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)} \]
    4. Taylor expanded in B around inf 75.4%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \color{blue}{\left(A + B\right)}}{B}\right) \]
    5. Taylor expanded in A around inf 67.6%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{-1 \cdot A}}{B}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg67.6%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{-A}}{B}\right) \]
    7. Simplified67.6%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{-A}}{B}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.4 \cdot 10^{-174}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 6.5 \cdot 10^{-80}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \end{array} \]

Alternative 20: 43.5% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1.86 \cdot 10^{-180}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-51}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= B -1.86e-180)
   (* (/ 180.0 PI) (atan 1.0))
   (if (<= B 1.25e-51)
     (* (/ 180.0 PI) (atan 0.0))
     (* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
	double tmp;
	if (B <= -1.86e-180) {
		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
	} else if (B <= 1.25e-51) {
		tmp = (180.0 / ((double) M_PI)) * atan(0.0);
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (B <= -1.86e-180) {
		tmp = (180.0 / Math.PI) * Math.atan(1.0);
	} else if (B <= 1.25e-51) {
		tmp = (180.0 / Math.PI) * Math.atan(0.0);
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(-1.0);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if B <= -1.86e-180:
		tmp = (180.0 / math.pi) * math.atan(1.0)
	elif B <= 1.25e-51:
		tmp = (180.0 / math.pi) * math.atan(0.0)
	else:
		tmp = (180.0 / math.pi) * math.atan(-1.0)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (B <= -1.86e-180)
		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
	elseif (B <= 1.25e-51)
		tmp = Float64(Float64(180.0 / pi) * atan(0.0));
	else
		tmp = Float64(Float64(180.0 / pi) * atan(-1.0));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (B <= -1.86e-180)
		tmp = (180.0 / pi) * atan(1.0);
	elseif (B <= 1.25e-51)
		tmp = (180.0 / pi) * atan(0.0);
	else
		tmp = (180.0 / pi) * atan(-1.0);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[B, -1.86e-180], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.25e-51], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.86 \cdot 10^{-180}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\

\mathbf{elif}\;B \leq 1.25 \cdot 10^{-51}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -1.86e-180

    1. Initial program 55.5%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Step-by-step derivation
      1. associate-*r/55.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/55.5%

        \[\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. *-commutative55.5%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\pi}} \]
    3. Simplified82.8%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
    4. Taylor expanded in B around -inf 53.3%

      \[\leadsto \tan^{-1} \color{blue}{1} \cdot \frac{180}{\pi} \]

    if -1.86e-180 < B < 1.25000000000000001e-51

    1. Initial program 49.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-*r/49.4%

        \[\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/49.4%

        \[\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/49.4%

        \[\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-identity49.4%

        \[\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-neg49.4%

        \[\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-47.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-neg47.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-neg47.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. +-commutative47.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. unpow247.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. unpow247.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-def59.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. Simplified59.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. Step-by-step derivation
      1. div-sub43.5%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{C}{B} - \frac{A + \mathsf{hypot}\left(B, A - C\right)}{B}\right)} \]
    5. Applied egg-rr43.5%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{C}{B} - \frac{A + \mathsf{hypot}\left(B, A - C\right)}{B}\right)} \]
    6. Taylor expanded in C around inf 14.5%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(-1 \cdot \left(\frac{A}{B} + -1 \cdot \frac{A}{B}\right)\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt1-in14.5%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(-1 \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot \frac{A}{B}\right)}\right) \]
      2. metadata-eval14.5%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(-1 \cdot \left(\color{blue}{0} \cdot \frac{A}{B}\right)\right) \]
      3. mul0-lft38.8%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(-1 \cdot \color{blue}{0}\right) \]
      4. metadata-eval38.8%

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{0} \]
    8. Simplified38.8%

      \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \color{blue}{0} \]

    if 1.25000000000000001e-51 < B

    1. Initial program 49.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-*r/49.4%

        \[\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/49.4%

        \[\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. *-commutative49.4%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\pi}} \]
    3. Simplified79.6%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
    4. Taylor expanded in B around inf 53.4%

      \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.86 \cdot 10^{-180}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-51}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]

Alternative 21: 39.9% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -9 \cdot 10^{-303}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= B -9e-303) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
	double tmp;
	if (B <= -9e-303) {
		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (B <= -9e-303) {
		tmp = (180.0 / Math.PI) * Math.atan(1.0);
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(-1.0);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if B <= -9e-303:
		tmp = (180.0 / math.pi) * math.atan(1.0)
	else:
		tmp = (180.0 / math.pi) * math.atan(-1.0)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (B <= -9e-303)
		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
	else
		tmp = Float64(Float64(180.0 / pi) * atan(-1.0));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (B <= -9e-303)
		tmp = (180.0 / pi) * atan(1.0);
	else
		tmp = (180.0 / pi) * atan(-1.0);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[B, -9e-303], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;B \leq -9 \cdot 10^{-303}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < -9.0000000000000002e-303

    1. Initial program 56.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-*r/56.8%

        \[\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/56.8%

        \[\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. *-commutative56.8%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\pi}} \]
    3. Simplified84.5%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
    4. Taylor expanded in B around -inf 45.0%

      \[\leadsto \tan^{-1} \color{blue}{1} \cdot \frac{180}{\pi} \]

    if -9.0000000000000002e-303 < B

    1. Initial program 47.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-*r/47.3%

        \[\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/47.3%

        \[\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. *-commutative47.3%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\pi}} \]
    3. Simplified78.0%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
    4. Taylor expanded in B around inf 33.0%

      \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -9 \cdot 10^{-303}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]

Alternative 22: 20.8% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \frac{180}{\pi} \cdot \tan^{-1} -1 \end{array} \]
(FPCore (A B C) :precision binary64 (* (/ 180.0 PI) (atan -1.0)))
double code(double A, double B, double C) {
	return (180.0 / ((double) M_PI)) * atan(-1.0);
}
public static double code(double A, double B, double C) {
	return (180.0 / Math.PI) * Math.atan(-1.0);
}
def code(A, B, C):
	return (180.0 / math.pi) * math.atan(-1.0)
function code(A, B, C)
	return Float64(Float64(180.0 / pi) * atan(-1.0))
end
function tmp = code(A, B, C)
	tmp = (180.0 / pi) * atan(-1.0);
end
code[A_, B_, C_] := N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{180}{\pi} \cdot \tan^{-1} -1
\end{array}
Derivation
  1. Initial program 51.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/51.6%

      \[\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/51.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. *-commutative51.6%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\pi}} \]
  3. Simplified81.0%

    \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
  4. Taylor expanded in B around inf 18.8%

    \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
  5. Final simplification18.8%

    \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} -1 \]

Reproduce

?
herbie shell --seed 2023175 
(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)))