ABCF->ab-angle angle

Percentage Accurate: 54.1% → 88.8%
Time: 16.3s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 54.1% accurate, 1.0× speedup?

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

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

Alternative 1: 88.8% 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)\\ t_1 := \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)\\ \mathbf{if}\;t_0 \leq -5 \cdot 10^{-118}:\\ \;\;\;\;\frac{t_1 \cdot 180}{\pi}\\ \mathbf{elif}\;t_0 \leq 0:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{180}{\pi}\\ \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))))))
        (t_1 (atan (/ (- (- C A) (hypot B (- C A))) B))))
   (if (<= t_0 -5e-118)
     (/ (* t_1 180.0) PI)
     (if (<= t_0 0.0)
       (* (atan (/ (* B -0.5) (- C A))) (/ 180.0 PI))
       (* t_1 (/ 180.0 PI))))))
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 t_1 = atan((((C - A) - hypot(B, (C - A))) / B));
	double tmp;
	if (t_0 <= -5e-118) {
		tmp = (t_1 * 180.0) / ((double) M_PI);
	} else if (t_0 <= 0.0) {
		tmp = atan(((B * -0.5) / (C - A))) * (180.0 / ((double) M_PI));
	} else {
		tmp = t_1 * (180.0 / ((double) M_PI));
	}
	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 t_1 = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B));
	double tmp;
	if (t_0 <= -5e-118) {
		tmp = (t_1 * 180.0) / Math.PI;
	} else if (t_0 <= 0.0) {
		tmp = Math.atan(((B * -0.5) / (C - A))) * (180.0 / Math.PI);
	} else {
		tmp = t_1 * (180.0 / Math.PI);
	}
	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))))
	t_1 = math.atan((((C - A) - math.hypot(B, (C - A))) / B))
	tmp = 0
	if t_0 <= -5e-118:
		tmp = (t_1 * 180.0) / math.pi
	elif t_0 <= 0.0:
		tmp = math.atan(((B * -0.5) / (C - A))) * (180.0 / math.pi)
	else:
		tmp = t_1 * (180.0 / math.pi)
	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)))))
	t_1 = atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B))
	tmp = 0.0
	if (t_0 <= -5e-118)
		tmp = Float64(Float64(t_1 * 180.0) / pi);
	elseif (t_0 <= 0.0)
		tmp = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) * Float64(180.0 / pi));
	else
		tmp = Float64(t_1 * Float64(180.0 / pi));
	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))));
	t_1 = atan((((C - A) - hypot(B, (C - A))) / B));
	tmp = 0.0;
	if (t_0 <= -5e-118)
		tmp = (t_1 * 180.0) / pi;
	elseif (t_0 <= 0.0)
		tmp = atan(((B * -0.5) / (C - A))) * (180.0 / pi);
	else
		tmp = t_1 * (180.0 / pi);
	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]}, Block[{t$95$1 = N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -5e-118], N[(N[(t$95$1 * 180.0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(180.0 / Pi), $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)\\
t_1 := \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)\\
\mathbf{if}\;t_0 \leq -5 \cdot 10^{-118}:\\
\;\;\;\;\frac{t_1 \cdot 180}{\pi}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -5.00000000000000015e-118

    1. Initial program 59.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/59.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/59.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. *-commutative59.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. Simplified90.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. Step-by-step derivation
      1. associate-*r/90.2%

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

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

    if -5.00000000000000015e-118 < (*.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 21.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/21.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/21.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. *-commutative21.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. Simplified21.8%

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

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

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

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

    if 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 61.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/61.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/61.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. *-commutative61.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. Simplified89.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}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.3%

    \[\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 -5 \cdot 10^{-118}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot 180}{\pi}\\ \mathbf{elif}\;\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \leq 0:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\ \end{array} \]

Alternative 2: 82.1% accurate, 1.6× speedup?

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

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

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


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

    1. Initial program 59.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/59.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/59.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. *-commutative59.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. Simplified83.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 1.9e121 < C

    1. Initial program 12.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/12.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/12.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. *-commutative12.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. Simplified52.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 93.4%

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

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

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

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

Alternative 3: 75.7% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;A \leq 2 \cdot 10^{-19}:\\
\;\;\;\;\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(\frac{C - \left(A - B\right)}{B}\right)\\


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

    1. Initial program 19.4%

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

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

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

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

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

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

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

    if -2.75000000000000008e104 < A < 2e-19

    1. Initial program 55.0%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Step-by-step derivation
      1. associate-*r/55.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/55.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/55.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-identity55.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-neg55.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-54.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-neg54.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-neg54.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. +-commutative54.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. unpow254.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. unpow254.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-def79.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. Simplified79.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 53.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. unpow253.4%

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

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

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

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

    if 2e-19 < A

    1. Initial program 83.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/83.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/83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.75 \cdot 10^{+104}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq 2 \cdot 10^{-19}:\\ \;\;\;\;\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(\frac{C - \left(A - B\right)}{B}\right)\\ \end{array} \]

Alternative 4: 78.5% accurate, 1.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -1.06e-7

    1. Initial program 70.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.06e-7 < C < 1.80000000000000008e120

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.80000000000000008e120 < C

    1. Initial program 12.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/12.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/12.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. *-commutative12.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. Simplified52.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 93.4%

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

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

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

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

Alternative 5: 61.9% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ t_2 := \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{if}\;B \leq -2.6 \cdot 10^{-62}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -3 \cdot 10^{-180}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -3.8 \cdot 10^{-188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -3.7 \cdot 10^{-295}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 1.75 \cdot 10^{-279}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B}\right)\\ \mathbf{elif}\;B \leq 4.6 \cdot 10^{-215} \lor \neg \left(B \leq 1.28 \cdot 10^{-107}\right) \land B \leq 3.8 \cdot 10^{-69}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))
        (t_1 (* (/ 180.0 PI) (atan (/ (- B A) B))))
        (t_2 (* (atan (/ (* B -0.5) (- C A))) (/ 180.0 PI))))
   (if (<= B -2.6e-62)
     t_1
     (if (<= B -3e-180)
       t_0
       (if (<= B -3.8e-188)
         t_1
         (if (<= B -3.7e-295)
           t_2
           (if (<= B 1.75e-279)
             (* (/ 180.0 PI) (atan (/ (* (- C A) 2.0) B)))
             (if (or (<= B 4.6e-215)
                     (and (not (<= B 1.28e-107)) (<= B 3.8e-69)))
               t_2
               t_0))))))))
double code(double A, double B, double C) {
	double t_0 = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
	double t_1 = (180.0 / ((double) M_PI)) * atan(((B - A) / B));
	double t_2 = atan(((B * -0.5) / (C - A))) * (180.0 / ((double) M_PI));
	double tmp;
	if (B <= -2.6e-62) {
		tmp = t_1;
	} else if (B <= -3e-180) {
		tmp = t_0;
	} else if (B <= -3.8e-188) {
		tmp = t_1;
	} else if (B <= -3.7e-295) {
		tmp = t_2;
	} else if (B <= 1.75e-279) {
		tmp = (180.0 / ((double) M_PI)) * atan((((C - A) * 2.0) / B));
	} else if ((B <= 4.6e-215) || (!(B <= 1.28e-107) && (B <= 3.8e-69))) {
		tmp = t_2;
	} else {
		tmp = t_0;
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
	double t_1 = (180.0 / Math.PI) * Math.atan(((B - A) / B));
	double t_2 = Math.atan(((B * -0.5) / (C - A))) * (180.0 / Math.PI);
	double tmp;
	if (B <= -2.6e-62) {
		tmp = t_1;
	} else if (B <= -3e-180) {
		tmp = t_0;
	} else if (B <= -3.8e-188) {
		tmp = t_1;
	} else if (B <= -3.7e-295) {
		tmp = t_2;
	} else if (B <= 1.75e-279) {
		tmp = (180.0 / Math.PI) * Math.atan((((C - A) * 2.0) / B));
	} else if ((B <= 4.6e-215) || (!(B <= 1.28e-107) && (B <= 3.8e-69))) {
		tmp = t_2;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(A, B, C):
	t_0 = (180.0 / math.pi) * math.atan(((C - (B + A)) / B))
	t_1 = (180.0 / math.pi) * math.atan(((B - A) / B))
	t_2 = math.atan(((B * -0.5) / (C - A))) * (180.0 / math.pi)
	tmp = 0
	if B <= -2.6e-62:
		tmp = t_1
	elif B <= -3e-180:
		tmp = t_0
	elif B <= -3.8e-188:
		tmp = t_1
	elif B <= -3.7e-295:
		tmp = t_2
	elif B <= 1.75e-279:
		tmp = (180.0 / math.pi) * math.atan((((C - A) * 2.0) / B))
	elif (B <= 4.6e-215) or (not (B <= 1.28e-107) and (B <= 3.8e-69)):
		tmp = t_2
	else:
		tmp = t_0
	return tmp
function code(A, B, C)
	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B)))
	t_1 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B - A) / B)))
	t_2 = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) * Float64(180.0 / pi))
	tmp = 0.0
	if (B <= -2.6e-62)
		tmp = t_1;
	elseif (B <= -3e-180)
		tmp = t_0;
	elseif (B <= -3.8e-188)
		tmp = t_1;
	elseif (B <= -3.7e-295)
		tmp = t_2;
	elseif (B <= 1.75e-279)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(C - A) * 2.0) / B)));
	elseif ((B <= 4.6e-215) || (!(B <= 1.28e-107) && (B <= 3.8e-69)))
		tmp = t_2;
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = (180.0 / pi) * atan(((C - (B + A)) / B));
	t_1 = (180.0 / pi) * atan(((B - A) / B));
	t_2 = atan(((B * -0.5) / (C - A))) * (180.0 / pi);
	tmp = 0.0;
	if (B <= -2.6e-62)
		tmp = t_1;
	elseif (B <= -3e-180)
		tmp = t_0;
	elseif (B <= -3.8e-188)
		tmp = t_1;
	elseif (B <= -3.7e-295)
		tmp = t_2;
	elseif (B <= 1.75e-279)
		tmp = (180.0 / pi) * atan((((C - A) * 2.0) / B));
	elseif ((B <= 4.6e-215) || (~((B <= 1.28e-107)) && (B <= 3.8e-69)))
		tmp = t_2;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.6e-62], t$95$1, If[LessEqual[B, -3e-180], t$95$0, If[LessEqual[B, -3.8e-188], t$95$1, If[LessEqual[B, -3.7e-295], t$95$2, If[LessEqual[B, 1.75e-279], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 4.6e-215], And[N[Not[LessEqual[B, 1.28e-107]], $MachinePrecision], LessEqual[B, 3.8e-69]]], t$95$2, t$95$0]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;B \leq -3.8 \cdot 10^{-188}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;B \leq -3.7 \cdot 10^{-295}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;B \leq 4.6 \cdot 10^{-215} \lor \neg \left(B \leq 1.28 \cdot 10^{-107}\right) \land B \leq 3.8 \cdot 10^{-69}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < -2.5999999999999999e-62 or -3.0000000000000001e-180 < B < -3.8e-188

    1. Initial program 55.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/55.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/55.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/55.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-identity55.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-neg55.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-55.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-neg55.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-neg55.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. +-commutative55.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. unpow255.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. unpow255.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-def79.9%

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

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

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

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

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

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

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

    if -2.5999999999999999e-62 < B < -3.0000000000000001e-180 or 4.5999999999999998e-215 < B < 1.28e-107 or 3.7999999999999998e-69 < B

    1. Initial program 57.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/57.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/57.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/57.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-identity57.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-neg57.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-57.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-neg57.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-neg57.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. +-commutative57.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. unpow257.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. unpow257.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-def79.1%

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

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

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

    if -3.8e-188 < B < -3.6999999999999999e-295 or 1.75000000000000005e-279 < B < 4.5999999999999998e-215 or 1.28e-107 < B < 3.7999999999999998e-69

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

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

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

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

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

    if -3.6999999999999999e-295 < B < 1.75000000000000005e-279

    1. Initial program 75.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/75.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/75.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. *-commutative75.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 C around -inf 75.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.6 \cdot 10^{-62}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \mathbf{elif}\;B \leq -3 \cdot 10^{-180}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \mathbf{elif}\;B \leq -3.8 \cdot 10^{-188}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \mathbf{elif}\;B \leq -3.7 \cdot 10^{-295}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 1.75 \cdot 10^{-279}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B}\right)\\ \mathbf{elif}\;B \leq 4.6 \cdot 10^{-215} \lor \neg \left(B \leq 1.28 \cdot 10^{-107}\right) \land B \leq 3.8 \cdot 10^{-69}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \end{array} \]

Alternative 6: 59.0% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \mathbf{if}\;C \leq -7 \cdot 10^{+41}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{elif}\;C \leq -1 \cdot 10^{-142}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq -1.8 \cdot 10^{-243}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\ \mathbf{elif}\;C \leq 1.7 \cdot 10^{-166} \lor \neg \left(C \leq 6.3 \cdot 10^{-72}\right) \land C \leq 8.6 \cdot 10^{+85}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (/ 180.0 PI) (atan (/ (- B A) B)))))
   (if (<= C -7e+41)
     (* (/ 180.0 PI) (atan (/ (- C B) B)))
     (if (<= C -1e-142)
       t_0
       (if (<= C -1.8e-243)
         (* (/ 180.0 PI) (atan (- -1.0 (/ A B))))
         (if (or (<= C 1.7e-166) (and (not (<= C 6.3e-72)) (<= C 8.6e+85)))
           t_0
           (* (atan (/ (* B -0.5) (- C A))) (/ 180.0 PI))))))))
double code(double A, double B, double C) {
	double t_0 = (180.0 / ((double) M_PI)) * atan(((B - A) / B));
	double tmp;
	if (C <= -7e+41) {
		tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
	} else if (C <= -1e-142) {
		tmp = t_0;
	} else if (C <= -1.8e-243) {
		tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
	} else if ((C <= 1.7e-166) || (!(C <= 6.3e-72) && (C <= 8.6e+85))) {
		tmp = t_0;
	} else {
		tmp = atan(((B * -0.5) / (C - A))) * (180.0 / ((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 - A) / B));
	double tmp;
	if (C <= -7e+41) {
		tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
	} else if (C <= -1e-142) {
		tmp = t_0;
	} else if (C <= -1.8e-243) {
		tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
	} else if ((C <= 1.7e-166) || (!(C <= 6.3e-72) && (C <= 8.6e+85))) {
		tmp = t_0;
	} else {
		tmp = Math.atan(((B * -0.5) / (C - A))) * (180.0 / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = (180.0 / math.pi) * math.atan(((B - A) / B))
	tmp = 0
	if C <= -7e+41:
		tmp = (180.0 / math.pi) * math.atan(((C - B) / B))
	elif C <= -1e-142:
		tmp = t_0
	elif C <= -1.8e-243:
		tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B)))
	elif (C <= 1.7e-166) or (not (C <= 6.3e-72) and (C <= 8.6e+85)):
		tmp = t_0
	else:
		tmp = math.atan(((B * -0.5) / (C - A))) * (180.0 / math.pi)
	return tmp
function code(A, B, C)
	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B - A) / B)))
	tmp = 0.0
	if (C <= -7e+41)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B)));
	elseif (C <= -1e-142)
		tmp = t_0;
	elseif (C <= -1.8e-243)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B))));
	elseif ((C <= 1.7e-166) || (!(C <= 6.3e-72) && (C <= 8.6e+85)))
		tmp = t_0;
	else
		tmp = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) * Float64(180.0 / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = (180.0 / pi) * atan(((B - A) / B));
	tmp = 0.0;
	if (C <= -7e+41)
		tmp = (180.0 / pi) * atan(((C - B) / B));
	elseif (C <= -1e-142)
		tmp = t_0;
	elseif (C <= -1.8e-243)
		tmp = (180.0 / pi) * atan((-1.0 - (A / B)));
	elseif ((C <= 1.7e-166) || (~((C <= 6.3e-72)) && (C <= 8.6e+85)))
		tmp = t_0;
	else
		tmp = atan(((B * -0.5) / (C - A))) * (180.0 / 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 - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -7e+41], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1e-142], t$95$0, If[LessEqual[C, -1.8e-243], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 1.7e-166], And[N[Not[LessEqual[C, 6.3e-72]], $MachinePrecision], LessEqual[C, 8.6e+85]]], t$95$0, N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;C \leq -1 \cdot 10^{-142}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;C \leq 1.7 \cdot 10^{-166} \lor \neg \left(C \leq 6.3 \cdot 10^{-72}\right) \land C \leq 8.6 \cdot 10^{+85}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if C < -6.9999999999999998e41

    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. associate-*l/70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.9999999999999998e41 < C < -1e-142 or -1.8000000000000001e-243 < C < 1.6999999999999999e-166 or 6.3000000000000003e-72 < C < 8.5999999999999998e85

    1. Initial program 55.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/55.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e-142 < C < -1.8000000000000001e-243

    1. Initial program 66.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/66.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/66.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/66.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-identity66.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-neg66.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-66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6999999999999999e-166 < C < 6.3000000000000003e-72 or 8.5999999999999998e85 < C

    1. Initial program 27.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/27.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/27.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. *-commutative27.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.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 78.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -7 \cdot 10^{+41}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{elif}\;C \leq -1 \cdot 10^{-142}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \mathbf{elif}\;C \leq -1.8 \cdot 10^{-243}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\ \mathbf{elif}\;C \leq 1.7 \cdot 10^{-166} \lor \neg \left(C \leq 6.3 \cdot 10^{-72}\right) \land C \leq 8.6 \cdot 10^{+85}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \end{array} \]

Alternative 7: 65.4% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{if}\;B \leq -4.3 \cdot 10^{-188}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\ \mathbf{elif}\;B \leq -1.95 \cdot 10^{-294}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.65 \cdot 10^{-279}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B}\right)\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{-213} \lor \neg \left(B \leq 8.2 \cdot 10^{-107}\right) \land B \leq 4.6 \cdot 10^{-71}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (atan (/ (* B -0.5) (- C A))) (/ 180.0 PI))))
   (if (<= B -4.3e-188)
     (* (/ 180.0 PI) (atan (/ (- C (- A B)) B)))
     (if (<= B -1.95e-294)
       t_0
       (if (<= B 1.65e-279)
         (* (/ 180.0 PI) (atan (/ (* (- C A) 2.0) B)))
         (if (or (<= B 1.2e-213) (and (not (<= B 8.2e-107)) (<= B 4.6e-71)))
           t_0
           (* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))))))))
double code(double A, double B, double C) {
	double t_0 = atan(((B * -0.5) / (C - A))) * (180.0 / ((double) M_PI));
	double tmp;
	if (B <= -4.3e-188) {
		tmp = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
	} else if (B <= -1.95e-294) {
		tmp = t_0;
	} else if (B <= 1.65e-279) {
		tmp = (180.0 / ((double) M_PI)) * atan((((C - A) * 2.0) / B));
	} else if ((B <= 1.2e-213) || (!(B <= 8.2e-107) && (B <= 4.6e-71))) {
		tmp = t_0;
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = Math.atan(((B * -0.5) / (C - A))) * (180.0 / Math.PI);
	double tmp;
	if (B <= -4.3e-188) {
		tmp = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
	} else if (B <= -1.95e-294) {
		tmp = t_0;
	} else if (B <= 1.65e-279) {
		tmp = (180.0 / Math.PI) * Math.atan((((C - A) * 2.0) / B));
	} else if ((B <= 1.2e-213) || (!(B <= 8.2e-107) && (B <= 4.6e-71))) {
		tmp = t_0;
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
	}
	return tmp;
}
def code(A, B, C):
	t_0 = math.atan(((B * -0.5) / (C - A))) * (180.0 / math.pi)
	tmp = 0
	if B <= -4.3e-188:
		tmp = (180.0 / math.pi) * math.atan(((C - (A - B)) / B))
	elif B <= -1.95e-294:
		tmp = t_0
	elif B <= 1.65e-279:
		tmp = (180.0 / math.pi) * math.atan((((C - A) * 2.0) / B))
	elif (B <= 1.2e-213) or (not (B <= 8.2e-107) and (B <= 4.6e-71)):
		tmp = t_0
	else:
		tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B))
	return tmp
function code(A, B, C)
	t_0 = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) * Float64(180.0 / pi))
	tmp = 0.0
	if (B <= -4.3e-188)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B)));
	elseif (B <= -1.95e-294)
		tmp = t_0;
	elseif (B <= 1.65e-279)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(C - A) * 2.0) / B)));
	elseif ((B <= 1.2e-213) || (!(B <= 8.2e-107) && (B <= 4.6e-71)))
		tmp = t_0;
	else
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B)));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = atan(((B * -0.5) / (C - A))) * (180.0 / pi);
	tmp = 0.0;
	if (B <= -4.3e-188)
		tmp = (180.0 / pi) * atan(((C - (A - B)) / B));
	elseif (B <= -1.95e-294)
		tmp = t_0;
	elseif (B <= 1.65e-279)
		tmp = (180.0 / pi) * atan((((C - A) * 2.0) / B));
	elseif ((B <= 1.2e-213) || (~((B <= 8.2e-107)) && (B <= 4.6e-71)))
		tmp = t_0;
	else
		tmp = (180.0 / pi) * atan(((C - (B + A)) / B));
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.3e-188], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.95e-294], t$95$0, If[LessEqual[B, 1.65e-279], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 1.2e-213], And[N[Not[LessEqual[B, 8.2e-107]], $MachinePrecision], LessEqual[B, 4.6e-71]]], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;B \leq -1.95 \cdot 10^{-294}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;B \leq 1.2 \cdot 10^{-213} \lor \neg \left(B \leq 8.2 \cdot 10^{-107}\right) \land B \leq 4.6 \cdot 10^{-71}:\\
\;\;\;\;t_0\\

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


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

    1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.29999999999999988e-188 < B < -1.9500000000000001e-294 or 1.65e-279 < B < 1.19999999999999998e-213 or 8.1999999999999998e-107 < B < 4.5999999999999997e-71

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

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

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

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

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

    if -1.9500000000000001e-294 < B < 1.65e-279

    1. Initial program 75.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/75.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/75.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. *-commutative75.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 C around -inf 75.8%

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

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

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

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

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

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

    if 1.19999999999999998e-213 < B < 8.1999999999999998e-107 or 4.5999999999999997e-71 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.3 \cdot 10^{-188}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\ \mathbf{elif}\;B \leq -1.95 \cdot 10^{-294}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 1.65 \cdot 10^{-279}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B}\right)\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{-213} \lor \neg \left(B \leq 8.2 \cdot 10^{-107}\right) \land B \leq 4.6 \cdot 10^{-71}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \end{array} \]

Alternative 8: 65.3% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ t_1 := t_0 \cdot \frac{180}{\pi}\\ \mathbf{if}\;B \leq -2.6 \cdot 10^{-188}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\ \mathbf{elif}\;B \leq -1.1 \cdot 10^{-292}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-279}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B}\right)\\ \mathbf{elif}\;B \leq 5.8 \cdot 10^{-214}:\\ \;\;\;\;\frac{180 \cdot t_0}{\pi}\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{-104} \lor \neg \left(B \leq 1.9 \cdot 10^{-65}\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (atan (/ (* B -0.5) (- C A)))) (t_1 (* t_0 (/ 180.0 PI))))
   (if (<= B -2.6e-188)
     (* (/ 180.0 PI) (atan (/ (- C (- A B)) B)))
     (if (<= B -1.1e-292)
       t_1
       (if (<= B 1.5e-279)
         (* (/ 180.0 PI) (atan (/ (* (- C A) 2.0) B)))
         (if (<= B 5.8e-214)
           (/ (* 180.0 t_0) PI)
           (if (or (<= B 4.4e-104) (not (<= B 1.9e-65)))
             (* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))
             t_1)))))))
double code(double A, double B, double C) {
	double t_0 = atan(((B * -0.5) / (C - A)));
	double t_1 = t_0 * (180.0 / ((double) M_PI));
	double tmp;
	if (B <= -2.6e-188) {
		tmp = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
	} else if (B <= -1.1e-292) {
		tmp = t_1;
	} else if (B <= 1.5e-279) {
		tmp = (180.0 / ((double) M_PI)) * atan((((C - A) * 2.0) / B));
	} else if (B <= 5.8e-214) {
		tmp = (180.0 * t_0) / ((double) M_PI);
	} else if ((B <= 4.4e-104) || !(B <= 1.9e-65)) {
		tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = Math.atan(((B * -0.5) / (C - A)));
	double t_1 = t_0 * (180.0 / Math.PI);
	double tmp;
	if (B <= -2.6e-188) {
		tmp = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
	} else if (B <= -1.1e-292) {
		tmp = t_1;
	} else if (B <= 1.5e-279) {
		tmp = (180.0 / Math.PI) * Math.atan((((C - A) * 2.0) / B));
	} else if (B <= 5.8e-214) {
		tmp = (180.0 * t_0) / Math.PI;
	} else if ((B <= 4.4e-104) || !(B <= 1.9e-65)) {
		tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(A, B, C):
	t_0 = math.atan(((B * -0.5) / (C - A)))
	t_1 = t_0 * (180.0 / math.pi)
	tmp = 0
	if B <= -2.6e-188:
		tmp = (180.0 / math.pi) * math.atan(((C - (A - B)) / B))
	elif B <= -1.1e-292:
		tmp = t_1
	elif B <= 1.5e-279:
		tmp = (180.0 / math.pi) * math.atan((((C - A) * 2.0) / B))
	elif B <= 5.8e-214:
		tmp = (180.0 * t_0) / math.pi
	elif (B <= 4.4e-104) or not (B <= 1.9e-65):
		tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B))
	else:
		tmp = t_1
	return tmp
function code(A, B, C)
	t_0 = atan(Float64(Float64(B * -0.5) / Float64(C - A)))
	t_1 = Float64(t_0 * Float64(180.0 / pi))
	tmp = 0.0
	if (B <= -2.6e-188)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B)));
	elseif (B <= -1.1e-292)
		tmp = t_1;
	elseif (B <= 1.5e-279)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(C - A) * 2.0) / B)));
	elseif (B <= 5.8e-214)
		tmp = Float64(Float64(180.0 * t_0) / pi);
	elseif ((B <= 4.4e-104) || !(B <= 1.9e-65))
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = atan(((B * -0.5) / (C - A)));
	t_1 = t_0 * (180.0 / pi);
	tmp = 0.0;
	if (B <= -2.6e-188)
		tmp = (180.0 / pi) * atan(((C - (A - B)) / B));
	elseif (B <= -1.1e-292)
		tmp = t_1;
	elseif (B <= 1.5e-279)
		tmp = (180.0 / pi) * atan((((C - A) * 2.0) / B));
	elseif (B <= 5.8e-214)
		tmp = (180.0 * t_0) / pi;
	elseif ((B <= 4.4e-104) || ~((B <= 1.9e-65)))
		tmp = (180.0 / pi) * atan(((C - (B + A)) / B));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.6e-188], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.1e-292], t$95$1, If[LessEqual[B, 1.5e-279], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.8e-214], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[B, 4.4e-104], N[Not[LessEqual[B, 1.9e-65]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;B \leq -1.1 \cdot 10^{-292}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;B \leq 4.4 \cdot 10^{-104} \lor \neg \left(B \leq 1.9 \cdot 10^{-65}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000001e-188 < B < -1.10000000000000006e-292 or 4.40000000000000023e-104 < B < 1.9000000000000001e-65

    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. Simplified63.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 71.0%

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

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

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

    if -1.10000000000000006e-292 < B < 1.5e-279

    1. Initial program 75.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/75.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/75.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. *-commutative75.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 C around -inf 75.8%

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

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

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

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

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

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

    if 1.5e-279 < B < 5.7999999999999997e-214

    1. Initial program 57.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/57.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/57.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. *-commutative57.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. Simplified73.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. Step-by-step derivation
      1. associate-*r/73.9%

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

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

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

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

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

    if 5.7999999999999997e-214 < B < 4.40000000000000023e-104 or 1.9000000000000001e-65 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.6 \cdot 10^{-188}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\ \mathbf{elif}\;B \leq -1.1 \cdot 10^{-292}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-279}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B}\right)\\ \mathbf{elif}\;B \leq 5.8 \cdot 10^{-214}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{-104} \lor \neg \left(B \leq 1.9 \cdot 10^{-65}\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\ \end{array} \]

Alternative 9: 48.3% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{if}\;A \leq -7 \cdot 10^{-26}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -3.65 \cdot 10^{-233}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 3.4 \cdot 10^{-220}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;A \leq 4 \cdot 10^{-77}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{-22}:\\ \;\;\;\;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 -1.0))))
   (if (<= A -7e-26)
     (* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
     (if (<= A -3.65e-233)
       t_0
       (if (<= A 3.4e-220)
         (* (/ 180.0 PI) (atan 1.0))
         (if (<= A 4e-77)
           (* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
           (if (<= A 3.8e-22)
             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(-1.0);
	double tmp;
	if (A <= -7e-26) {
		tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
	} else if (A <= -3.65e-233) {
		tmp = t_0;
	} else if (A <= 3.4e-220) {
		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
	} else if (A <= 4e-77) {
		tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
	} else if (A <= 3.8e-22) {
		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(-1.0);
	double tmp;
	if (A <= -7e-26) {
		tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
	} else if (A <= -3.65e-233) {
		tmp = t_0;
	} else if (A <= 3.4e-220) {
		tmp = (180.0 / Math.PI) * Math.atan(1.0);
	} else if (A <= 4e-77) {
		tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
	} else if (A <= 3.8e-22) {
		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(-1.0)
	tmp = 0
	if A <= -7e-26:
		tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A)))
	elif A <= -3.65e-233:
		tmp = t_0
	elif A <= 3.4e-220:
		tmp = (180.0 / math.pi) * math.atan(1.0)
	elif A <= 4e-77:
		tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B))
	elif A <= 3.8e-22:
		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(-1.0))
	tmp = 0.0
	if (A <= -7e-26)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A))));
	elseif (A <= -3.65e-233)
		tmp = t_0;
	elseif (A <= 3.4e-220)
		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
	elseif (A <= 4e-77)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B)));
	elseif (A <= 3.8e-22)
		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(-1.0);
	tmp = 0.0;
	if (A <= -7e-26)
		tmp = (180.0 / pi) * atan((0.5 * (B / A)));
	elseif (A <= -3.65e-233)
		tmp = t_0;
	elseif (A <= 3.4e-220)
		tmp = (180.0 / pi) * atan(1.0);
	elseif (A <= 4e-77)
		tmp = (180.0 / pi) * atan(((C * 2.0) / B));
	elseif (A <= 3.8e-22)
		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[-1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -7e-26], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.65e-233], t$95$0, If[LessEqual[A, 3.4e-220], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4e-77], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e-22], 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} -1\\
\mathbf{if}\;A \leq -7 \cdot 10^{-26}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\

\mathbf{elif}\;A \leq -3.65 \cdot 10^{-233}:\\
\;\;\;\;t_0\\

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

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

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

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


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

    1. Initial program 28.2%

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

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

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

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

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

    if -6.9999999999999997e-26 < A < -3.6500000000000002e-233 or 3.9999999999999997e-77 < A < 3.80000000000000023e-22

    1. Initial program 51.2%

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

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

    if -3.6500000000000002e-233 < A < 3.39999999999999993e-220

    1. Initial program 63.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/63.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/63.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. *-commutative63.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. Simplified95.0%

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

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

    if 3.39999999999999993e-220 < A < 3.9999999999999997e-77

    1. Initial program 69.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/69.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/69.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. *-commutative69.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. Simplified73.4%

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

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

    if 3.80000000000000023e-22 < A

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7 \cdot 10^{-26}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -3.65 \cdot 10^{-233}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;A \leq 3.4 \cdot 10^{-220}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;A \leq 4 \cdot 10^{-77}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{-22}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \end{array} \]

Alternative 10: 48.1% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;A \leq -8 \cdot 10^{-229}:\\
\;\;\;\;t_0\\

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

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

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

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


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

    1. Initial program 28.2%

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

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

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

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

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

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

    if -8.0000000000000003e-26 < A < -8.00000000000000055e-229 or 2.15e-76 < A < 1.4500000000000001e-22

    1. Initial program 51.2%

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

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

    if -8.00000000000000055e-229 < A < 2.8999999999999998e-220

    1. Initial program 63.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/63.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/63.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. *-commutative63.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. Simplified95.0%

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

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

    if 2.8999999999999998e-220 < A < 2.15e-76

    1. Initial program 69.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/69.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/69.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/69.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-identity69.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-neg69.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-69.0%

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

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

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

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

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

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

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

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

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

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

    if 1.4500000000000001e-22 < A

    1. Initial program 83.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/83.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/83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -8 \cdot 10^{-26}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -8 \cdot 10^{-229}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;A \leq 2.9 \cdot 10^{-220}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;A \leq 2.15 \cdot 10^{-76}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;A \leq 1.45 \cdot 10^{-22}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \end{array} \]

Alternative 11: 48.1% accurate, 2.4× speedup?

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

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

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

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

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

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

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


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

    1. Initial program 28.2%

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

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

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

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

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

    if -7.0000000000000004e-25 < A < -2.6500000000000001e-232 or 1.54999999999999985e-76 < A < 2.10000000000000008e-22

    1. Initial program 51.2%

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

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

    if -2.6500000000000001e-232 < A < 3.00000000000000017e-220

    1. Initial program 63.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/63.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/63.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. *-commutative63.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. Simplified95.0%

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

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

    if 3.00000000000000017e-220 < A < 1.54999999999999985e-76

    1. Initial program 69.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/69.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/69.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/69.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-identity69.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-neg69.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-69.0%

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

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

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

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

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

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

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

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

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

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

    if 2.10000000000000008e-22 < A

    1. Initial program 83.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/83.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/83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7 \cdot 10^{-25}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -2.65 \cdot 10^{-232}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;A \leq 3 \cdot 10^{-220}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;A \leq 1.55 \cdot 10^{-76}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;A \leq 2.1 \cdot 10^{-22}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \end{array} \]

Alternative 12: 48.2% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;A \leq -1.05 \cdot 10^{-230}:\\
\;\;\;\;t_0\\

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

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

\mathbf{elif}\;A \leq 1.8 \cdot 10^{-21}:\\
\;\;\;\;t_0\\

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


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

    1. Initial program 28.2%

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

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

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

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

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

    if -6.19999999999999966e-26 < A < -1.0499999999999999e-230 or 7.2e-77 < A < 1.79999999999999995e-21

    1. Initial program 51.2%

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

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

    if -1.0499999999999999e-230 < A < 3.20000000000000005e-220

    1. Initial program 63.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/63.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/63.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. *-commutative63.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. Simplified95.0%

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

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

    if 3.20000000000000005e-220 < A < 7.2e-77

    1. Initial program 69.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/69.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/69.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. *-commutative69.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. Simplified73.4%

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

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

    if 1.79999999999999995e-21 < A

    1. Initial program 83.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/83.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/83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -6.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -1.05 \cdot 10^{-230}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;A \leq 3.2 \cdot 10^{-220}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;A \leq 7.2 \cdot 10^{-77}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;A \leq 1.8 \cdot 10^{-21}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \end{array} \]

Alternative 13: 52.9% accurate, 2.4× speedup?

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

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

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

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

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


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

    1. Initial program 28.2%

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

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

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

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

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

    if -6.19999999999999966e-26 < A < -1.11999999999999997e-231

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

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

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

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

    if -1.11999999999999997e-231 < A < 5.5000000000000002e-203

    1. Initial program 62.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/62.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/62.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. *-commutative62.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. Simplified90.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 46.3%

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

    if 5.5000000000000002e-203 < 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. associate-*l/77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -6.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -1.12 \cdot 10^{-231}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;A \leq 5.5 \cdot 10^{-203}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\ \end{array} \]

Alternative 14: 44.8% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;B \leq -9.5 \cdot 10^{-198}:\\
\;\;\;\;t_0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < -3.0000000000000001e-62 or -9.4000000000000005e-179 < B < -9.4999999999999997e-198

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

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

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

    if -3.0000000000000001e-62 < B < -9.4000000000000005e-179

    1. Initial program 69.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/69.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/69.2%

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

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

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{\left(C - A\right) + \left(-\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{B}\right) \]
      6. associate-+l-69.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-neg69.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-neg69.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. +-commutative69.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. unpow269.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. unpow269.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-def72.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. Simplified72.3%

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

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

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

    if -9.4999999999999997e-198 < B < 1.22000000000000009e-201

    1. Initial program 57.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/57.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/57.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. *-commutative57.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.22000000000000009e-201 < B

    1. Initial program 51.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3 \cdot 10^{-62}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -9.4 \cdot 10^{-179}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;B \leq -9.5 \cdot 10^{-198}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 1.22 \cdot 10^{-201}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]

Alternative 15: 53.2% accurate, 2.4× speedup?

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

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

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

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


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

    1. Initial program 28.2%

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

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

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

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

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

    if -1.6000000000000001e-25 < A < -3.8000000000000002e-242

    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. Simplified84.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 38.1%

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

    if -3.8000000000000002e-242 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.6 \cdot 10^{-25}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -3.8 \cdot 10^{-242}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\ \end{array} \]

Alternative 16: 59.2% accurate, 2.4× speedup?

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

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

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

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


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

    1. Initial program 28.2%

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

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

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

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

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

    if -1.95e-24 < A < 6.9999999999999999e-36

    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-def85.4%

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

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

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

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

    if 6.9999999999999999e-36 < A

    1. Initial program 82.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/82.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/82.9%

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

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

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\color{blue}{\left(C - A\right) + \left(-\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{B}\right) \]
      6. associate-+l-82.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-neg82.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-neg82.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. +-commutative82.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. unpow282.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. unpow282.9%

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

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

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

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

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

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

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

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

Alternative 17: 45.5% accurate, 2.5× speedup?

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

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

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

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

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


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

    1. Initial program 56.5%

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

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

    if -2.5999999999999999e-62 < B < -1.5000000000000001e-198

    1. Initial program 57.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/57.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/57.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/57.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-identity57.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-neg57.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-57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5000000000000001e-198 < B < 6.50000000000000017e-199

    1. Initial program 57.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/57.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/57.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. *-commutative57.8%

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

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

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

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

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

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

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

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

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

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

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

    if 6.50000000000000017e-199 < B

    1. Initial program 51.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.6 \cdot 10^{-62}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -1.5 \cdot 10^{-198}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-199}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]

Alternative 18: 43.6% accurate, 2.5× speedup?

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

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

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

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


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

    1. Initial program 56.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/56.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/56.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. *-commutative56.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. Simplified80.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 48.8%

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

    if -7.99999999999999986e-199 < B < 2.9e-199

    1. Initial program 57.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/57.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/57.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. *-commutative57.8%

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

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

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

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

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

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

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

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

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

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

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

    if 2.9e-199 < B

    1. Initial program 51.0%

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

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

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

Alternative 19: 39.0% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -5 \cdot 10^{-311}:\\ \;\;\;\;\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-311) (* (/ 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-311) {
		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-311) {
		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-311:
		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-311)
		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-311)
		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-311], 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^{-311}:\\
\;\;\;\;\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 < -5.00000000000023e-311

    1. Initial program 55.7%

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

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

    if -5.00000000000023e-311 < B

    1. Initial program 53.9%

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

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

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

Alternative 20: 20.6% 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 54.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/54.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/54.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. *-commutative54.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. Simplified80.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 20.1%

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

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

Reproduce

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