ABCF->ab-angle angle

Percentage Accurate: 53.1% → 88.9%
Time: 15.8s
Alternatives: 18
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 18 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.1% accurate, 1.0× speedup?

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

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

Alternative 1: 88.9% 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 56.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/56.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/56.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. *-commutative56.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. Simplified85.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}} \]

    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.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/19.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/19.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. *-commutative19.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. Simplified19.9%

      \[\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 99.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/99.5%

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5 \cdot B}{C - A}\right)} \cdot \frac{180}{\pi} \]
    6. Simplified99.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 simplification87.8%

    \[\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: 72.4% accurate, 1.7× speedup?

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

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

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

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


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

    1. Initial program 30.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/30.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/30.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. *-commutative30.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. Simplified57.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 46.4%

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

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

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

      \[\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. mul-1-neg68.4%

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

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

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

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

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

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

    if -2.3e-161 < A < 8.00000000000000039e57

    1. Initial program 52.1%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Step-by-step derivation
      1. associate-*r/52.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/52.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/52.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-identity52.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-neg52.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-52.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-neg52.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-neg52.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. +-commutative52.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. unpow252.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. unpow252.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-def81.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. Simplified81.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 A around 0 46.9%

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

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

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

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

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

    if 8.00000000000000039e57 < A

    1. Initial program 83.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/83.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/83.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. *-commutative83.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. Simplified94.9%

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

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

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

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

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

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

Alternative 3: 52.0% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ t_2 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{if}\;A \leq -1.05 \cdot 10^{-41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -2.9 \cdot 10^{-173}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -8.6 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 3.15 \cdot 10^{-289}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq 1.25 \cdot 10^{-160}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.3 \cdot 10^{-139}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq 2.1 \cdot 10^{-79}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.08 \cdot 10^{+130}:\\ \;\;\;\;t_2\\ \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 (* -0.5 (/ B C)))))
        (t_1 (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))))
        (t_2 (* (/ 180.0 PI) (atan (/ (+ B C) B)))))
   (if (<= A -1.05e-41)
     t_1
     (if (<= A -2.9e-173)
       t_0
       (if (<= A -8.6e-174)
         t_1
         (if (<= A 3.15e-289)
           t_2
           (if (<= A 1.25e-160)
             t_0
             (if (<= A 2.3e-139)
               t_2
               (if (<= A 2.1e-79)
                 t_0
                 (if (<= A 1.08e+130)
                   t_2
                   (* (/ 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((-0.5 * (B / C)));
	double t_1 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
	double t_2 = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
	double tmp;
	if (A <= -1.05e-41) {
		tmp = t_1;
	} else if (A <= -2.9e-173) {
		tmp = t_0;
	} else if (A <= -8.6e-174) {
		tmp = t_1;
	} else if (A <= 3.15e-289) {
		tmp = t_2;
	} else if (A <= 1.25e-160) {
		tmp = t_0;
	} else if (A <= 2.3e-139) {
		tmp = t_2;
	} else if (A <= 2.1e-79) {
		tmp = t_0;
	} else if (A <= 1.08e+130) {
		tmp = t_2;
	} 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((-0.5 * (B / C)));
	double t_1 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
	double t_2 = (180.0 / Math.PI) * Math.atan(((B + C) / B));
	double tmp;
	if (A <= -1.05e-41) {
		tmp = t_1;
	} else if (A <= -2.9e-173) {
		tmp = t_0;
	} else if (A <= -8.6e-174) {
		tmp = t_1;
	} else if (A <= 3.15e-289) {
		tmp = t_2;
	} else if (A <= 1.25e-160) {
		tmp = t_0;
	} else if (A <= 2.3e-139) {
		tmp = t_2;
	} else if (A <= 2.1e-79) {
		tmp = t_0;
	} else if (A <= 1.08e+130) {
		tmp = t_2;
	} 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((-0.5 * (B / C)))
	t_1 = (180.0 / math.pi) * math.atan((0.5 * (B / A)))
	t_2 = (180.0 / math.pi) * math.atan(((B + C) / B))
	tmp = 0
	if A <= -1.05e-41:
		tmp = t_1
	elif A <= -2.9e-173:
		tmp = t_0
	elif A <= -8.6e-174:
		tmp = t_1
	elif A <= 3.15e-289:
		tmp = t_2
	elif A <= 1.25e-160:
		tmp = t_0
	elif A <= 2.3e-139:
		tmp = t_2
	elif A <= 2.1e-79:
		tmp = t_0
	elif A <= 1.08e+130:
		tmp = t_2
	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(-0.5 * Float64(B / C))))
	t_1 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A))))
	t_2 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B)))
	tmp = 0.0
	if (A <= -1.05e-41)
		tmp = t_1;
	elseif (A <= -2.9e-173)
		tmp = t_0;
	elseif (A <= -8.6e-174)
		tmp = t_1;
	elseif (A <= 3.15e-289)
		tmp = t_2;
	elseif (A <= 1.25e-160)
		tmp = t_0;
	elseif (A <= 2.3e-139)
		tmp = t_2;
	elseif (A <= 2.1e-79)
		tmp = t_0;
	elseif (A <= 1.08e+130)
		tmp = t_2;
	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((-0.5 * (B / C)));
	t_1 = (180.0 / pi) * atan((0.5 * (B / A)));
	t_2 = (180.0 / pi) * atan(((B + C) / B));
	tmp = 0.0;
	if (A <= -1.05e-41)
		tmp = t_1;
	elseif (A <= -2.9e-173)
		tmp = t_0;
	elseif (A <= -8.6e-174)
		tmp = t_1;
	elseif (A <= 3.15e-289)
		tmp = t_2;
	elseif (A <= 1.25e-160)
		tmp = t_0;
	elseif (A <= 2.3e-139)
		tmp = t_2;
	elseif (A <= 2.1e-79)
		tmp = t_0;
	elseif (A <= 1.08e+130)
		tmp = t_2;
	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[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.05e-41], t$95$1, If[LessEqual[A, -2.9e-173], t$95$0, If[LessEqual[A, -8.6e-174], t$95$1, If[LessEqual[A, 3.15e-289], t$95$2, If[LessEqual[A, 1.25e-160], t$95$0, If[LessEqual[A, 2.3e-139], t$95$2, If[LessEqual[A, 2.1e-79], t$95$0, If[LessEqual[A, 1.08e+130], t$95$2, 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(-0.5 \cdot \frac{B}{C}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
t_2 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{if}\;A \leq -1.05 \cdot 10^{-41}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;A \leq -2.9 \cdot 10^{-173}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq -8.6 \cdot 10^{-174}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;A \leq 3.15 \cdot 10^{-289}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;A \leq 1.25 \cdot 10^{-160}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq 2.3 \cdot 10^{-139}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;A \leq 1.08 \cdot 10^{+130}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -1.05000000000000006e-41 or -2.8999999999999998e-173 < A < -8.6000000000000006e-174

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

        \[\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. Simplified59.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 A around -inf 63.7%

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

    if -1.05000000000000006e-41 < A < -2.8999999999999998e-173 or 3.1500000000000001e-289 < A < 1.24999999999999999e-160 or 2.30000000000000012e-139 < A < 2.0999999999999999e-79

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

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

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

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

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

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

    if -8.6000000000000006e-174 < A < 3.1500000000000001e-289 or 1.24999999999999999e-160 < A < 2.30000000000000012e-139 or 2.0999999999999999e-79 < A < 1.08e130

    1. Initial program 62.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/62.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/62.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/62.5%

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

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

        \[\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-62.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-neg62.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-neg62.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. +-commutative62.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. unpow262.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. unpow262.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-def89.8%

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

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

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

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

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

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

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

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

    if 1.08e130 < A

    1. Initial program 89.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/89.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/89.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. *-commutative89.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. Simplified97.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 A around inf 88.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.05 \cdot 10^{-41}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -2.9 \cdot 10^{-173}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq -8.6 \cdot 10^{-174}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq 3.15 \cdot 10^{-289}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;A \leq 1.25 \cdot 10^{-160}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq 2.3 \cdot 10^{-139}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;A \leq 2.1 \cdot 10^{-79}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq 1.08 \cdot 10^{+130}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \end{array} \]

Alternative 4: 58.9% accurate, 2.4× speedup?

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

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

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

\mathbf{elif}\;A \leq 8.2 \cdot 10^{-200}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;A \leq 2.45 \cdot 10^{-139}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;A \leq 5.2 \cdot 10^{-53}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -7e-176 or 1.44999999999999995e-281 < A < 8.19999999999999974e-200

    1. Initial program 30.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/30.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/30.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. *-commutative30.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. Simplified58.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 43.9%

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

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

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

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

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

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

    if -7e-176 < A < 1.44999999999999995e-281 or 8.19999999999999974e-200 < A < 2.45000000000000016e-139 or 1.49999999999999994e-78 < A < 5.19999999999999993e-53

    1. Initial program 59.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/59.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/59.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/59.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-identity59.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-neg59.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-59.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-neg59.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-neg59.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. +-commutative59.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. unpow259.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. unpow259.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-def87.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. Simplified87.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 A around 0 57.4%

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

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

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

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

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

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

    if 2.45000000000000016e-139 < A < 1.49999999999999994e-78

    1. Initial program 43.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/43.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/43.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. *-commutative43.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.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 B around 0 41.2%

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

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

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

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

    if 5.19999999999999993e-53 < A

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7 \cdot 10^{-176}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A - C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.45 \cdot 10^{-281}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;A \leq 8.2 \cdot 10^{-200}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A - C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.45 \cdot 10^{-139}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;A \leq 1.5 \cdot 10^{-78}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq 5.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 5: 55.5% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;C \leq 9.5 \cdot 10^{-188}:\\
\;\;\;\;t_0\\

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

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

\mathbf{elif}\;C \leq 1.05 \cdot 10^{+185}:\\
\;\;\;\;t_0\\

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


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

    1. Initial program 72.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/72.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/72.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/72.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-identity72.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-neg72.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-70.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-neg70.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-neg70.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. +-commutative70.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. unpow270.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. unpow270.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-def84.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. Simplified84.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 A around 0 69.6%

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

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

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

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

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

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

    if -4.79999999999999984e-29 < C < 9.50000000000000063e-188 or 4.7e156 < C < 1.05e185

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.50000000000000063e-188 < C < 2.50000000000000022e-112

    1. Initial program 25.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/25.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/25.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. *-commutative25.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. Simplified87.3%

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

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

    if 2.50000000000000022e-112 < C < 4.7e156

    1. Initial program 49.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/49.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/49.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. *-commutative49.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. Simplified65.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 B around 0 32.4%

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

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

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

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

    if 1.05e185 < C

    1. Initial program 9.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/9.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/9.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. *-commutative9.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. Simplified42.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 65.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A - C}\right)}{\pi}} \]
    10. Step-by-step derivation
      1. div-inv86.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -4.8 \cdot 10^{-29}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;C \leq 9.5 \cdot 10^{-188}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 2.5 \cdot 10^{-112}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 4.7 \cdot 10^{+156}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;C \leq 1.05 \cdot 10^{+185}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(B \cdot \frac{-1}{C}\right)\right)}{\pi}\\ \end{array} \]

Alternative 6: 55.6% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;C \leq -1.45 \cdot 10^{-28}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;C \leq 9.5 \cdot 10^{-188}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1.62 \cdot 10^{-112}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 4.7 \cdot 10^{+156} \lor \neg \left(C \leq 1.05 \cdot 10^{+185}\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)))
   (if (<= C -1.45e-28)
     (* (/ 180.0 PI) (atan (/ (+ B C) B)))
     (if (<= C 9.5e-188)
       t_0
       (if (<= C 1.62e-112)
         (* (/ 180.0 PI) (atan -1.0))
         (if (or (<= C 4.7e+156) (not (<= C 1.05e+185)))
           (* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
           t_0))))))
double code(double A, double B, double C) {
	double t_0 = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
	double tmp;
	if (C <= -1.45e-28) {
		tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
	} else if (C <= 9.5e-188) {
		tmp = t_0;
	} else if (C <= 1.62e-112) {
		tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
	} else if ((C <= 4.7e+156) || !(C <= 1.05e+185)) {
		tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
	double tmp;
	if (C <= -1.45e-28) {
		tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
	} else if (C <= 9.5e-188) {
		tmp = t_0;
	} else if (C <= 1.62e-112) {
		tmp = (180.0 / Math.PI) * Math.atan(-1.0);
	} else if ((C <= 4.7e+156) || !(C <= 1.05e+185)) {
		tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(A, B, C):
	t_0 = (180.0 * math.atan((1.0 - (A / B)))) / math.pi
	tmp = 0
	if C <= -1.45e-28:
		tmp = (180.0 / math.pi) * math.atan(((B + C) / B))
	elif C <= 9.5e-188:
		tmp = t_0
	elif C <= 1.62e-112:
		tmp = (180.0 / math.pi) * math.atan(-1.0)
	elif (C <= 4.7e+156) or not (C <= 1.05e+185):
		tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C)))
	else:
		tmp = t_0
	return tmp
function code(A, B, C)
	t_0 = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi)
	tmp = 0.0
	if (C <= -1.45e-28)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B)));
	elseif (C <= 9.5e-188)
		tmp = t_0;
	elseif (C <= 1.62e-112)
		tmp = Float64(Float64(180.0 / pi) * atan(-1.0));
	elseif ((C <= 4.7e+156) || !(C <= 1.05e+185))
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = (180.0 * atan((1.0 - (A / B)))) / pi;
	tmp = 0.0;
	if (C <= -1.45e-28)
		tmp = (180.0 / pi) * atan(((B + C) / B));
	elseif (C <= 9.5e-188)
		tmp = t_0;
	elseif (C <= 1.62e-112)
		tmp = (180.0 / pi) * atan(-1.0);
	elseif ((C <= 4.7e+156) || ~((C <= 1.05e+185)))
		tmp = (180.0 / pi) * atan((-0.5 * (B / C)));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[C, -1.45e-28], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.5e-188], t$95$0, If[LessEqual[C, 1.62e-112], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 4.7e+156], N[Not[LessEqual[C, 1.05e+185]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}

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

\mathbf{elif}\;C \leq 9.5 \cdot 10^{-188}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;C \leq 4.7 \cdot 10^{+156} \lor \neg \left(C \leq 1.05 \cdot 10^{+185}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\

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


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

    1. Initial program 72.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/72.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/72.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/72.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-identity72.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-neg72.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-70.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-neg70.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-neg70.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. +-commutative70.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. unpow270.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. unpow270.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-def84.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. Simplified84.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 A around 0 69.6%

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

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

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

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

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

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

    if -1.45000000000000006e-28 < C < 9.50000000000000063e-188 or 4.7e156 < C < 1.05e185

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.50000000000000063e-188 < C < 1.62000000000000009e-112

    1. Initial program 25.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/25.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/25.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. *-commutative25.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. Simplified87.3%

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

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

    if 1.62000000000000009e-112 < C < 4.7e156 or 1.05e185 < C

    1. Initial program 36.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/36.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/36.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. *-commutative36.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. Simplified57.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 0 43.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.45 \cdot 10^{-28}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;C \leq 9.5 \cdot 10^{-188}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.62 \cdot 10^{-112}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 4.7 \cdot 10^{+156} \lor \neg \left(C \leq 1.05 \cdot 10^{+185}\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 7: 49.3% accurate, 2.4× speedup?

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

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

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

\mathbf{elif}\;C \leq 2.4 \cdot 10^{-189}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\

\mathbf{elif}\;C \leq 7 \cdot 10^{-156}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\

\mathbf{elif}\;C \leq 4.7 \cdot 10^{-132}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot t_0\\


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

    1. Initial program 70.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/70.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/70.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. *-commutative70.7%

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

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

    if -2.05e-54 < C < 6.7000000000000001e-217

    1. Initial program 47.9%

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

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

    if 6.7000000000000001e-217 < C < 2.3999999999999998e-189

    1. Initial program 66.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/66.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/66.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. *-commutative66.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. Simplified74.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}} \]
    4. Taylor expanded in B around 0 7.5%

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

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

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

      \[\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. mul-1-neg33.0%

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

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

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

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

    if 2.3999999999999998e-189 < C < 6.9999999999999999e-156

    1. Initial program 43.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/43.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/43.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. *-commutative43.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. Simplified87.9%

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

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

    if 6.9999999999999999e-156 < C < 4.7000000000000002e-132

    1. Initial program 18.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/18.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/18.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. *-commutative18.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. Simplified100.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 60.6%

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

    if 4.7000000000000002e-132 < C

    1. Initial program 37.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/37.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/37.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. *-commutative37.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. Simplified60.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 40.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -2.05 \cdot 10^{-54}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;C \leq 6.7 \cdot 10^{-217}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 2.4 \cdot 10^{-189}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;C \leq 7 \cdot 10^{-156}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 4.7 \cdot 10^{-132}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \end{array} \]

Alternative 8: 46.7% accurate, 2.4× speedup?

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

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

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

\mathbf{elif}\;B \leq 2.6 \cdot 10^{+21}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < -3.0999999999999999e61

    1. Initial program 49.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/49.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/49.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. *-commutative49.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. Simplified86.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 -inf 64.2%

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

    if -3.0999999999999999e61 < B < 1.3e-256 or 1.64999999999999998e-61 < B < 2.6e21

    1. Initial program 57.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/57.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/57.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. *-commutative57.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. Simplified69.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 A around -inf 38.8%

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

    if 1.3e-256 < B < 1.64999999999999998e-61

    1. Initial program 43.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/43.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/43.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. *-commutative43.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. Simplified59.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 B around 0 41.9%

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

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

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

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

    if 2.6e21 < B

    1. Initial program 46.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/46.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/46.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. *-commutative46.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.1 \cdot 10^{+61}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-256}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;B \leq 1.65 \cdot 10^{-61}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{+21}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]

Alternative 9: 49.5% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{if}\;A \leq -2.8 \cdot 10^{-41}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -9.6 \cdot 10^{-244}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 3.5 \cdot 10^{-301}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;A \leq 6 \cdot 10^{-47}:\\ \;\;\;\;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 (* -0.5 (/ B C))))))
   (if (<= A -2.8e-41)
     (* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
     (if (<= A -9.6e-244)
       t_0
       (if (<= A 3.5e-301)
         (* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
         (if (<= A 6e-47) 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((-0.5 * (B / C)));
	double tmp;
	if (A <= -2.8e-41) {
		tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
	} else if (A <= -9.6e-244) {
		tmp = t_0;
	} else if (A <= 3.5e-301) {
		tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
	} else if (A <= 6e-47) {
		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((-0.5 * (B / C)));
	double tmp;
	if (A <= -2.8e-41) {
		tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
	} else if (A <= -9.6e-244) {
		tmp = t_0;
	} else if (A <= 3.5e-301) {
		tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
	} else if (A <= 6e-47) {
		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((-0.5 * (B / C)))
	tmp = 0
	if A <= -2.8e-41:
		tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A)))
	elif A <= -9.6e-244:
		tmp = t_0
	elif A <= 3.5e-301:
		tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B))
	elif A <= 6e-47:
		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(-0.5 * Float64(B / C))))
	tmp = 0.0
	if (A <= -2.8e-41)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A))));
	elseif (A <= -9.6e-244)
		tmp = t_0;
	elseif (A <= 3.5e-301)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B)));
	elseif (A <= 6e-47)
		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((-0.5 * (B / C)));
	tmp = 0.0;
	if (A <= -2.8e-41)
		tmp = (180.0 / pi) * atan((0.5 * (B / A)));
	elseif (A <= -9.6e-244)
		tmp = t_0;
	elseif (A <= 3.5e-301)
		tmp = (180.0 / pi) * atan(((C * 2.0) / B));
	elseif (A <= 6e-47)
		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[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.8e-41], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.6e-244], t$95$0, If[LessEqual[A, 3.5e-301], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6e-47], 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(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{if}\;A \leq -2.8 \cdot 10^{-41}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\

\mathbf{elif}\;A \leq -9.6 \cdot 10^{-244}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;A \leq 6 \cdot 10^{-47}:\\
\;\;\;\;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 4 regimes
  2. if A < -2.8000000000000002e-41

    1. Initial program 29.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/29.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/29.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. *-commutative29.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. Simplified60.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 A around -inf 63.2%

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

    if -2.8000000000000002e-41 < A < -9.60000000000000063e-244 or 3.49999999999999992e-301 < A < 6.00000000000000033e-47

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

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

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

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

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

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

    if -9.60000000000000063e-244 < A < 3.49999999999999992e-301

    1. Initial program 73.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/73.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/73.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. *-commutative73.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. Simplified94.9%

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

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

    if 6.00000000000000033e-47 < A

    1. Initial program 79.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/79.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/79.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. *-commutative79.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. Simplified94.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 72.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.8 \cdot 10^{-41}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -9.6 \cdot 10^{-244}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq 3.5 \cdot 10^{-301}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;A \leq 6 \cdot 10^{-47}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \end{array} \]

Alternative 10: 61.0% accurate, 2.4× speedup?

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

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

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

\mathbf{elif}\;A \leq 5.9 \cdot 10^{-199}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -8.2000000000000002e-174 or 2.10000000000000012e-282 < A < 5.9000000000000003e-199

    1. Initial program 30.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/30.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/30.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. *-commutative30.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. Simplified58.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 43.9%

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

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

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

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

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

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

    if -8.2000000000000002e-174 < A < 2.10000000000000012e-282

    1. Initial program 63.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/63.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/63.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. associate-*l/63.8%

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

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{\left(C - A\right) + \left(-\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{B}\right) \]
      6. associate-+l-63.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-neg63.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-neg63.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. +-commutative63.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. unpow263.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. unpow263.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-def84.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. Simplified84.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 A around 0 63.8%

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

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

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

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

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

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

    if 5.9000000000000003e-199 < A

    1. Initial program 69.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/69.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/69.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. *-commutative69.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.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 B around -inf 71.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -8.2 \cdot 10^{-174}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A - C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.1 \cdot 10^{-282}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;A \leq 5.9 \cdot 10^{-199}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A - C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\ \end{array} \]

Alternative 11: 61.0% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{if}\;A \leq -7.5 \cdot 10^{-175}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-283}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;A \leq 3.7 \cdot 10^{-201}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
   (if (<= A -7.5e-175)
     t_0
     (if (<= A 5e-283)
       (* (/ 180.0 PI) (atan (/ (+ B C) B)))
       (if (<= A 3.7e-201)
         t_0
         (* (/ 180.0 PI) (atan (+ 1.0 (/ (- C A) B)))))))))
double code(double A, double B, double C) {
	double t_0 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
	double tmp;
	if (A <= -7.5e-175) {
		tmp = t_0;
	} else if (A <= 5e-283) {
		tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
	} else if (A <= 3.7e-201) {
		tmp = t_0;
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan((1.0 + ((C - A) / B)));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
	double tmp;
	if (A <= -7.5e-175) {
		tmp = t_0;
	} else if (A <= 5e-283) {
		tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
	} else if (A <= 3.7e-201) {
		tmp = t_0;
	} else {
		tmp = (180.0 / Math.PI) * Math.atan((1.0 + ((C - A) / B)));
	}
	return tmp;
}
def code(A, B, C):
	t_0 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A)))
	tmp = 0
	if A <= -7.5e-175:
		tmp = t_0
	elif A <= 5e-283:
		tmp = (180.0 / math.pi) * math.atan(((B + C) / B))
	elif A <= 3.7e-201:
		tmp = t_0
	else:
		tmp = (180.0 / math.pi) * math.atan((1.0 + ((C - A) / B)))
	return tmp
function code(A, B, C)
	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A))))
	tmp = 0.0
	if (A <= -7.5e-175)
		tmp = t_0;
	elseif (A <= 5e-283)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B)));
	elseif (A <= 3.7e-201)
		tmp = t_0;
	else
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(Float64(C - A) / B))));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = (180.0 / pi) * atan(((B * -0.5) / (C - A)));
	tmp = 0.0;
	if (A <= -7.5e-175)
		tmp = t_0;
	elseif (A <= 5e-283)
		tmp = (180.0 / pi) * atan(((B + C) / B));
	elseif (A <= 3.7e-201)
		tmp = t_0;
	else
		tmp = (180.0 / pi) * atan((1.0 + ((C - 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[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -7.5e-175], t$95$0, If[LessEqual[A, 5e-283], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.7e-201], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;A \leq 3.7 \cdot 10^{-201}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -7.50000000000000053e-175 or 5.0000000000000001e-283 < A < 3.6999999999999998e-201

    1. Initial program 30.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/30.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/30.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. *-commutative30.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. Simplified58.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 65.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/65.5%

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

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

    if -7.50000000000000053e-175 < A < 5.0000000000000001e-283

    1. Initial program 63.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/63.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/63.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. associate-*l/63.8%

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

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{\left(C - A\right) + \left(-\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{B}\right) \]
      6. associate-+l-63.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-neg63.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-neg63.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. +-commutative63.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. unpow263.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. unpow263.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-def84.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. Simplified84.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 A around 0 63.8%

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

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

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

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

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

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

    if 3.6999999999999998e-201 < A

    1. Initial program 69.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/69.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/69.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. *-commutative69.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.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 B around -inf 71.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7.5 \cdot 10^{-175}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-283}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;A \leq 3.7 \cdot 10^{-201}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\ \end{array} \]

Alternative 12: 61.0% accurate, 2.4× speedup?

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

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

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

\mathbf{elif}\;A \leq 2.65 \cdot 10^{-201}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -3.4000000000000002e-174 or 1.8e-289 < A < 2.64999999999999994e-201

    1. Initial program 30.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/30.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/30.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. *-commutative30.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. Simplified58.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 43.9%

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

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

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

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

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

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

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

    if -3.4000000000000002e-174 < A < 1.8e-289

    1. Initial program 63.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/63.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/63.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. associate-*l/63.8%

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

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{\left(C - A\right) + \left(-\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{B}\right) \]
      6. associate-+l-63.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-neg63.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-neg63.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. +-commutative63.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. unpow263.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. unpow263.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-def84.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. Simplified84.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 A around 0 63.8%

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

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

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

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

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

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

    if 2.64999999999999994e-201 < A

    1. Initial program 69.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/69.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/69.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. *-commutative69.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.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 B around -inf 71.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.4 \cdot 10^{-174}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A - C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.8 \cdot 10^{-289}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;A \leq 2.65 \cdot 10^{-201}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A - C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\ \end{array} \]

Alternative 13: 61.0% accurate, 2.4× speedup?

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

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

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

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

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


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

    1. Initial program 29.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/29.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/29.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. *-commutative29.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. Simplified57.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 B around 0 46.1%

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

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

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

      \[\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. mul-1-neg68.0%

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

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

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

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

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

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

    if -4.89999999999999998e-175 < A < 2.3e-284

    1. Initial program 63.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/63.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/63.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. associate-*l/63.8%

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

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{\left(C - A\right) + \left(-\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{B}\right) \]
      6. associate-+l-63.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-neg63.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-neg63.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. +-commutative63.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. unpow263.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. unpow263.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-def84.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. Simplified84.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 A around 0 63.8%

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

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

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

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

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

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

    if 2.3e-284 < A < 7.49999999999999987e-201

    1. Initial program 34.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/34.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/34.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. *-commutative34.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. Simplified65.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 32.0%

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

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

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

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

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

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

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

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

    if 7.49999999999999987e-201 < A

    1. Initial program 69.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/69.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/69.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. *-commutative69.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.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 B around -inf 71.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.9 \cdot 10^{-175}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.3 \cdot 10^{-284}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;A \leq 7.5 \cdot 10^{-201}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A - C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\ \end{array} \]

Alternative 14: 46.1% accurate, 2.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -1.9499999999999999e65

    1. Initial program 49.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/49.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/49.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. *-commutative49.7%

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

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

    if -1.9499999999999999e65 < B < 2.69999999999999993e-61

    1. Initial program 53.4%

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

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

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

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

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

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

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

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

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

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

    if 2.69999999999999993e-61 < B

    1. Initial program 47.4%

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

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

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

Alternative 15: 46.1% accurate, 2.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -1.84999999999999997e65

    1. Initial program 49.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/49.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/49.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. *-commutative49.7%

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

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

    if -1.84999999999999997e65 < B < 3.2000000000000001e-61

    1. Initial program 53.4%

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

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

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

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

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

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

    if 3.2000000000000001e-61 < B

    1. Initial program 47.4%

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

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

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

Alternative 16: 44.7% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -4.8 \cdot 10^{-112}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{-61}:\\ \;\;\;\;\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 -4.8e-112)
   (* (/ 180.0 PI) (atan 1.0))
   (if (<= B 2.6e-61)
     (* (/ 180.0 PI) (atan 0.0))
     (* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
	double tmp;
	if (B <= -4.8e-112) {
		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
	} else if (B <= 2.6e-61) {
		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 <= -4.8e-112) {
		tmp = (180.0 / Math.PI) * Math.atan(1.0);
	} else if (B <= 2.6e-61) {
		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 <= -4.8e-112:
		tmp = (180.0 / math.pi) * math.atan(1.0)
	elif B <= 2.6e-61:
		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 <= -4.8e-112)
		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
	elseif (B <= 2.6e-61)
		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 <= -4.8e-112)
		tmp = (180.0 / pi) * atan(1.0);
	elseif (B <= 2.6e-61)
		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, -4.8e-112], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.6e-61], 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 -4.8 \cdot 10^{-112}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\

\mathbf{elif}\;B \leq 2.6 \cdot 10^{-61}:\\
\;\;\;\;\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 < -4.8000000000000001e-112

    1. Initial program 52.1%

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

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

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

    if -4.8000000000000001e-112 < B < 2.6000000000000001e-61

    1. Initial program 52.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/52.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/52.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/52.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-identity52.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-neg52.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-49.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-neg49.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-neg49.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. +-commutative49.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. unpow249.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. unpow249.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-def56.8%

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

      \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)} \]
    4. Step-by-step derivation
      1. div-sub42.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-rr42.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 12.7%

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

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

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

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

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

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

    if 2.6000000000000001e-61 < B

    1. Initial program 47.4%

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

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

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

Alternative 17: 39.7% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\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 -5e-310) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
	double tmp;
	if (B <= -5e-310) {
		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 <= -5e-310) {
		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 <= -5e-310:
		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 <= -5e-310)
		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 <= -5e-310)
		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, -5e-310], 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 -5 \cdot 10^{-310}:\\
\;\;\;\;\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 < -4.999999999999985e-310

    1. Initial program 54.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/54.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/54.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. *-commutative54.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. Simplified77.9%

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

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

    if -4.999999999999985e-310 < B

    1. Initial program 47.2%

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

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

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

Alternative 18: 21.2% 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 50.9%

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

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

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

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

Reproduce

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