ABCF->ab-angle angle

Percentage Accurate: 53.4% → 80.4%
Time: 17.5s
Alternatives: 22
Speedup: 3.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 53.4% accurate, 1.0× speedup?

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

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

Alternative 1: 80.4% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 63.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/83.8%

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

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

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

    if 2.69999999999999984e45 < C

    1. Initial program 15.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/45.3%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 76.7% accurate, 1.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \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.35e25

    1. Initial program 75.5%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/91.6%

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

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

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

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

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

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

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

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

    if -1.35e25 < C < 4.29999999999999978e48

    1. Initial program 57.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/80.1%

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

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

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

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

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

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

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

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

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

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

    if 4.29999999999999978e48 < C

    1. Initial program 15.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/45.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.35 \cdot 10^{+25}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.3 \cdot 10^{+48}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 76.5% accurate, 1.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \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.45e26

    1. Initial program 75.5%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/91.6%

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

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

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

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

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

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

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

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

    if -1.45e26 < C < 3.50000000000000002e38

    1. Initial program 57.1%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Taylor expanded in C around 0 55.9%

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

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

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

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

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

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

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

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

    if 3.50000000000000002e38 < C

    1. Initial program 15.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/45.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.45 \cdot 10^{+26}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 3.5 \cdot 10^{+38}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 75.6% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 20.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. Add Preprocessing
    3. Taylor expanded in A around -inf 83.2%

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

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

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

    if -1.60000000000000013e92 < A < 5.9999999999999998e-30

    1. Initial program 52.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/75.0%

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

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

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

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

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

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

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

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

    if 5.9999999999999998e-30 < A

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.6 \cdot 10^{+92}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 6 \cdot 10^{-30}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 75.6% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 20.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. Add Preprocessing
    3. Taylor expanded in A around -inf 83.2%

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

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

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

    if -3.29999999999999974e92 < A < 1.24999999999999993e-30

    1. Initial program 52.1%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Taylor expanded in A around 0 49.8%

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

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

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

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

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

    if 1.24999999999999993e-30 < A

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.3 \cdot 10^{+92}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.25 \cdot 10^{-30}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 80.4% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

    if 4.3999999999999999e48 < C

    1. Initial program 15.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/45.3%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 81.1% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 20.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. Add Preprocessing
    3. Taylor expanded in A around -inf 83.2%

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

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

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

    if -3.29999999999999974e92 < A

    1. Initial program 62.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. Simplified82.2%

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

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

    Alternative 8: 48.7% accurate, 3.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -1.45 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -3 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -7.4 \cdot 10^{-232}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 7 \cdot 10^{-110}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (if (<= A -1.45e-9)
       (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
       (if (<= A -3e-83)
         (* 180.0 (/ (atan -1.0) PI))
         (if (<= A -7.4e-232)
           (* 180.0 (/ (atan 1.0) PI))
           (if (<= A 7e-110)
             (/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)
             (* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -1.45e-9) {
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
    	} else if (A <= -3e-83) {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	} else if (A <= -7.4e-232) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (A <= 7e-110) {
    		tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
    	} else {
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -1.45e-9) {
    		tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
    	} else if (A <= -3e-83) {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	} else if (A <= -7.4e-232) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (A <= 7e-110) {
    		tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
    	} else {
    		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	tmp = 0
    	if A <= -1.45e-9:
    		tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
    	elif A <= -3e-83:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	elif A <= -7.4e-232:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif A <= 7e-110:
    		tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi
    	else:
    		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	tmp = 0.0
    	if (A <= -1.45e-9)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi));
    	elseif (A <= -3e-83)
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	elseif (A <= -7.4e-232)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (A <= 7e-110)
    		tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi);
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	tmp = 0.0;
    	if (A <= -1.45e-9)
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / pi);
    	elseif (A <= -3e-83)
    		tmp = 180.0 * (atan(-1.0) / pi);
    	elseif (A <= -7.4e-232)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (A <= 7e-110)
    		tmp = (180.0 * atan((-0.5 * (B / C)))) / pi;
    	else
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[A, -1.45e-9], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3e-83], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7.4e-232], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7e-110], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;A \leq -1.45 \cdot 10^{-9}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -3 \cdot 10^{-83}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    \mathbf{elif}\;A \leq -7.4 \cdot 10^{-232}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;A \leq 7 \cdot 10^{-110}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if A < -1.44999999999999996e-9

      1. Initial program 27.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. Add Preprocessing
      3. Taylor expanded in A around -inf 69.6%

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

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

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

      if -1.44999999999999996e-9 < A < -3.0000000000000001e-83

      1. Initial program 63.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. Add Preprocessing
      3. Taylor expanded in B around inf 60.9%

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

      if -3.0000000000000001e-83 < A < -7.39999999999999958e-232

      1. Initial program 47.4%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in B around -inf 54.8%

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

      if -7.39999999999999958e-232 < A < 6.99999999999999947e-110

      1. Initial program 52.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/73.3%

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

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

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

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

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

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

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

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

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

      if 6.99999999999999947e-110 < A

      1. Initial program 80.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. Add Preprocessing
      3. Taylor expanded in A around inf 65.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.45 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -3 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -7.4 \cdot 10^{-232}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 7 \cdot 10^{-110}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 47.7% accurate, 3.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -1.5 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.95 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -2.8 \cdot 10^{-233}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 4 \cdot 10^{-150}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (if (<= A -1.5e-9)
       (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
       (if (<= A -2.95e-83)
         (* 180.0 (/ (atan -1.0) PI))
         (if (<= A -2.8e-233)
           (* 180.0 (/ (atan 1.0) PI))
           (if (<= A 4e-150)
             (* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
             (* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -1.5e-9) {
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
    	} else if (A <= -2.95e-83) {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	} else if (A <= -2.8e-233) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (A <= 4e-150) {
    		tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
    	} else {
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -1.5e-9) {
    		tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
    	} else if (A <= -2.95e-83) {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	} else if (A <= -2.8e-233) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (A <= 4e-150) {
    		tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
    	} else {
    		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	tmp = 0
    	if A <= -1.5e-9:
    		tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
    	elif A <= -2.95e-83:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	elif A <= -2.8e-233:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif A <= 4e-150:
    		tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi)
    	else:
    		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	tmp = 0.0
    	if (A <= -1.5e-9)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi));
    	elseif (A <= -2.95e-83)
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	elseif (A <= -2.8e-233)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (A <= 4e-150)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	tmp = 0.0;
    	if (A <= -1.5e-9)
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / pi);
    	elseif (A <= -2.95e-83)
    		tmp = 180.0 * (atan(-1.0) / pi);
    	elseif (A <= -2.8e-233)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (A <= 4e-150)
    		tmp = 180.0 * (atan(((C / B) * 2.0)) / pi);
    	else
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[A, -1.5e-9], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.95e-83], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.8e-233], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4e-150], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;A \leq -1.5 \cdot 10^{-9}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -2.95 \cdot 10^{-83}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    \mathbf{elif}\;A \leq -2.8 \cdot 10^{-233}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;A \leq 4 \cdot 10^{-150}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if A < -1.49999999999999999e-9

      1. Initial program 27.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. Add Preprocessing
      3. Taylor expanded in A around -inf 69.6%

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

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

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

      if -1.49999999999999999e-9 < A < -2.9499999999999998e-83

      1. Initial program 63.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. Add Preprocessing
      3. Taylor expanded in B around inf 60.9%

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

      if -2.9499999999999998e-83 < A < -2.8000000000000001e-233

      1. Initial program 46.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. Add Preprocessing
      3. Taylor expanded in B around -inf 53.3%

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

      if -2.8000000000000001e-233 < A < 4.00000000000000003e-150

      1. Initial program 57.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. Add Preprocessing
      3. Taylor expanded in C around -inf 36.8%

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

      if 4.00000000000000003e-150 < A

      1. Initial program 75.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. Add Preprocessing
      3. Taylor expanded in A around inf 59.1%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.5 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.95 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -2.8 \cdot 10^{-233}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 4 \cdot 10^{-150}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 61.8% accurate, 3.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{C - A}{B}\\ \mathbf{if}\;A \leq -3.2 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.75 \cdot 10^{-81}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.25 \cdot 10^{-61}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + 1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (/ (- C A) B)))
       (if (<= A -3.2e-9)
         (* 180.0 (/ (atan (/ (* 0.5 (+ B (* B (/ C A)))) A)) PI))
         (if (<= A -1.75e-81)
           (/ (* 180.0 (atan (/ (- C B) B))) PI)
           (if (<= A 1.25e-61)
             (/ (* 180.0 (atan (+ t_0 1.0))) PI)
             (/ (* 180.0 (atan (+ t_0 -1.0))) PI))))))
    double code(double A, double B, double C) {
    	double t_0 = (C - A) / B;
    	double tmp;
    	if (A <= -3.2e-9) {
    		tmp = 180.0 * (atan(((0.5 * (B + (B * (C / A)))) / A)) / ((double) M_PI));
    	} else if (A <= -1.75e-81) {
    		tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
    	} else if (A <= 1.25e-61) {
    		tmp = (180.0 * atan((t_0 + 1.0))) / ((double) M_PI);
    	} else {
    		tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = (C - A) / B;
    	double tmp;
    	if (A <= -3.2e-9) {
    		tmp = 180.0 * (Math.atan(((0.5 * (B + (B * (C / A)))) / A)) / Math.PI);
    	} else if (A <= -1.75e-81) {
    		tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
    	} else if (A <= 1.25e-61) {
    		tmp = (180.0 * Math.atan((t_0 + 1.0))) / Math.PI;
    	} else {
    		tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = (C - A) / B
    	tmp = 0
    	if A <= -3.2e-9:
    		tmp = 180.0 * (math.atan(((0.5 * (B + (B * (C / A)))) / A)) / math.pi)
    	elif A <= -1.75e-81:
    		tmp = (180.0 * math.atan(((C - B) / B))) / math.pi
    	elif A <= 1.25e-61:
    		tmp = (180.0 * math.atan((t_0 + 1.0))) / math.pi
    	else:
    		tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(Float64(C - A) / B)
    	tmp = 0.0
    	if (A <= -3.2e-9)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * Float64(B + Float64(B * Float64(C / A)))) / A)) / pi));
    	elseif (A <= -1.75e-81)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi);
    	elseif (A <= 1.25e-61)
    		tmp = Float64(Float64(180.0 * atan(Float64(t_0 + 1.0))) / pi);
    	else
    		tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi);
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = (C - A) / B;
    	tmp = 0.0;
    	if (A <= -3.2e-9)
    		tmp = 180.0 * (atan(((0.5 * (B + (B * (C / A)))) / A)) / pi);
    	elseif (A <= -1.75e-81)
    		tmp = (180.0 * atan(((C - B) / B))) / pi;
    	elseif (A <= 1.25e-61)
    		tmp = (180.0 * atan((t_0 + 1.0))) / pi;
    	else
    		tmp = (180.0 * atan((t_0 + -1.0))) / pi;
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[A, -3.2e-9], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.75e-81], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.25e-61], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{C - A}{B}\\
    \mathbf{if}\;A \leq -3.2 \cdot 10^{-9}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -1.75 \cdot 10^{-81}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq 1.25 \cdot 10^{-61}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if A < -3.20000000000000012e-9

      1. Initial program 27.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. Add Preprocessing
      3. Taylor expanded in A around -inf 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.20000000000000012e-9 < A < -1.74999999999999993e-81

      1. Initial program 72.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/100.0%

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

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

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

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

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

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

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

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

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

      if -1.74999999999999993e-81 < A < 1.25e-61

      1. Initial program 51.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/76.0%

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

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

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

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

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

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

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

      if 1.25e-61 < A

      1. Initial program 83.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/97.4%

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.2 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.75 \cdot 10^{-81}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.25 \cdot 10^{-61}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 61.5% accurate, 3.3× speedup?

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

      1. Initial program 27.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. Add Preprocessing
      3. Taylor expanded in A around -inf 69.6%

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

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

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

      if -3.65000000000000001e-9 < A < -5.7e-83

      1. Initial program 67.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. Add Preprocessing
      3. Taylor expanded in B around inf 84.9%

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

      if -5.7e-83 < A < 2.0999999999999999e-62

      1. Initial program 51.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/76.7%

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

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

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

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

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

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

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

      if 2.0999999999999999e-62 < A

      1. Initial program 83.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/97.4%

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.65 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -5.7 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 61.5% accurate, 3.3× speedup?

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

      1. Initial program 27.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. Add Preprocessing
      3. Taylor expanded in A around -inf 69.6%

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

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

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

      if -4.6999999999999999e-9 < A < -2e-78

      1. Initial program 72.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/100.0%

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

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

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

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

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

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

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

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

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

      if -2e-78 < A < 1e-62

      1. Initial program 51.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/76.0%

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

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

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

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

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

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

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

      if 1e-62 < A

      1. Initial program 83.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/97.4%

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.7 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2 \cdot 10^{-78}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 10^{-62}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 59.1% accurate, 3.4× speedup?

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

      1. Initial program 27.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. Add Preprocessing
      3. Taylor expanded in A around -inf 69.6%

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

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

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

      if -5.2000000000000002e-9 < A < -9.1999999999999994e-71

      1. Initial program 72.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/100.0%

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

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

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

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

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

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

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

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

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

      if -9.1999999999999994e-71 < A < 4.9999999999999999e-150

      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-*l/51.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/77.2%

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

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

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

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

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

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

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

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

      if 4.9999999999999999e-150 < A

      1. Initial program 75.1%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/91.1%

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.2 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -9.2 \cdot 10^{-71}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-150}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 14: 58.1% accurate, 3.4× speedup?

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

      1. Initial program 27.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. Add Preprocessing
      3. Taylor expanded in A around -inf 69.6%

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

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

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

      if -6.60000000000000037e-9 < A < -3.2000000000000001e-83

      1. Initial program 63.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. Add Preprocessing
      3. Taylor expanded in B around inf 60.9%

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

      if -3.2000000000000001e-83 < A < 4.3999999999999999e-150

      1. Initial program 52.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/79.0%

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

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

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

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

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

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

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

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

      if 4.3999999999999999e-150 < A

      1. Initial program 75.1%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/91.1%

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -6.6 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -3.2 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 4.4 \cdot 10^{-150}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 15: 55.9% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -1.45 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.4 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 2.5 \cdot 10^{-31}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (if (<= A -1.45e-9)
       (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
       (if (<= A -1.4e-83)
         (* 180.0 (/ (atan -1.0) PI))
         (if (<= A 2.5e-31)
           (/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
           (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -1.45e-9) {
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
    	} else if (A <= -1.4e-83) {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	} else if (A <= 2.5e-31) {
    		tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
    	} else {
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -1.45e-9) {
    		tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
    	} else if (A <= -1.4e-83) {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	} else if (A <= 2.5e-31) {
    		tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
    	} else {
    		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	tmp = 0
    	if A <= -1.45e-9:
    		tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
    	elif A <= -1.4e-83:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	elif A <= 2.5e-31:
    		tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi
    	else:
    		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	tmp = 0.0
    	if (A <= -1.45e-9)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi));
    	elseif (A <= -1.4e-83)
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	elseif (A <= 2.5e-31)
    		tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi);
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	tmp = 0.0;
    	if (A <= -1.45e-9)
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / pi);
    	elseif (A <= -1.4e-83)
    		tmp = 180.0 * (atan(-1.0) / pi);
    	elseif (A <= 2.5e-31)
    		tmp = (180.0 * atan((1.0 + (C / B)))) / pi;
    	else
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[A, -1.45e-9], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.4e-83], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.5e-31], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;A \leq -1.45 \cdot 10^{-9}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -1.4 \cdot 10^{-83}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    \mathbf{elif}\;A \leq 2.5 \cdot 10^{-31}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if A < -1.44999999999999996e-9

      1. Initial program 27.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. Add Preprocessing
      3. Taylor expanded in A around -inf 69.6%

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

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

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

      if -1.44999999999999996e-9 < A < -1.4e-83

      1. Initial program 63.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. Add Preprocessing
      3. Taylor expanded in B around inf 60.9%

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

      if -1.4e-83 < A < 2.5e-31

      1. Initial program 52.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/78.0%

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

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

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

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

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

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

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

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

      if 2.5e-31 < A

      1. Initial program 85.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. Add Preprocessing
      3. Taylor expanded in A around inf 72.0%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.45 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.4 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 2.5 \cdot 10^{-31}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 16: 44.2% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -3.2 \cdot 10^{+105}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4 \cdot 10^{-104}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6.2 \cdot 10^{-125}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (if (<= B -3.2e+105)
       (* 180.0 (/ (atan 1.0) PI))
       (if (<= B -4e-104)
         (/ (* 180.0 (atan (/ C B))) PI)
         (if (<= B 6.2e-125)
           (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
           (* 180.0 (/ (atan -1.0) PI))))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (B <= -3.2e+105) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -4e-104) {
    		tmp = (180.0 * atan((C / B))) / ((double) M_PI);
    	} else if (B <= 6.2e-125) {
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double tmp;
    	if (B <= -3.2e+105) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -4e-104) {
    		tmp = (180.0 * Math.atan((C / B))) / Math.PI;
    	} else if (B <= 6.2e-125) {
    		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	tmp = 0
    	if B <= -3.2e+105:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -4e-104:
    		tmp = (180.0 * math.atan((C / B))) / math.pi
    	elif B <= 6.2e-125:
    		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	tmp = 0.0
    	if (B <= -3.2e+105)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -4e-104)
    		tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi);
    	elseif (B <= 6.2e-125)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	tmp = 0.0;
    	if (B <= -3.2e+105)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -4e-104)
    		tmp = (180.0 * atan((C / B))) / pi;
    	elseif (B <= 6.2e-125)
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[B, -3.2e+105], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4e-104], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 6.2e-125], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;B \leq -3.2 \cdot 10^{+105}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -4 \cdot 10^{-104}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 6.2 \cdot 10^{-125}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if B < -3.2e105

      1. Initial program 35.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. Add Preprocessing
      3. Taylor expanded in B around -inf 70.2%

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

      if -3.2e105 < B < -3.99999999999999971e-104

      1. Initial program 64.3%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/64.8%

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

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

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

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

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

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

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

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

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

      if -3.99999999999999971e-104 < B < 6.20000000000000026e-125

      1. Initial program 60.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. Add Preprocessing
      3. Taylor expanded in A around inf 46.7%

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

      if 6.20000000000000026e-125 < B

      1. Initial program 54.3%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in B around inf 58.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.2 \cdot 10^{+105}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4 \cdot 10^{-104}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6.2 \cdot 10^{-125}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 17: 60.9% accurate, 3.5× speedup?

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

      1. Initial program 27.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. Add Preprocessing
      3. Taylor expanded in A around -inf 69.6%

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

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

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

      if -1.15e-8 < A < -8.20000000000000032e-73

      1. Initial program 72.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/100.0%

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

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

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

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

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

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

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

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

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

      if -8.20000000000000032e-73 < A

      1. Initial program 64.3%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/84.8%

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.15 \cdot 10^{-8}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -8.2 \cdot 10^{-73}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 18: 60.9% accurate, 3.5× speedup?

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

      1. Initial program 27.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. Add Preprocessing
      3. Taylor expanded in A around -inf 69.6%

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

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

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

      if -1.79999999999999991e-8 < A < -1.7e-74

      1. Initial program 72.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/100.0%

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

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

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

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

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

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

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

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

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

      if -1.7e-74 < A

      1. Initial program 64.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. Add Preprocessing
      3. Taylor expanded in B around -inf 64.8%

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.8 \cdot 10^{-8}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.7 \cdot 10^{-74}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 19: 44.0% accurate, 3.5× speedup?

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

      1. Initial program 35.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. Add Preprocessing
      3. Taylor expanded in B around -inf 70.2%

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

      if -3.2e105 < B < -3.59999999999999993e-273

      1. Initial program 65.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/73.2%

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

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

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

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

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

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

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

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

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

      if -3.59999999999999993e-273 < B < 1.05000000000000009e-167

      1. Initial program 54.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/84.3%

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

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

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

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

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

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

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

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

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

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

      if 1.05000000000000009e-167 < B

      1. Initial program 54.7%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in B around inf 54.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.2 \cdot 10^{+105}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.6 \cdot 10^{-273}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-167}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 20: 44.1% accurate, 3.6× speedup?

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

      1. Initial program 50.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. Add Preprocessing
      3. Taylor expanded in B around -inf 48.1%

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

      if -8.4000000000000004e-128 < B < 8.4999999999999994e-168

      1. Initial program 59.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/83.5%

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

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

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

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

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

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

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

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

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

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

      if 8.4999999999999994e-168 < B

      1. Initial program 54.7%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in B around inf 54.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8.4 \cdot 10^{-128}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-168}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 21: 39.1% accurate, 3.8× speedup?

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

      1. Initial program 54.7%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in B around -inf 36.2%

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

      if -4.999999999999985e-310 < B

      1. Initial program 54.6%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in B around inf 44.4%

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

    Alternative 22: 20.8% accurate, 4.0× speedup?

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

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Taylor expanded in B around inf 20.0%

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

    Reproduce

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