ABCF->ab-angle angle

Percentage Accurate: 53.7% → 80.9%
Time: 22.7s
Alternatives: 17
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 17 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.7% 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.9% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 12.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. Applied egg-rr54.0%

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

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

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

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

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

    if -3.2e165 < A

    1. Initial program 61.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. Step-by-step derivation
      1. associate-*r/61.9%

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

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

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

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

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

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

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

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

Alternative 2: 78.1% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 84.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. Applied egg-rr93.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\pi \cdot 0.005555555555555556}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}\right)}^{-0.5} \cdot {\left(\frac{\pi \cdot \color{blue}{0.005555555555555556}}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}\right)}^{\left(\frac{-1}{2}\right)} \]
      10. metadata-eval50.8%

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

      \[\leadsto \color{blue}{{\left(\frac{\pi \cdot 0.005555555555555556}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}\right)}^{-0.5} \cdot {\left(\frac{\pi \cdot 0.005555555555555556}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}\right)}^{-0.5}} \]
    8. Step-by-step derivation
      1. pow-sqr92.6%

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

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

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

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

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

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

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

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

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

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

    if -1.50000000000000003e-17 < C < 3.0000000000000001e98

    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. Add Preprocessing
    3. Applied egg-rr80.2%

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

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

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

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

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

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

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

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

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

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

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

    if 3.0000000000000001e98 < C

    1. Initial program 21.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 0 21.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{0.005555555555555556 \cdot \pi}} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \]
      5. *-commutative82.0%

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

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

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

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{\frac{C}{B}}\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
      9. associate-/r/82.1%

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{C} \cdot B\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
      10. *-commutative82.1%

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

        \[\leadsto \tan^{-1} \left(\frac{-0.5}{C} \cdot B\right) \cdot \color{blue}{\frac{\frac{1}{0.005555555555555556}}{\pi}} \]
      12. metadata-eval82.1%

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

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

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

Alternative 3: 75.7% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 84.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 81.6%

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

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

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

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

    if -1.56000000000000002e-17 < C < 2.75000000000000009e101

    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. Add Preprocessing
    3. Applied egg-rr80.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{-\left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)}}\right)} - 1} \]
      3. associate-/r/42.2%

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{1}{\pi \cdot 0.005555555555555556} \cdot \tan^{-1} \color{blue}{\left(-\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}\right)} - 1 \]
      7. atan-neg42.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)\right)}{\pi \cdot 0.005555555555555556}} \]
      4. *-lft-identity79.6%

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

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

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

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

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

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

    if 2.75000000000000009e101 < C

    1. Initial program 21.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 0 21.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{0.005555555555555556 \cdot \pi}} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \]
      5. *-commutative82.0%

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

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

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

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{\frac{C}{B}}\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
      9. associate-/r/82.1%

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{C} \cdot B\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
      10. *-commutative82.1%

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

        \[\leadsto \tan^{-1} \left(\frac{-0.5}{C} \cdot B\right) \cdot \color{blue}{\frac{\frac{1}{0.005555555555555556}}{\pi}} \]
      12. metadata-eval82.1%

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

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

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

Alternative 4: 78.1% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 84.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 A around 0 84.4%

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

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

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

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

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

    if -1.50000000000000003e-17 < C < 1.09999999999999996e110

    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. Add Preprocessing
    3. Applied egg-rr80.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{-\left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)}}\right)} - 1} \]
      3. associate-/r/42.2%

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{1}{\pi \cdot 0.005555555555555556} \cdot \tan^{-1} \color{blue}{\left(-\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}\right)} - 1 \]
      7. atan-neg42.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)\right)}{\pi \cdot 0.005555555555555556}} \]
      4. *-lft-identity79.6%

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

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

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

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

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

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

    if 1.09999999999999996e110 < C

    1. Initial program 21.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 0 21.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{0.005555555555555556 \cdot \pi}} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \]
      5. *-commutative82.0%

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

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

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

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{\frac{C}{B}}\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
      9. associate-/r/82.1%

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{C} \cdot B\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
      10. *-commutative82.1%

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

        \[\leadsto \tan^{-1} \left(\frac{-0.5}{C} \cdot B\right) \cdot \color{blue}{\frac{\frac{1}{0.005555555555555556}}{\pi}} \]
      12. metadata-eval82.1%

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

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

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

Alternative 5: 78.2% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 84.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. Applied egg-rr93.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\pi \cdot 0.005555555555555556}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}\right)}^{-0.5} \cdot {\left(\frac{\pi \cdot \color{blue}{0.005555555555555556}}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}\right)}^{\left(\frac{-1}{2}\right)} \]
      10. metadata-eval50.8%

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

      \[\leadsto \color{blue}{{\left(\frac{\pi \cdot 0.005555555555555556}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}\right)}^{-0.5} \cdot {\left(\frac{\pi \cdot 0.005555555555555556}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}\right)}^{-0.5}} \]
    8. Step-by-step derivation
      1. pow-sqr92.6%

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

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

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

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

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

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

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

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

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

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

    if -1.50000000000000003e-17 < C < 2.2500000000000001e105

    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. Add Preprocessing
    3. Applied egg-rr80.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{-\left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)}}\right)} - 1} \]
      3. associate-/r/42.2%

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{1}{\pi \cdot 0.005555555555555556} \cdot \tan^{-1} \color{blue}{\left(-\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}\right)} - 1 \]
      7. atan-neg42.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)\right)}{\pi \cdot 0.005555555555555556}} \]
      4. *-lft-identity79.6%

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

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

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

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

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

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

    if 2.2500000000000001e105 < C

    1. Initial program 21.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 0 21.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{0.005555555555555556 \cdot \pi}} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \]
      5. *-commutative82.0%

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

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

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

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{\frac{C}{B}}\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
      9. associate-/r/82.1%

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{C} \cdot B\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
      10. *-commutative82.1%

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

        \[\leadsto \tan^{-1} \left(\frac{-0.5}{C} \cdot B\right) \cdot \color{blue}{\frac{\frac{1}{0.005555555555555556}}{\pi}} \]
      12. metadata-eval82.1%

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

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

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

Alternative 6: 79.8% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -1.1 \cdot 10^{+159}:\\ \;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\ \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 -1.1e+159)
   (/ 1.0 (/ (/ PI 180.0) (atan (* 0.5 (/ B A)))))
   (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -1.1e+159) {
		tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((0.5 * (B / A))));
	} 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 <= -1.1e+159) {
		tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((0.5 * (B / A))));
	} 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 <= -1.1e+159:
		tmp = 1.0 / ((math.pi / 180.0) / math.atan((0.5 * (B / A))))
	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 <= -1.1e+159)
		tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(0.5 * Float64(B / A)))));
	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 <= -1.1e+159)
		tmp = 1.0 / ((pi / 180.0) / atan((0.5 * (B / A))));
	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, -1.1e+159], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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 -1.1 \cdot 10^{+159}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\

\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 < -1.1e159

    1. Initial program 12.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. Applied egg-rr54.0%

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

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

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

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

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

    if -1.1e159 < A

    1. Initial program 61.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. Simplified83.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.1 \cdot 10^{+159}:\\ \;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\ \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 7: 57.1% accurate, 2.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq 1.7 \cdot 10^{-289}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 3.9 \cdot 10^{-163}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-129}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-35}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{+28}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{A - C} + \frac{\left(C - A\right) \cdot 2}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
       (if (<= B 1.7e-289)
         t_0
         (if (<= B 3.9e-163)
           (* 180.0 (/ (atan (/ 0.0 B)) PI))
           (if (<= B 1.5e-129)
             t_0
             (if (<= B 1.1e-35)
               (* (atan (* B (/ -0.5 C))) (/ 180.0 PI))
               (if (<= B 6e+28)
                 (*
                  180.0
                  (/ (atan (+ (* -0.5 (/ B (- A C))) (/ (* (- C A) 2.0) B))) PI))
                 (* 180.0 (/ (atan -1.0) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
    	double tmp;
    	if (B <= 1.7e-289) {
    		tmp = t_0;
    	} else if (B <= 3.9e-163) {
    		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	} else if (B <= 1.5e-129) {
    		tmp = t_0;
    	} else if (B <= 1.1e-35) {
    		tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
    	} else if (B <= 6e+28) {
    		tmp = 180.0 * (atan(((-0.5 * (B / (A - C))) + (((C - A) * 2.0) / B))) / ((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 t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
    	double tmp;
    	if (B <= 1.7e-289) {
    		tmp = t_0;
    	} else if (B <= 3.9e-163) {
    		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	} else if (B <= 1.5e-129) {
    		tmp = t_0;
    	} else if (B <= 1.1e-35) {
    		tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
    	} else if (B <= 6e+28) {
    		tmp = 180.0 * (Math.atan(((-0.5 * (B / (A - C))) + (((C - A) * 2.0) / B))) / Math.PI);
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi)
    	tmp = 0
    	if B <= 1.7e-289:
    		tmp = t_0
    	elif B <= 3.9e-163:
    		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	elif B <= 1.5e-129:
    		tmp = t_0
    	elif B <= 1.1e-35:
    		tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi)
    	elif B <= 6e+28:
    		tmp = 180.0 * (math.atan(((-0.5 * (B / (A - C))) + (((C - A) * 2.0) / B))) / math.pi)
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi))
    	tmp = 0.0
    	if (B <= 1.7e-289)
    		tmp = t_0;
    	elseif (B <= 3.9e-163)
    		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
    	elseif (B <= 1.5e-129)
    		tmp = t_0;
    	elseif (B <= 1.1e-35)
    		tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi));
    	elseif (B <= 6e+28)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B / Float64(A - C))) + Float64(Float64(Float64(C - A) * 2.0) / B))) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
    	tmp = 0.0;
    	if (B <= 1.7e-289)
    		tmp = t_0;
    	elseif (B <= 3.9e-163)
    		tmp = 180.0 * (atan((0.0 / B)) / pi);
    	elseif (B <= 1.5e-129)
    		tmp = t_0;
    	elseif (B <= 1.1e-35)
    		tmp = atan((B * (-0.5 / C))) * (180.0 / pi);
    	elseif (B <= 6e+28)
    		tmp = 180.0 * (atan(((-0.5 * (B / (A - C))) + (((C - A) * 2.0) / B))) / pi);
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 1.7e-289], t$95$0, If[LessEqual[B, 3.9e-163], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.5e-129], t$95$0, If[LessEqual[B, 1.1e-35], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6e+28], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(C - A), $MachinePrecision] * 2.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq 1.7 \cdot 10^{-289}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 3.9 \cdot 10^{-163}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.5 \cdot 10^{-129}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.1 \cdot 10^{-35}:\\
    \;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
    
    \mathbf{elif}\;B \leq 6 \cdot 10^{+28}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{A - C} + \frac{\left(C - A\right) \cdot 2}{B}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if B < 1.70000000000000009e-289 or 3.9000000000000002e-163 < B < 1.4999999999999999e-129

      1. Initial program 62.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 B around -inf 71.7%

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

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

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

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

      if 1.70000000000000009e-289 < B < 3.9000000000000002e-163

      1. Initial program 49.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 C around inf 62.4%

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

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

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

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

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

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

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

      if 1.4999999999999999e-129 < B < 1.09999999999999997e-35

      1. Initial program 30.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{1}{0.005555555555555556 \cdot \pi}} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \]
        5. *-commutative51.8%

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

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

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

          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{\frac{C}{B}}\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
        9. associate-/r/52.0%

          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{C} \cdot B\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
        10. *-commutative52.0%

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

          \[\leadsto \tan^{-1} \left(\frac{-0.5}{C} \cdot B\right) \cdot \color{blue}{\frac{\frac{1}{0.005555555555555556}}{\pi}} \]
        12. metadata-eval52.0%

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

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

      if 1.09999999999999997e-35 < B < 6.0000000000000002e28

      1. Initial program 100.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 B around 0 81.9%

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

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

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

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

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

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

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

      if 6.0000000000000002e28 < B

      1. Initial program 49.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 63.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.7 \cdot 10^{-289}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.9 \cdot 10^{-163}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-129}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-35}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{+28}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{A - C} + \frac{\left(C - A\right) \cdot 2}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 56.8% accurate, 2.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq 2 \cdot 10^{-291}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 8.2 \cdot 10^{-163}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-129}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.15 \cdot 10^{-29}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{+31}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B} + 0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
       (if (<= B 2e-291)
         t_0
         (if (<= B 8.2e-163)
           (* 180.0 (/ (atan (/ 0.0 B)) PI))
           (if (<= B 1.7e-129)
             t_0
             (if (<= B 1.15e-29)
               (* (atan (* B (/ -0.5 C))) (/ 180.0 PI))
               (if (<= B 3.5e+31)
                 (/ (* 180.0 (atan (+ (/ (* (- C A) 2.0) B) (* 0.5 (/ B C))))) PI)
                 (* 180.0 (/ (atan -1.0) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
    	double tmp;
    	if (B <= 2e-291) {
    		tmp = t_0;
    	} else if (B <= 8.2e-163) {
    		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	} else if (B <= 1.7e-129) {
    		tmp = t_0;
    	} else if (B <= 1.15e-29) {
    		tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
    	} else if (B <= 3.5e+31) {
    		tmp = (180.0 * atan(((((C - A) * 2.0) / B) + (0.5 * (B / C))))) / ((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 t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
    	double tmp;
    	if (B <= 2e-291) {
    		tmp = t_0;
    	} else if (B <= 8.2e-163) {
    		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	} else if (B <= 1.7e-129) {
    		tmp = t_0;
    	} else if (B <= 1.15e-29) {
    		tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
    	} else if (B <= 3.5e+31) {
    		tmp = (180.0 * Math.atan(((((C - A) * 2.0) / B) + (0.5 * (B / C))))) / Math.PI;
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi)
    	tmp = 0
    	if B <= 2e-291:
    		tmp = t_0
    	elif B <= 8.2e-163:
    		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	elif B <= 1.7e-129:
    		tmp = t_0
    	elif B <= 1.15e-29:
    		tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi)
    	elif B <= 3.5e+31:
    		tmp = (180.0 * math.atan(((((C - A) * 2.0) / B) + (0.5 * (B / C))))) / math.pi
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi))
    	tmp = 0.0
    	if (B <= 2e-291)
    		tmp = t_0;
    	elseif (B <= 8.2e-163)
    		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
    	elseif (B <= 1.7e-129)
    		tmp = t_0;
    	elseif (B <= 1.15e-29)
    		tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi));
    	elseif (B <= 3.5e+31)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(Float64(C - A) * 2.0) / B) + Float64(0.5 * Float64(B / C))))) / pi);
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
    	tmp = 0.0;
    	if (B <= 2e-291)
    		tmp = t_0;
    	elseif (B <= 8.2e-163)
    		tmp = 180.0 * (atan((0.0 / B)) / pi);
    	elseif (B <= 1.7e-129)
    		tmp = t_0;
    	elseif (B <= 1.15e-29)
    		tmp = atan((B * (-0.5 / C))) * (180.0 / pi);
    	elseif (B <= 3.5e+31)
    		tmp = (180.0 * atan(((((C - A) * 2.0) / B) + (0.5 * (B / C))))) / pi;
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 2e-291], t$95$0, If[LessEqual[B, 8.2e-163], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.7e-129], t$95$0, If[LessEqual[B, 1.15e-29], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.5e+31], N[(N[(180.0 * N[ArcTan[N[(N[(N[(N[(C - A), $MachinePrecision] * 2.0), $MachinePrecision] / B), $MachinePrecision] + N[(0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq 2 \cdot 10^{-291}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 8.2 \cdot 10^{-163}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.7 \cdot 10^{-129}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.15 \cdot 10^{-29}:\\
    \;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
    
    \mathbf{elif}\;B \leq 3.5 \cdot 10^{+31}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B} + 0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if B < 1.99999999999999992e-291 or 8.19999999999999965e-163 < B < 1.70000000000000007e-129

      1. Initial program 62.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 B around -inf 71.7%

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

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

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

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

      if 1.99999999999999992e-291 < B < 8.19999999999999965e-163

      1. Initial program 49.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 C around inf 62.4%

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

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

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

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

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

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

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

      if 1.70000000000000007e-129 < B < 1.14999999999999996e-29

      1. Initial program 30.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{1}{0.005555555555555556 \cdot \pi}} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \]
        5. *-commutative51.8%

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

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

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

          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{\frac{C}{B}}\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
        9. associate-/r/52.0%

          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{C} \cdot B\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
        10. *-commutative52.0%

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

          \[\leadsto \tan^{-1} \left(\frac{-0.5}{C} \cdot B\right) \cdot \color{blue}{\frac{\frac{1}{0.005555555555555556}}{\pi}} \]
        12. metadata-eval52.0%

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

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

      if 1.14999999999999996e-29 < B < 3.5e31

      1. Initial program 100.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. Step-by-step derivation
        1. associate-*r/100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.5e31 < B

      1. Initial program 49.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 63.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2 \cdot 10^{-291}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 8.2 \cdot 10^{-163}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-129}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.15 \cdot 10^{-29}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{+31}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B} + 0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 56.9% accurate, 3.1× speedup?

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

      1. Initial program 64.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 72.1%

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

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

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

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

      if 3.80000000000000009e-289 < B < 3.9000000000000002e-163

      1. Initial program 49.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 C around inf 62.4%

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

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

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

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

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

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

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

      if 1.70000000000000007e-129 < B < 1.19999999999999996e-34

      1. Initial program 30.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{1}{0.005555555555555556 \cdot \pi}} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \]
        5. *-commutative51.8%

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

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

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

          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{\frac{C}{B}}\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
        9. associate-/r/52.0%

          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-0.5}{C} \cdot B\right)} \cdot \frac{1}{\pi \cdot 0.005555555555555556} \]
        10. *-commutative52.0%

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

          \[\leadsto \tan^{-1} \left(\frac{-0.5}{C} \cdot B\right) \cdot \color{blue}{\frac{\frac{1}{0.005555555555555556}}{\pi}} \]
        12. metadata-eval52.0%

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

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

      if 1.1e30 < B

      1. Initial program 49.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 63.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.8 \cdot 10^{-289}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.9 \cdot 10^{-163}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-129}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{-34}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{+30}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 48.6% accurate, 3.4× speedup?

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

      1. Initial program 84.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 C around -inf 75.1%

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

      if -1.36e-17 < C < -1.07999999999999999e-134

      1. Initial program 64.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 42.0%

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

      if -1.07999999999999999e-134 < C < 2.19999999999999987e-27

      1. Initial program 51.0%

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

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

      if 2.19999999999999987e-27 < C

      1. Initial program 28.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 0 24.2%

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.36 \cdot 10^{-17}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -1.08 \cdot 10^{-134}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 2.2 \cdot 10^{-27}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 45.3% accurate, 3.4× speedup?

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

      1. Initial program 59.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 B around -inf 58.0%

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

      if -2.40000000000000013e-54 < B < 3.6e-289

      1. Initial program 66.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 44.6%

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

      if 3.6e-289 < B < 2.0499999999999999e-78

      1. Initial program 46.7%

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

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

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

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

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

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

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

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

      if 2.0499999999999999e-78 < B

      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. Add Preprocessing
      3. Taylor expanded in B around inf 56.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.4 \cdot 10^{-54}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.6 \cdot 10^{-289}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.05 \cdot 10^{-78}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 45.3% accurate, 3.4× speedup?

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

      1. Initial program 58.4%

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

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

      if -6.1999999999999998e-23 < B < 1.11999999999999999e-289

      1. Initial program 66.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 C around -inf 49.0%

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

      if 1.11999999999999999e-289 < B < 1.64999999999999991e-78

      1. Initial program 46.7%

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

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

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

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

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

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

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

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

      if 1.64999999999999991e-78 < B

      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. Add Preprocessing
      3. Taylor expanded in B around inf 56.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.2 \cdot 10^{-23}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.12 \cdot 10^{-289}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.65 \cdot 10^{-78}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 56.5% accurate, 3.5× speedup?

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

      1. Initial program 26.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 68.1%

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

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

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

      if -7.8000000000000002e39 < A < 4.2000000000000003e72

      1. Initial program 59.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. Add Preprocessing
      3. Taylor expanded in A around 0 57.1%

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

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

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

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

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

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

      if 4.2000000000000003e72 < A

      1. Initial program 80.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 A around inf 71.7%

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

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

    Alternative 14: 56.5% accurate, 3.5× speedup?

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

      1. Initial program 26.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. Step-by-step derivation
        1. associate-*r/26.7%

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

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

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

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

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

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

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

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

      if -1.35000000000000005e40 < A < 2.2e72

      1. Initial program 59.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. Add Preprocessing
      3. Taylor expanded in A around 0 57.1%

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

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

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

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

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

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

      if 2.2e72 < A

      1. Initial program 80.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 A around inf 71.7%

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

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

    Alternative 15: 44.2% accurate, 3.6× speedup?

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

      1. Initial program 60.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 55.4%

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

      if -6.59999999999999967e-76 < B < 2.14999999999999997e-78

      1. Initial program 56.6%

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

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

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

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

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

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

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

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

      if 2.14999999999999997e-78 < B

      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. Add Preprocessing
      3. Taylor expanded in B around inf 56.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.6 \cdot 10^{-76}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 2.15 \cdot 10^{-78}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 16: 39.7% 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 61.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 40.4%

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

      if -4.999999999999985e-310 < B

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

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

      \[\leadsto \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} \]
    5. Add Preprocessing

    Alternative 17: 21.1% 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 56.5%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
    4. Final simplification22.3%

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

    Reproduce

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