ABCF->ab-angle angle

Percentage Accurate: 53.9% → 88.1%
Time: 20.9s
Alternatives: 19
Speedup: 2.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 53.9% accurate, 1.0× speedup?

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

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

Alternative 1: 88.1% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 60.3%

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

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

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

    1. Initial program 20.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/20.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/20.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. *-commutative20.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. Simplified20.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 99.1%

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

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

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

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

Alternative 2: 76.7% accurate, 1.6× speedup?

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

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

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

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

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


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

    1. Initial program 78.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/78.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/78.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. *-commutative78.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. Simplified94.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 A around 0 73.3%

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

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

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

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

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

    if -3.59999999999999995e-110 < C < -3.3999999999999997e-166

    1. Initial program 36.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/36.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/36.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. *-commutative36.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. Simplified36.5%

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

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

    if -3.3999999999999997e-166 < C < 1.05e9

    1. Initial program 52.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/52.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/52.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. *-commutative52.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. Simplified79.8%

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

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

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

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

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

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

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

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

    if 1.05e9 < C

    1. Initial program 23.2%

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

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

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

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

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

Alternative 3: 68.3% accurate, 1.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -3.59999999999999995e-110 or -3.3999999999999997e-166 < C < 1.05e8

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

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

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

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

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

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

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

    if -3.59999999999999995e-110 < C < -3.3999999999999997e-166

    1. Initial program 36.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/36.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/36.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. *-commutative36.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. Simplified36.5%

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

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

    if 1.05e8 < C

    1. Initial program 23.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -3.6 \cdot 10^{-110}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\ \mathbf{elif}\;C \leq -3.4 \cdot 10^{-166}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 105000000:\\ \;\;\;\;\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{B \cdot -0.5}{C - A}\right)\\ \end{array} \]

Alternative 4: 48.2% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{if}\;C \leq -3800:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -4.1 \cdot 10^{-275}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1.3 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 9.5 \cdot 10^{-168}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 5.4 \cdot 10^{-115}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 3.8 \cdot 10^{-56} \lor \neg \left(C \leq 62000000\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)))
        (t_1 (* (/ 180.0 PI) (atan 1.0))))
   (if (<= C -3800.0)
     (/ (* 180.0 (atan (/ C B))) PI)
     (if (<= C -4.1e-275)
       t_0
       (if (<= C 1.3e-272)
         t_1
         (if (<= C 9.5e-168)
           t_0
           (if (<= C 5.4e-115)
             (* (/ 180.0 PI) (atan -1.0))
             (if (or (<= C 3.8e-56) (not (<= C 62000000.0)))
               (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
               t_1))))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
	double t_1 = (180.0 / ((double) M_PI)) * atan(1.0);
	double tmp;
	if (C <= -3800.0) {
		tmp = (180.0 * atan((C / B))) / ((double) M_PI);
	} else if (C <= -4.1e-275) {
		tmp = t_0;
	} else if (C <= 1.3e-272) {
		tmp = t_1;
	} else if (C <= 9.5e-168) {
		tmp = t_0;
	} else if (C <= 5.4e-115) {
		tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
	} else if ((C <= 3.8e-56) || !(C <= 62000000.0)) {
		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
	double t_1 = (180.0 / Math.PI) * Math.atan(1.0);
	double tmp;
	if (C <= -3800.0) {
		tmp = (180.0 * Math.atan((C / B))) / Math.PI;
	} else if (C <= -4.1e-275) {
		tmp = t_0;
	} else if (C <= 1.3e-272) {
		tmp = t_1;
	} else if (C <= 9.5e-168) {
		tmp = t_0;
	} else if (C <= 5.4e-115) {
		tmp = (180.0 / Math.PI) * Math.atan(-1.0);
	} else if ((C <= 3.8e-56) || !(C <= 62000000.0)) {
		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
	t_1 = (180.0 / math.pi) * math.atan(1.0)
	tmp = 0
	if C <= -3800.0:
		tmp = (180.0 * math.atan((C / B))) / math.pi
	elif C <= -4.1e-275:
		tmp = t_0
	elif C <= 1.3e-272:
		tmp = t_1
	elif C <= 9.5e-168:
		tmp = t_0
	elif C <= 5.4e-115:
		tmp = (180.0 / math.pi) * math.atan(-1.0)
	elif (C <= 3.8e-56) or not (C <= 62000000.0):
		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
	else:
		tmp = t_1
	return tmp
function code(A, B, C)
	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi))
	t_1 = Float64(Float64(180.0 / pi) * atan(1.0))
	tmp = 0.0
	if (C <= -3800.0)
		tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi);
	elseif (C <= -4.1e-275)
		tmp = t_0;
	elseif (C <= 1.3e-272)
		tmp = t_1;
	elseif (C <= 9.5e-168)
		tmp = t_0;
	elseif (C <= 5.4e-115)
		tmp = Float64(Float64(180.0 / pi) * atan(-1.0));
	elseif ((C <= 3.8e-56) || !(C <= 62000000.0))
		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan(((B * 0.5) / A)) / pi);
	t_1 = (180.0 / pi) * atan(1.0);
	tmp = 0.0;
	if (C <= -3800.0)
		tmp = (180.0 * atan((C / B))) / pi;
	elseif (C <= -4.1e-275)
		tmp = t_0;
	elseif (C <= 1.3e-272)
		tmp = t_1;
	elseif (C <= 9.5e-168)
		tmp = t_0;
	elseif (C <= 5.4e-115)
		tmp = (180.0 / pi) * atan(-1.0);
	elseif ((C <= 3.8e-56) || ~((C <= 62000000.0)))
		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3800.0], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -4.1e-275], t$95$0, If[LessEqual[C, 1.3e-272], t$95$1, If[LessEqual[C, 9.5e-168], t$95$0, If[LessEqual[C, 5.4e-115], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 3.8e-56], N[Not[LessEqual[C, 62000000.0]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;C \leq -4.1 \cdot 10^{-275}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;C \leq 1.3 \cdot 10^{-272}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;C \leq 3.8 \cdot 10^{-56} \lor \neg \left(C \leq 62000000\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\

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


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

    1. Initial program 85.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/85.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. unpow285.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3800 < C < -4.09999999999999975e-275 or 1.29999999999999996e-272 < C < 9.49999999999999918e-168

    1. Initial program 53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.09999999999999975e-275 < C < 1.29999999999999996e-272 or 3.8000000000000002e-56 < C < 6.2e7

    1. Initial program 54.1%

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

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

    if 9.49999999999999918e-168 < C < 5.4e-115

    1. Initial program 32.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/32.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/32.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. *-commutative32.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. Simplified100.0%

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

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

    if 5.4e-115 < C < 3.8000000000000002e-56 or 6.2e7 < C

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -3800:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -4.1 \cdot 10^{-275}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.3 \cdot 10^{-272}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;C \leq 9.5 \cdot 10^{-168}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq 5.4 \cdot 10^{-115}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 3.8 \cdot 10^{-56} \lor \neg \left(C \leq 62000000\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \end{array} \]

Alternative 5: 48.4% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{if}\;C \leq -2550:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -3.1 \cdot 10^{-275}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 5.2 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 10^{-168}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 3.2 \cdot 10^{-115}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 1.52 \cdot 10^{-55} \lor \neg \left(C \leq 4500\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))))
        (t_1 (* (/ 180.0 PI) (atan 1.0))))
   (if (<= C -2550.0)
     (/ (* 180.0 (atan (/ C B))) PI)
     (if (<= C -3.1e-275)
       t_0
       (if (<= C 5.2e-272)
         t_1
         (if (<= C 1e-168)
           t_0
           (if (<= C 3.2e-115)
             (* (/ 180.0 PI) (atan -1.0))
             (if (or (<= C 1.52e-55) (not (<= C 4500.0)))
               (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
               t_1))))))))
double code(double A, double B, double C) {
	double t_0 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
	double t_1 = (180.0 / ((double) M_PI)) * atan(1.0);
	double tmp;
	if (C <= -2550.0) {
		tmp = (180.0 * atan((C / B))) / ((double) M_PI);
	} else if (C <= -3.1e-275) {
		tmp = t_0;
	} else if (C <= 5.2e-272) {
		tmp = t_1;
	} else if (C <= 1e-168) {
		tmp = t_0;
	} else if (C <= 3.2e-115) {
		tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
	} else if ((C <= 1.52e-55) || !(C <= 4500.0)) {
		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
	double t_1 = (180.0 / Math.PI) * Math.atan(1.0);
	double tmp;
	if (C <= -2550.0) {
		tmp = (180.0 * Math.atan((C / B))) / Math.PI;
	} else if (C <= -3.1e-275) {
		tmp = t_0;
	} else if (C <= 5.2e-272) {
		tmp = t_1;
	} else if (C <= 1e-168) {
		tmp = t_0;
	} else if (C <= 3.2e-115) {
		tmp = (180.0 / Math.PI) * Math.atan(-1.0);
	} else if ((C <= 1.52e-55) || !(C <= 4500.0)) {
		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(A, B, C):
	t_0 = (180.0 / math.pi) * math.atan((0.5 * (B / A)))
	t_1 = (180.0 / math.pi) * math.atan(1.0)
	tmp = 0
	if C <= -2550.0:
		tmp = (180.0 * math.atan((C / B))) / math.pi
	elif C <= -3.1e-275:
		tmp = t_0
	elif C <= 5.2e-272:
		tmp = t_1
	elif C <= 1e-168:
		tmp = t_0
	elif C <= 3.2e-115:
		tmp = (180.0 / math.pi) * math.atan(-1.0)
	elif (C <= 1.52e-55) or not (C <= 4500.0):
		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
	else:
		tmp = t_1
	return tmp
function code(A, B, C)
	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A))))
	t_1 = Float64(Float64(180.0 / pi) * atan(1.0))
	tmp = 0.0
	if (C <= -2550.0)
		tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi);
	elseif (C <= -3.1e-275)
		tmp = t_0;
	elseif (C <= 5.2e-272)
		tmp = t_1;
	elseif (C <= 1e-168)
		tmp = t_0;
	elseif (C <= 3.2e-115)
		tmp = Float64(Float64(180.0 / pi) * atan(-1.0));
	elseif ((C <= 1.52e-55) || !(C <= 4500.0))
		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = (180.0 / pi) * atan((0.5 * (B / A)));
	t_1 = (180.0 / pi) * atan(1.0);
	tmp = 0.0;
	if (C <= -2550.0)
		tmp = (180.0 * atan((C / B))) / pi;
	elseif (C <= -3.1e-275)
		tmp = t_0;
	elseif (C <= 5.2e-272)
		tmp = t_1;
	elseif (C <= 1e-168)
		tmp = t_0;
	elseif (C <= 3.2e-115)
		tmp = (180.0 / pi) * atan(-1.0);
	elseif ((C <= 1.52e-55) || ~((C <= 4500.0)))
		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2550.0], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -3.1e-275], t$95$0, If[LessEqual[C, 5.2e-272], t$95$1, If[LessEqual[C, 1e-168], t$95$0, If[LessEqual[C, 3.2e-115], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 1.52e-55], N[Not[LessEqual[C, 4500.0]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;C \leq -3.1 \cdot 10^{-275}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;C \leq 5.2 \cdot 10^{-272}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;C \leq 1.52 \cdot 10^{-55} \lor \neg \left(C \leq 4500\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\

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


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

    1. Initial program 85.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/85.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. unpow285.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2550 < C < -3.1e-275 or 5.19999999999999983e-272 < C < 1e-168

    1. Initial program 53.4%

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

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

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

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

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

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

    if -3.1e-275 < C < 5.19999999999999983e-272 or 1.5200000000000001e-55 < C < 4500

    1. Initial program 54.1%

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

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

    if 1e-168 < C < 3.2e-115

    1. Initial program 32.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/32.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/32.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. *-commutative32.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. Simplified100.0%

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

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

    if 3.2e-115 < C < 1.5200000000000001e-55 or 4500 < C

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -2550:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -3.1 \cdot 10^{-275}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 5.2 \cdot 10^{-272}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;C \leq 10^{-168}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 3.2 \cdot 10^{-115}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 1.52 \cdot 10^{-55} \lor \neg \left(C \leq 4500\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \end{array} \]

Alternative 6: 48.3% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{if}\;C \leq -3500:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -3.7 \cdot 10^{-275}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1.12 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 8.5 \cdot 10^{-172}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1.9 \cdot 10^{-115}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 5.2 \cdot 10^{-56} \lor \neg \left(C \leq 1400000\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))))
        (t_1 (* (/ 180.0 PI) (atan 1.0))))
   (if (<= C -3500.0)
     (/ (* 180.0 (atan (/ C B))) PI)
     (if (<= C -3.7e-275)
       t_0
       (if (<= C 1.12e-272)
         t_1
         (if (<= C 8.5e-172)
           t_0
           (if (<= C 1.9e-115)
             (* (/ 180.0 PI) (atan -1.0))
             (if (or (<= C 5.2e-56) (not (<= C 1400000.0)))
               (* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
               t_1))))))))
double code(double A, double B, double C) {
	double t_0 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
	double t_1 = (180.0 / ((double) M_PI)) * atan(1.0);
	double tmp;
	if (C <= -3500.0) {
		tmp = (180.0 * atan((C / B))) / ((double) M_PI);
	} else if (C <= -3.7e-275) {
		tmp = t_0;
	} else if (C <= 1.12e-272) {
		tmp = t_1;
	} else if (C <= 8.5e-172) {
		tmp = t_0;
	} else if (C <= 1.9e-115) {
		tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
	} else if ((C <= 5.2e-56) || !(C <= 1400000.0)) {
		tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
	double t_1 = (180.0 / Math.PI) * Math.atan(1.0);
	double tmp;
	if (C <= -3500.0) {
		tmp = (180.0 * Math.atan((C / B))) / Math.PI;
	} else if (C <= -3.7e-275) {
		tmp = t_0;
	} else if (C <= 1.12e-272) {
		tmp = t_1;
	} else if (C <= 8.5e-172) {
		tmp = t_0;
	} else if (C <= 1.9e-115) {
		tmp = (180.0 / Math.PI) * Math.atan(-1.0);
	} else if ((C <= 5.2e-56) || !(C <= 1400000.0)) {
		tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(A, B, C):
	t_0 = (180.0 / math.pi) * math.atan((0.5 * (B / A)))
	t_1 = (180.0 / math.pi) * math.atan(1.0)
	tmp = 0
	if C <= -3500.0:
		tmp = (180.0 * math.atan((C / B))) / math.pi
	elif C <= -3.7e-275:
		tmp = t_0
	elif C <= 1.12e-272:
		tmp = t_1
	elif C <= 8.5e-172:
		tmp = t_0
	elif C <= 1.9e-115:
		tmp = (180.0 / math.pi) * math.atan(-1.0)
	elif (C <= 5.2e-56) or not (C <= 1400000.0):
		tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C))
	else:
		tmp = t_1
	return tmp
function code(A, B, C)
	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A))))
	t_1 = Float64(Float64(180.0 / pi) * atan(1.0))
	tmp = 0.0
	if (C <= -3500.0)
		tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi);
	elseif (C <= -3.7e-275)
		tmp = t_0;
	elseif (C <= 1.12e-272)
		tmp = t_1;
	elseif (C <= 8.5e-172)
		tmp = t_0;
	elseif (C <= 1.9e-115)
		tmp = Float64(Float64(180.0 / pi) * atan(-1.0));
	elseif ((C <= 5.2e-56) || !(C <= 1400000.0))
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = (180.0 / pi) * atan((0.5 * (B / A)));
	t_1 = (180.0 / pi) * atan(1.0);
	tmp = 0.0;
	if (C <= -3500.0)
		tmp = (180.0 * atan((C / B))) / pi;
	elseif (C <= -3.7e-275)
		tmp = t_0;
	elseif (C <= 1.12e-272)
		tmp = t_1;
	elseif (C <= 8.5e-172)
		tmp = t_0;
	elseif (C <= 1.9e-115)
		tmp = (180.0 / pi) * atan(-1.0);
	elseif ((C <= 5.2e-56) || ~((C <= 1400000.0)))
		tmp = (180.0 / pi) * atan(((B * -0.5) / C));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3500.0], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -3.7e-275], t$95$0, If[LessEqual[C, 1.12e-272], t$95$1, If[LessEqual[C, 8.5e-172], t$95$0, If[LessEqual[C, 1.9e-115], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 5.2e-56], N[Not[LessEqual[C, 1400000.0]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;C \leq -3.7 \cdot 10^{-275}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;C \leq 1.12 \cdot 10^{-272}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;C \leq 8.5 \cdot 10^{-172}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;C \leq 5.2 \cdot 10^{-56} \lor \neg \left(C \leq 1400000\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\

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


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

    1. Initial program 85.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/85.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. unpow285.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3500 < C < -3.69999999999999971e-275 or 1.11999999999999994e-272 < C < 8.49999999999999963e-172

    1. Initial program 53.4%

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

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

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

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

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

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

    if -3.69999999999999971e-275 < C < 1.11999999999999994e-272 or 5.19999999999999994e-56 < C < 1.4e6

    1. Initial program 54.1%

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

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

    if 8.49999999999999963e-172 < C < 1.89999999999999996e-115

    1. Initial program 32.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/32.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/32.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. *-commutative32.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. Simplified100.0%

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

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

    if 1.89999999999999996e-115 < C < 5.19999999999999994e-56 or 1.4e6 < C

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -3500:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -3.7 \cdot 10^{-275}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 1.12 \cdot 10^{-272}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;C \leq 8.5 \cdot 10^{-172}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 1.9 \cdot 10^{-115}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 5.2 \cdot 10^{-56} \lor \neg \left(C \leq 1400000\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \end{array} \]

Alternative 7: 48.5% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{if}\;C \leq -2400:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;C \leq -4.5 \cdot 10^{-275}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 2.8 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 6.2 \cdot 10^{-172}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 4.8 \cdot 10^{-116}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 2.7 \cdot 10^{-55} \lor \neg \left(C \leq 700\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))))
        (t_1 (* (/ 180.0 PI) (atan 1.0))))
   (if (<= C -2400.0)
     (* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
     (if (<= C -4.5e-275)
       t_0
       (if (<= C 2.8e-272)
         t_1
         (if (<= C 6.2e-172)
           t_0
           (if (<= C 4.8e-116)
             (* (/ 180.0 PI) (atan -1.0))
             (if (or (<= C 2.7e-55) (not (<= C 700.0)))
               (* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
               t_1))))))))
double code(double A, double B, double C) {
	double t_0 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
	double t_1 = (180.0 / ((double) M_PI)) * atan(1.0);
	double tmp;
	if (C <= -2400.0) {
		tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
	} else if (C <= -4.5e-275) {
		tmp = t_0;
	} else if (C <= 2.8e-272) {
		tmp = t_1;
	} else if (C <= 6.2e-172) {
		tmp = t_0;
	} else if (C <= 4.8e-116) {
		tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
	} else if ((C <= 2.7e-55) || !(C <= 700.0)) {
		tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
	double t_1 = (180.0 / Math.PI) * Math.atan(1.0);
	double tmp;
	if (C <= -2400.0) {
		tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
	} else if (C <= -4.5e-275) {
		tmp = t_0;
	} else if (C <= 2.8e-272) {
		tmp = t_1;
	} else if (C <= 6.2e-172) {
		tmp = t_0;
	} else if (C <= 4.8e-116) {
		tmp = (180.0 / Math.PI) * Math.atan(-1.0);
	} else if ((C <= 2.7e-55) || !(C <= 700.0)) {
		tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(A, B, C):
	t_0 = (180.0 / math.pi) * math.atan((0.5 * (B / A)))
	t_1 = (180.0 / math.pi) * math.atan(1.0)
	tmp = 0
	if C <= -2400.0:
		tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B))
	elif C <= -4.5e-275:
		tmp = t_0
	elif C <= 2.8e-272:
		tmp = t_1
	elif C <= 6.2e-172:
		tmp = t_0
	elif C <= 4.8e-116:
		tmp = (180.0 / math.pi) * math.atan(-1.0)
	elif (C <= 2.7e-55) or not (C <= 700.0):
		tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C))
	else:
		tmp = t_1
	return tmp
function code(A, B, C)
	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A))))
	t_1 = Float64(Float64(180.0 / pi) * atan(1.0))
	tmp = 0.0
	if (C <= -2400.0)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B)));
	elseif (C <= -4.5e-275)
		tmp = t_0;
	elseif (C <= 2.8e-272)
		tmp = t_1;
	elseif (C <= 6.2e-172)
		tmp = t_0;
	elseif (C <= 4.8e-116)
		tmp = Float64(Float64(180.0 / pi) * atan(-1.0));
	elseif ((C <= 2.7e-55) || !(C <= 700.0))
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = (180.0 / pi) * atan((0.5 * (B / A)));
	t_1 = (180.0 / pi) * atan(1.0);
	tmp = 0.0;
	if (C <= -2400.0)
		tmp = (180.0 / pi) * atan(((C * 2.0) / B));
	elseif (C <= -4.5e-275)
		tmp = t_0;
	elseif (C <= 2.8e-272)
		tmp = t_1;
	elseif (C <= 6.2e-172)
		tmp = t_0;
	elseif (C <= 4.8e-116)
		tmp = (180.0 / pi) * atan(-1.0);
	elseif ((C <= 2.7e-55) || ~((C <= 700.0)))
		tmp = (180.0 / pi) * atan(((B * -0.5) / C));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2400.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.5e-275], t$95$0, If[LessEqual[C, 2.8e-272], t$95$1, If[LessEqual[C, 6.2e-172], t$95$0, If[LessEqual[C, 4.8e-116], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 2.7e-55], N[Not[LessEqual[C, 700.0]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;C \leq -4.5 \cdot 10^{-275}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;C \leq 2.8 \cdot 10^{-272}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;C \leq 6.2 \cdot 10^{-172}:\\
\;\;\;\;t_0\\

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

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

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


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

    1. Initial program 85.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/85.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/85.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. *-commutative85.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. Simplified98.2%

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

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

    if -2400 < C < -4.49999999999999978e-275 or 2.79999999999999994e-272 < C < 6.2000000000000005e-172

    1. Initial program 53.4%

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

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

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

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

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

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

    if -4.49999999999999978e-275 < C < 2.79999999999999994e-272 or 2.70000000000000004e-55 < C < 700

    1. Initial program 54.1%

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

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

    if 6.2000000000000005e-172 < C < 4.79999999999999986e-116

    1. Initial program 32.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/32.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/32.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. *-commutative32.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. Simplified100.0%

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

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

    if 4.79999999999999986e-116 < C < 2.70000000000000004e-55 or 700 < C

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -2400:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\ \mathbf{elif}\;C \leq -4.5 \cdot 10^{-275}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 2.8 \cdot 10^{-272}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;C \leq 6.2 \cdot 10^{-172}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 4.8 \cdot 10^{-116}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 2.7 \cdot 10^{-55} \lor \neg \left(C \leq 700\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \end{array} \]

Alternative 8: 51.9% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{if}\;C \leq -1.65 \cdot 10^{-64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq -6.2 \cdot 10^{-251}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 1.6 \cdot 10^{-271}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 1.1 \cdot 10^{-171}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 3.8 \cdot 10^{-116}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 4.8 \cdot 10^{-56} \lor \neg \left(C \leq 700\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))))
        (t_1 (/ (* 180.0 (atan (/ (+ B C) B))) PI)))
   (if (<= C -1.65e-64)
     t_1
     (if (<= C -6.2e-251)
       t_0
       (if (<= C 1.6e-271)
         t_1
         (if (<= C 1.1e-171)
           t_0
           (if (<= C 3.8e-116)
             (* (/ 180.0 PI) (atan -1.0))
             (if (or (<= C 4.8e-56) (not (<= C 700.0)))
               (* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
               (* (/ 180.0 PI) (atan 1.0))))))))))
double code(double A, double B, double C) {
	double t_0 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
	double t_1 = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
	double tmp;
	if (C <= -1.65e-64) {
		tmp = t_1;
	} else if (C <= -6.2e-251) {
		tmp = t_0;
	} else if (C <= 1.6e-271) {
		tmp = t_1;
	} else if (C <= 1.1e-171) {
		tmp = t_0;
	} else if (C <= 3.8e-116) {
		tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
	} else if ((C <= 4.8e-56) || !(C <= 700.0)) {
		tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
	double t_1 = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
	double tmp;
	if (C <= -1.65e-64) {
		tmp = t_1;
	} else if (C <= -6.2e-251) {
		tmp = t_0;
	} else if (C <= 1.6e-271) {
		tmp = t_1;
	} else if (C <= 1.1e-171) {
		tmp = t_0;
	} else if (C <= 3.8e-116) {
		tmp = (180.0 / Math.PI) * Math.atan(-1.0);
	} else if ((C <= 4.8e-56) || !(C <= 700.0)) {
		tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(1.0);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = (180.0 / math.pi) * math.atan((0.5 * (B / A)))
	t_1 = (180.0 * math.atan(((B + C) / B))) / math.pi
	tmp = 0
	if C <= -1.65e-64:
		tmp = t_1
	elif C <= -6.2e-251:
		tmp = t_0
	elif C <= 1.6e-271:
		tmp = t_1
	elif C <= 1.1e-171:
		tmp = t_0
	elif C <= 3.8e-116:
		tmp = (180.0 / math.pi) * math.atan(-1.0)
	elif (C <= 4.8e-56) or not (C <= 700.0):
		tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C))
	else:
		tmp = (180.0 / math.pi) * math.atan(1.0)
	return tmp
function code(A, B, C)
	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A))))
	t_1 = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi)
	tmp = 0.0
	if (C <= -1.65e-64)
		tmp = t_1;
	elseif (C <= -6.2e-251)
		tmp = t_0;
	elseif (C <= 1.6e-271)
		tmp = t_1;
	elseif (C <= 1.1e-171)
		tmp = t_0;
	elseif (C <= 3.8e-116)
		tmp = Float64(Float64(180.0 / pi) * atan(-1.0));
	elseif ((C <= 4.8e-56) || !(C <= 700.0))
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C)));
	else
		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = (180.0 / pi) * atan((0.5 * (B / A)));
	t_1 = (180.0 * atan(((B + C) / B))) / pi;
	tmp = 0.0;
	if (C <= -1.65e-64)
		tmp = t_1;
	elseif (C <= -6.2e-251)
		tmp = t_0;
	elseif (C <= 1.6e-271)
		tmp = t_1;
	elseif (C <= 1.1e-171)
		tmp = t_0;
	elseif (C <= 3.8e-116)
		tmp = (180.0 / pi) * atan(-1.0);
	elseif ((C <= 4.8e-56) || ~((C <= 700.0)))
		tmp = (180.0 / pi) * atan(((B * -0.5) / C));
	else
		tmp = (180.0 / pi) * atan(1.0);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[C, -1.65e-64], t$95$1, If[LessEqual[C, -6.2e-251], t$95$0, If[LessEqual[C, 1.6e-271], t$95$1, If[LessEqual[C, 1.1e-171], t$95$0, If[LessEqual[C, 3.8e-116], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 4.8e-56], N[Not[LessEqual[C, 700.0]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $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} \left(0.5 \cdot \frac{B}{A}\right)\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.65 \cdot 10^{-64}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;C \leq -6.2 \cdot 10^{-251}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;C \leq 1.6 \cdot 10^{-271}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;C \leq 4.8 \cdot 10^{-56} \lor \neg \left(C \leq 700\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if C < -1.65e-64 or -6.20000000000000006e-251 < C < 1.59999999999999989e-271

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65e-64 < C < -6.20000000000000006e-251 or 1.59999999999999989e-271 < C < 1.1000000000000001e-171

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

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

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

    if 1.1000000000000001e-171 < C < 3.8000000000000001e-116

    1. Initial program 32.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/32.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/32.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. *-commutative32.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. Simplified100.0%

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

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

    if 3.8000000000000001e-116 < C < 4.80000000000000001e-56 or 700 < C

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

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

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

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

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

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

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

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

    if 4.80000000000000001e-56 < C < 700

    1. Initial program 38.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/38.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/38.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. *-commutative38.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. Simplified86.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.65 \cdot 10^{-64}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -6.2 \cdot 10^{-251}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 1.6 \cdot 10^{-271}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.1 \cdot 10^{-171}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 3.8 \cdot 10^{-116}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{elif}\;C \leq 4.8 \cdot 10^{-56} \lor \neg \left(C \leq 700\right):\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \end{array} \]

Alternative 9: 62.2% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1.28 \cdot 10^{-54}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9.6 \cdot 10^{-301} \lor \neg \left(B \leq 4.4 \cdot 10^{-163}\right) \land B \leq 4.5 \cdot 10^{-101}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= B -1.28e-54)
   (/ (* 180.0 (atan (/ (+ B C) B))) PI)
   (if (or (<= B 9.6e-301) (and (not (<= B 4.4e-163)) (<= B 4.5e-101)))
     (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
     (* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))))
double code(double A, double B, double C) {
	double tmp;
	if (B <= -1.28e-54) {
		tmp = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
	} else if ((B <= 9.6e-301) || (!(B <= 4.4e-163) && (B <= 4.5e-101))) {
		tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (B <= -1.28e-54) {
		tmp = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
	} else if ((B <= 9.6e-301) || (!(B <= 4.4e-163) && (B <= 4.5e-101))) {
		tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if B <= -1.28e-54:
		tmp = (180.0 * math.atan(((B + C) / B))) / math.pi
	elif (B <= 9.6e-301) or (not (B <= 4.4e-163) and (B <= 4.5e-101)):
		tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A)))
	else:
		tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B))
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (B <= -1.28e-54)
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi);
	elseif ((B <= 9.6e-301) || (!(B <= 4.4e-163) && (B <= 4.5e-101)))
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A))));
	else
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B)));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (B <= -1.28e-54)
		tmp = (180.0 * atan(((B + C) / B))) / pi;
	elseif ((B <= 9.6e-301) || (~((B <= 4.4e-163)) && (B <= 4.5e-101)))
		tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A)));
	else
		tmp = (180.0 / pi) * atan(((C - (B + A)) / B));
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[B, -1.28e-54], N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[B, 9.6e-301], And[N[Not[LessEqual[B, 4.4e-163]], $MachinePrecision], LessEqual[B, 4.5e-101]]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;B \leq 9.6 \cdot 10^{-301} \lor \neg \left(B \leq 4.4 \cdot 10^{-163}\right) \land B \leq 4.5 \cdot 10^{-101}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\

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


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

    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. unpow257.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2800000000000001e-54 < B < 9.59999999999999964e-301 or 4.40000000000000022e-163 < B < 4.4999999999999998e-101

    1. Initial program 45.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/45.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/45.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. *-commutative45.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. Simplified62.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 66.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/66.3%

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

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

    if 9.59999999999999964e-301 < B < 4.40000000000000022e-163 or 4.4999999999999998e-101 < B

    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. associate-*l/55.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-identity55.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-neg55.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-55.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.28 \cdot 10^{-54}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9.6 \cdot 10^{-301} \lor \neg \left(B \leq 4.4 \cdot 10^{-163}\right) \land B \leq 4.5 \cdot 10^{-101}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \end{array} \]

Alternative 10: 64.3% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -5 \cdot 10^{-53}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)\\ \mathbf{elif}\;B \leq 9.2 \cdot 10^{-297} \lor \neg \left(B \leq 1.05 \cdot 10^{-162}\right) \land B \leq 2.7 \cdot 10^{-103}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= B -5e-53)
   (* (/ 180.0 PI) (atan (/ (+ C (- B A)) B)))
   (if (or (<= B 9.2e-297) (and (not (<= B 1.05e-162)) (<= B 2.7e-103)))
     (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
     (* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))))
double code(double A, double B, double C) {
	double tmp;
	if (B <= -5e-53) {
		tmp = (180.0 / ((double) M_PI)) * atan(((C + (B - A)) / B));
	} else if ((B <= 9.2e-297) || (!(B <= 1.05e-162) && (B <= 2.7e-103))) {
		tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (B <= -5e-53) {
		tmp = (180.0 / Math.PI) * Math.atan(((C + (B - A)) / B));
	} else if ((B <= 9.2e-297) || (!(B <= 1.05e-162) && (B <= 2.7e-103))) {
		tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if B <= -5e-53:
		tmp = (180.0 / math.pi) * math.atan(((C + (B - A)) / B))
	elif (B <= 9.2e-297) or (not (B <= 1.05e-162) and (B <= 2.7e-103)):
		tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A)))
	else:
		tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B))
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (B <= -5e-53)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B - A)) / B)));
	elseif ((B <= 9.2e-297) || (!(B <= 1.05e-162) && (B <= 2.7e-103)))
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A))));
	else
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B)));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (B <= -5e-53)
		tmp = (180.0 / pi) * atan(((C + (B - A)) / B));
	elseif ((B <= 9.2e-297) || (~((B <= 1.05e-162)) && (B <= 2.7e-103)))
		tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A)));
	else
		tmp = (180.0 / pi) * atan(((C - (B + A)) / B));
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[B, -5e-53], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 9.2e-297], And[N[Not[LessEqual[B, 1.05e-162]], $MachinePrecision], LessEqual[B, 2.7e-103]]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;B \leq 9.2 \cdot 10^{-297} \lor \neg \left(B \leq 1.05 \cdot 10^{-162}\right) \land B \leq 2.7 \cdot 10^{-103}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\

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


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

    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-def82.6%

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

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

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

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

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

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

    if -5e-53 < B < 9.1999999999999996e-297 or 1.05e-162 < B < 2.7000000000000001e-103

    1. Initial program 45.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/45.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/45.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. *-commutative45.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. Simplified62.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 66.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/66.3%

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

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

    if 9.1999999999999996e-297 < B < 1.05e-162 or 2.7000000000000001e-103 < B

    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. associate-*l/55.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-identity55.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-neg55.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-55.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5 \cdot 10^{-53}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)\\ \mathbf{elif}\;B \leq 9.2 \cdot 10^{-297} \lor \neg \left(B \leq 1.05 \cdot 10^{-162}\right) \land B \leq 2.7 \cdot 10^{-103}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \end{array} \]

Alternative 11: 56.4% accurate, 2.4× speedup?

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65e-64 < C < -5.39999999999999987e-275

    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. *-commutative54.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. Simplified64.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 A around -inf 49.8%

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

    if -5.39999999999999987e-275 < C < 2.15e-271

    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. unpow266.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.15e-271 < C

    1. Initial program 30.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/30.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.65 \cdot 10^{-64}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -5.4 \cdot 10^{-275}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 2.15 \cdot 10^{-271}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\ \end{array} \]

Alternative 12: 56.4% accurate, 2.4× speedup?

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.10000000000000011e-64 < C < -7.59999999999999943e-275

    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. *-commutative54.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. Simplified64.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 A around -inf 49.8%

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

    if -7.59999999999999943e-275 < C < 2.15e-271

    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. unpow266.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.15e-271 < C

    1. Initial program 30.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/30.6%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -2.1 \cdot 10^{-64}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -7.6 \cdot 10^{-275}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 2.15 \cdot 10^{-271}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{\pi}\\ \end{array} \]

Alternative 13: 56.5% accurate, 2.4× speedup?

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.69999999999999986e-64 < C < -5.800000000000001e-275

    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. *-commutative54.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. Simplified64.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 A around -inf 49.8%

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

    if -5.800000000000001e-275 < C < 2.15e-271

    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. unpow266.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.15e-271 < C

    1. Initial program 30.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/30.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -2.7 \cdot 10^{-64}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -5.8 \cdot 10^{-275}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;C \leq 2.15 \cdot 10^{-271}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \end{array} \]

Alternative 14: 47.4% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;B \leq -4 \cdot 10^{-292}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;B \leq 4.2 \cdot 10^{-69}:\\
\;\;\;\;t_0\\

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


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

    1. Initial program 54.2%

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

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

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

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

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

    if -7.5e-35 < B < -4.0000000000000002e-292 or 5.3e-289 < B < 4.1999999999999999e-69

    1. Initial program 58.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/58.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. unpow258.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000002e-292 < B < 5.3e-289

    1. Initial program 46.9%

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

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

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

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

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

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

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

    if 4.1999999999999999e-69 < B

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -7.5 \cdot 10^{-35}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -4 \cdot 10^{-292}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.3 \cdot 10^{-289}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\ \mathbf{elif}\;B \leq 4.2 \cdot 10^{-69}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]

Alternative 15: 57.1% accurate, 2.4× speedup?

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4999999999999999e-64 < C < -7.59999999999999943e-275

    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. *-commutative54.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. Simplified64.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 A around -inf 49.8%

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

    if -7.59999999999999943e-275 < C < 4e4

    1. Initial program 47.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4e4 < C

    1. Initial program 23.2%

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

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

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

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

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

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

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

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

Alternative 16: 48.0% accurate, 2.4× speedup?

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

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

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

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


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

    1. Initial program 84.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/84.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. unpow284.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7499999999999999e-18 < C < 8.3999999999999996e-116

    1. Initial program 53.7%

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

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

    if 8.3999999999999996e-116 < C

    1. Initial program 28.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/28.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/28.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. *-commutative28.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. Simplified58.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 49.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.75 \cdot 10^{-18}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 8.4 \cdot 10^{-116}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]

Alternative 17: 44.5% accurate, 2.5× speedup?

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

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

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

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


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

    1. Initial program 56.6%

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

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

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

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

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

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

    if -1.8e-60 < B < 1.1999999999999999e-135

    1. Initial program 54.1%

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

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

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

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

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

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

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

    if 1.1999999999999999e-135 < B

    1. Initial program 50.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/50.1%

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

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

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

Alternative 18: 39.9% accurate, 2.5× speedup?

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

    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. Simplified74.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.44999999999999992e-301 < B

    1. Initial program 51.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/51.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/51.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. *-commutative51.1%

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

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

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

Alternative 19: 21.0% 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 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. Simplified75.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 22.5%

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

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

Reproduce

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