ABCF->ab-angle angle

Percentage Accurate: 53.4% → 80.5%
Time: 23.8s
Alternatives: 25
Speedup: 3.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 25 alternatives:

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

Initial Program: 53.4% accurate, 1.0× speedup?

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

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

Alternative 1: 80.5% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 60.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. Applied egg-rr82.7%

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

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

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

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

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

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

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

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

    if 2.35e92 < C

    1. Initial program 21.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. Applied egg-rr51.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 76.8% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -3.2000000000000002e77

    1. Initial program 79.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. Applied egg-rr99.9%

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

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

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

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

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

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

    if -3.2000000000000002e77 < C < 2.80000000000000001e92

    1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

    if 2.80000000000000001e92 < C

    1. Initial program 21.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. Applied egg-rr51.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 76.8% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -3.5999999999999998e77

    1. Initial program 79.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. Applied egg-rr99.9%

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

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

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

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

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

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

    if -3.5999999999999998e77 < C < 2.0000000000000001e92

    1. Initial program 54.2%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Applied egg-rr76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e92 < C

    1. Initial program 21.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. Applied egg-rr51.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 75.8% accurate, 1.9× speedup?

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

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

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

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


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

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

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

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

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

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

    if -3.99999999999999996e132 < A < 1.1e129

    1. Initial program 57.2%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Taylor expanded in A around 0 52.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. unpow252.9%

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

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

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

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

    if 1.1e129 < A

    1. Initial program 75.6%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Taylor expanded in B around -inf 76.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+76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 75.8% accurate, 1.9× speedup?

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

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

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

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


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

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

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

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

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

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

    if -8.39999999999999962e130 < A < 1.45000000000000005e131

    1. Initial program 57.2%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Applied egg-rr80.0%

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

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

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

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

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

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

    if 1.45000000000000005e131 < A

    1. Initial program 75.6%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Taylor expanded in B around -inf 76.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+76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 80.7% accurate, 1.9× speedup?

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

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


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

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

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

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

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

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

    if -2.9000000000000001e133 < A

    1. Initial program 60.2%

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

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

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

    Alternative 7: 80.5% accurate, 1.9× speedup?

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

      1. Initial program 60.6%

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

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

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

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

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

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

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

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

      if 2.0000000000000001e92 < C

      1. Initial program 21.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. Applied egg-rr51.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 80.5% accurate, 1.9× speedup?

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

      1. Initial program 60.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. Applied egg-rr82.7%

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

      if 2.6999999999999999e92 < C

      1. Initial program 21.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. Applied egg-rr51.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 43.6% accurate, 2.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -8 \cdot 10^{+167}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -1.4 \cdot 10^{+96}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq -8.6 \cdot 10^{-61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -1.5 \cdot 10^{-223}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-307}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-210}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-107}:\\ \;\;\;\;t\_2\\ \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 (* (/ C B) 2.0)) PI)))
            (t_1 (* 180.0 (/ (atan 1.0) PI)))
            (t_2 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
       (if (<= B -8e+167)
         t_1
         (if (<= B -1.4e+96)
           t_0
           (if (<= B -8.6e-61)
             t_1
             (if (<= B -1.5e-223)
               (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
               (if (<= B 2.7e-307)
                 t_2
                 (if (<= B 5.2e-210)
                   t_0
                   (if (<= B 4.8e-107) t_2 (* 180.0 (/ (atan -1.0) PI)))))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
    	double t_1 = 180.0 * (atan(1.0) / ((double) M_PI));
    	double t_2 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	double tmp;
    	if (B <= -8e+167) {
    		tmp = t_1;
    	} else if (B <= -1.4e+96) {
    		tmp = t_0;
    	} else if (B <= -8.6e-61) {
    		tmp = t_1;
    	} else if (B <= -1.5e-223) {
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	} else if (B <= 2.7e-307) {
    		tmp = t_2;
    	} else if (B <= 5.2e-210) {
    		tmp = t_0;
    	} else if (B <= 4.8e-107) {
    		tmp = t_2;
    	} 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(((C / B) * 2.0)) / Math.PI);
    	double t_1 = 180.0 * (Math.atan(1.0) / Math.PI);
    	double t_2 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	double tmp;
    	if (B <= -8e+167) {
    		tmp = t_1;
    	} else if (B <= -1.4e+96) {
    		tmp = t_0;
    	} else if (B <= -8.6e-61) {
    		tmp = t_1;
    	} else if (B <= -1.5e-223) {
    		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	} else if (B <= 2.7e-307) {
    		tmp = t_2;
    	} else if (B <= 5.2e-210) {
    		tmp = t_0;
    	} else if (B <= 4.8e-107) {
    		tmp = t_2;
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi)
    	t_1 = 180.0 * (math.atan(1.0) / math.pi)
    	t_2 = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	tmp = 0
    	if B <= -8e+167:
    		tmp = t_1
    	elif B <= -1.4e+96:
    		tmp = t_0
    	elif B <= -8.6e-61:
    		tmp = t_1
    	elif B <= -1.5e-223:
    		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	elif B <= 2.7e-307:
    		tmp = t_2
    	elif B <= 5.2e-210:
    		tmp = t_0
    	elif B <= 4.8e-107:
    		tmp = t_2
    	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(Float64(C / B) * 2.0)) / pi))
    	t_1 = Float64(180.0 * Float64(atan(1.0) / pi))
    	t_2 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi))
    	tmp = 0.0
    	if (B <= -8e+167)
    		tmp = t_1;
    	elseif (B <= -1.4e+96)
    		tmp = t_0;
    	elseif (B <= -8.6e-61)
    		tmp = t_1;
    	elseif (B <= -1.5e-223)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
    	elseif (B <= 2.7e-307)
    		tmp = t_2;
    	elseif (B <= 5.2e-210)
    		tmp = t_0;
    	elseif (B <= 4.8e-107)
    		tmp = t_2;
    	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(((C / B) * 2.0)) / pi);
    	t_1 = 180.0 * (atan(1.0) / pi);
    	t_2 = 180.0 * (atan((0.0 / B)) / pi);
    	tmp = 0.0;
    	if (B <= -8e+167)
    		tmp = t_1;
    	elseif (B <= -1.4e+96)
    		tmp = t_0;
    	elseif (B <= -8.6e-61)
    		tmp = t_1;
    	elseif (B <= -1.5e-223)
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	elseif (B <= 2.7e-307)
    		tmp = t_2;
    	elseif (B <= 5.2e-210)
    		tmp = t_0;
    	elseif (B <= 4.8e-107)
    		tmp = t_2;
    	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[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8e+167], t$95$1, If[LessEqual[B, -1.4e+96], t$95$0, If[LessEqual[B, -8.6e-61], t$95$1, If[LessEqual[B, -1.5e-223], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.7e-307], t$95$2, If[LessEqual[B, 5.2e-210], t$95$0, If[LessEqual[B, 4.8e-107], t$95$2, 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(\frac{C}{B} \cdot 2\right)}{\pi}\\
    t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -8 \cdot 10^{+167}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq -1.4 \cdot 10^{+96}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq -8.6 \cdot 10^{-61}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq -1.5 \cdot 10^{-223}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 2.7 \cdot 10^{-307}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;B \leq 5.2 \cdot 10^{-210}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 4.8 \cdot 10^{-107}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if B < -8.0000000000000003e167 or -1.4e96 < B < -8.6000000000000007e-61

      1. Initial program 43.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 56.2%

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

      if -8.0000000000000003e167 < B < -1.4e96 or 2.69999999999999985e-307 < B < 5.1999999999999997e-210

      1. Initial program 63.0%

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

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

      if -8.6000000000000007e-61 < B < -1.49999999999999996e-223

      1. Initial program 75.5%

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

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

      if -1.49999999999999996e-223 < B < 2.69999999999999985e-307 or 5.1999999999999997e-210 < B < 4.79999999999999989e-107

      1. Initial program 41.1%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in C around inf 53.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/53.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-in53.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-eval53.6%

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

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

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

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

      if 4.79999999999999989e-107 < B

      1. Initial program 53.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 55.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8 \cdot 10^{+167}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.4 \cdot 10^{+96}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;B \leq -8.6 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.5 \cdot 10^{-223}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-307}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-210}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-107}:\\ \;\;\;\;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 10: 49.5% accurate, 3.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -2.4 \cdot 10^{-101}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -9.6 \cdot 10^{-206}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-223}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-305}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.86 \cdot 10^{-208}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 1.18 \cdot 10^{-107}:\\ \;\;\;\;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 (/ 0.0 B)) PI)))
            (t_1 (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))))
       (if (<= B -2.4e-101)
         t_1
         (if (<= B -9.6e-206)
           (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
           (if (<= B -8.5e-223)
             t_1
             (if (<= B 1.1e-305)
               t_0
               (if (<= B 1.86e-208)
                 t_1
                 (if (<= B 1.18e-107) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	double t_1 = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
    	double tmp;
    	if (B <= -2.4e-101) {
    		tmp = t_1;
    	} else if (B <= -9.6e-206) {
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	} else if (B <= -8.5e-223) {
    		tmp = t_1;
    	} else if (B <= 1.1e-305) {
    		tmp = t_0;
    	} else if (B <= 1.86e-208) {
    		tmp = t_1;
    	} else if (B <= 1.18e-107) {
    		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((0.0 / B)) / Math.PI);
    	double t_1 = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
    	double tmp;
    	if (B <= -2.4e-101) {
    		tmp = t_1;
    	} else if (B <= -9.6e-206) {
    		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	} else if (B <= -8.5e-223) {
    		tmp = t_1;
    	} else if (B <= 1.1e-305) {
    		tmp = t_0;
    	} else if (B <= 1.86e-208) {
    		tmp = t_1;
    	} else if (B <= 1.18e-107) {
    		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((0.0 / B)) / math.pi)
    	t_1 = 180.0 * (math.atan((1.0 + (C / B))) / math.pi)
    	tmp = 0
    	if B <= -2.4e-101:
    		tmp = t_1
    	elif B <= -9.6e-206:
    		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	elif B <= -8.5e-223:
    		tmp = t_1
    	elif B <= 1.1e-305:
    		tmp = t_0
    	elif B <= 1.86e-208:
    		tmp = t_1
    	elif B <= 1.18e-107:
    		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(0.0 / B)) / pi))
    	t_1 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi))
    	tmp = 0.0
    	if (B <= -2.4e-101)
    		tmp = t_1;
    	elseif (B <= -9.6e-206)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
    	elseif (B <= -8.5e-223)
    		tmp = t_1;
    	elseif (B <= 1.1e-305)
    		tmp = t_0;
    	elseif (B <= 1.86e-208)
    		tmp = t_1;
    	elseif (B <= 1.18e-107)
    		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((0.0 / B)) / pi);
    	t_1 = 180.0 * (atan((1.0 + (C / B))) / pi);
    	tmp = 0.0;
    	if (B <= -2.4e-101)
    		tmp = t_1;
    	elseif (B <= -9.6e-206)
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	elseif (B <= -8.5e-223)
    		tmp = t_1;
    	elseif (B <= 1.1e-305)
    		tmp = t_0;
    	elseif (B <= 1.86e-208)
    		tmp = t_1;
    	elseif (B <= 1.18e-107)
    		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[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.4e-101], t$95$1, If[LessEqual[B, -9.6e-206], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.5e-223], t$95$1, If[LessEqual[B, 1.1e-305], t$95$0, If[LessEqual[B, 1.86e-208], t$95$1, If[LessEqual[B, 1.18e-107], 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(\frac{0}{B}\right)}{\pi}\\
    t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -2.4 \cdot 10^{-101}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq -9.6 \cdot 10^{-206}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -8.5 \cdot 10^{-223}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq 1.1 \cdot 10^{-305}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.86 \cdot 10^{-208}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq 1.18 \cdot 10^{-107}:\\
    \;\;\;\;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 < -2.4e-101 or -9.5999999999999998e-206 < B < -8.5000000000000003e-223 or 1.09999999999999998e-305 < B < 1.86e-208

      1. Initial program 50.6%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in B around -inf 66.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+66.7%

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

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

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

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

      if -2.4e-101 < B < -9.5999999999999998e-206

      1. Initial program 79.3%

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

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

      if -8.5000000000000003e-223 < B < 1.09999999999999998e-305 or 1.86e-208 < B < 1.17999999999999993e-107

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

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

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

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

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

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

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

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

      if 1.17999999999999993e-107 < B

      1. Initial program 53.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 55.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.4 \cdot 10^{-101}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -9.6 \cdot 10^{-206}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-223}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-305}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.86 \cdot 10^{-208}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.18 \cdot 10^{-107}:\\ \;\;\;\;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 11: 50.2% accurate, 3.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -9.5 \cdot 10^{-100}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-223}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-304}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-212}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{-107}:\\ \;\;\;\;t\_1\\ \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 B))) PI)))
            (t_1 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
       (if (<= B -9.5e-100)
         t_0
         (if (<= B -6.2e-223)
           (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
           (if (<= B 1.8e-304)
             t_1
             (if (<= B 4.8e-212)
               t_0
               (if (<= B 9.5e-107) t_1 (* 180.0 (/ (atan -1.0) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
    	double t_1 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	double tmp;
    	if (B <= -9.5e-100) {
    		tmp = t_0;
    	} else if (B <= -6.2e-223) {
    		tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
    	} else if (B <= 1.8e-304) {
    		tmp = t_1;
    	} else if (B <= 4.8e-212) {
    		tmp = t_0;
    	} else if (B <= 9.5e-107) {
    		tmp = t_1;
    	} 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 / B))) / Math.PI);
    	double t_1 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	double tmp;
    	if (B <= -9.5e-100) {
    		tmp = t_0;
    	} else if (B <= -6.2e-223) {
    		tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
    	} else if (B <= 1.8e-304) {
    		tmp = t_1;
    	} else if (B <= 4.8e-212) {
    		tmp = t_0;
    	} else if (B <= 9.5e-107) {
    		tmp = t_1;
    	} 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 / B))) / math.pi)
    	t_1 = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	tmp = 0
    	if B <= -9.5e-100:
    		tmp = t_0
    	elif B <= -6.2e-223:
    		tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi)
    	elif B <= 1.8e-304:
    		tmp = t_1
    	elif B <= 4.8e-212:
    		tmp = t_0
    	elif B <= 9.5e-107:
    		tmp = t_1
    	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(C / B))) / pi))
    	t_1 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi))
    	tmp = 0.0
    	if (B <= -9.5e-100)
    		tmp = t_0;
    	elseif (B <= -6.2e-223)
    		tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi));
    	elseif (B <= 1.8e-304)
    		tmp = t_1;
    	elseif (B <= 4.8e-212)
    		tmp = t_0;
    	elseif (B <= 9.5e-107)
    		tmp = t_1;
    	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 / B))) / pi);
    	t_1 = 180.0 * (atan((0.0 / B)) / pi);
    	tmp = 0.0;
    	if (B <= -9.5e-100)
    		tmp = t_0;
    	elseif (B <= -6.2e-223)
    		tmp = 180.0 * (atan((1.0 - (A / B))) / pi);
    	elseif (B <= 1.8e-304)
    		tmp = t_1;
    	elseif (B <= 4.8e-212)
    		tmp = t_0;
    	elseif (B <= 9.5e-107)
    		tmp = t_1;
    	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[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9.5e-100], t$95$0, If[LessEqual[B, -6.2e-223], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.8e-304], t$95$1, If[LessEqual[B, 4.8e-212], t$95$0, If[LessEqual[B, 9.5e-107], t$95$1, 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}{B}\right)}{\pi}\\
    t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -9.5 \cdot 10^{-100}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq -6.2 \cdot 10^{-223}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.8 \cdot 10^{-304}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq 4.8 \cdot 10^{-212}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 9.5 \cdot 10^{-107}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if B < -9.4999999999999992e-100 or 1.8000000000000001e-304 < B < 4.79999999999999978e-212

      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 66.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+66.7%

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

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

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

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

      if -9.4999999999999992e-100 < B < -6.20000000000000036e-223

      1. Initial program 75.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 67.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+67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.20000000000000036e-223 < B < 1.8000000000000001e-304 or 4.79999999999999978e-212 < B < 9.4999999999999999e-107

      1. Initial program 41.1%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in C around inf 53.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/53.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-in53.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-eval53.6%

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

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

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

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

      if 9.4999999999999999e-107 < B

      1. Initial program 53.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 55.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -9.5 \cdot 10^{-100}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-223}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-304}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-212}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{-107}:\\ \;\;\;\;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: 63.1% accurate, 3.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

      if -1.55000000000000009e-223 < B < 5.4000000000000003e-308

      1. Initial program 55.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 70.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/70.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-in70.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-eval70.3%

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

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

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

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

      if 5.4000000000000003e-308 < B < 3.8e-207

      1. Initial program 65.9%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Applied egg-rr86.7%

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

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

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

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

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

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

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

      if 3.8e-207 < B < 1.6000000000000001e-109

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

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

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

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

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

      if 1.6000000000000001e-109 < B

      1. Initial program 53.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. Applied egg-rr75.7%

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.55 \cdot 10^{-223}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.4 \cdot 10^{-308}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-207}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C \cdot \left(1 + -0.5 \cdot \frac{C}{B}\right) - B}{B}\right)}}\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{-109}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 63.4% accurate, 3.2× speedup?

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

      1. Initial program 56.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 66.9%

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

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

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

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

      if -4.20000000000000013e-224 < B < 3.00000000000000022e-308

      1. Initial program 55.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 70.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/70.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-in70.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-eval70.3%

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

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

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

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

      if 8.9999999999999992e-208 < B < 1.1500000000000001e-110

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

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

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

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

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

      if 1.1500000000000001e-110 < B

      1. Initial program 53.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. Applied egg-rr75.7%

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.2 \cdot 10^{-224}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3 \cdot 10^{-308}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9 \cdot 10^{-208}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.15 \cdot 10^{-110}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 14: 63.4% accurate, 3.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

      if -3.3000000000000001e-224 < B < 5.00000000000000014e-307

      1. Initial program 55.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 70.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/70.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-in70.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-eval70.3%

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

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

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

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

      if 5.00000000000000014e-307 < B < 6.99999999999999982e-208

      1. Initial program 65.9%

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

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

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

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

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

      if 6.99999999999999982e-208 < B < 2.7000000000000001e-112

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

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

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

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

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

      if 2.7000000000000001e-112 < B

      1. Initial program 53.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. Applied egg-rr75.7%

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.3 \cdot 10^{-224}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-307}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-208}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-112}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 15: 58.7% accurate, 3.2× speedup?

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

      1. Initial program 27.2%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in A around -inf 74.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/74.1%

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

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

      if -7.20000000000000026e96 < A < 1.3999999999999999e-283 or 3.2500000000000001e-251 < A < 4.9999999999999997e-37

      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. Applied egg-rr76.2%

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

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

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

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

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

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

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

      if 1.3999999999999999e-283 < A < 3.2500000000000001e-251

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

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

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

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

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

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

      if 4.9999999999999997e-37 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7.2 \cdot 10^{+96}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.4 \cdot 10^{-283}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\ \mathbf{elif}\;A \leq 3.25 \cdot 10^{-251}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-37}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 16: 58.8% accurate, 3.2× speedup?

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

      1. Initial program 27.2%

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

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

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

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

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

      if -5.79999999999999955e96 < A < 7.20000000000000027e-286 or 3.00000000000000016e-250 < A < 5.9999999999999998e-30

      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. Applied egg-rr76.2%

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

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

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

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

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

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

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

      if 7.20000000000000027e-286 < A < 3.00000000000000016e-250

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

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

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

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

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

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

      if 5.9999999999999998e-30 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.8 \cdot 10^{+96}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 7.2 \cdot 10^{-286}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\ \mathbf{elif}\;A \leq 3 \cdot 10^{-250}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 6 \cdot 10^{-30}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 17: 58.8% accurate, 3.2× speedup?

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

      1. Initial program 27.2%

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

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

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

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

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

      if -5.79999999999999955e96 < A < 5.00000000000000037e-286

      1. Initial program 57.3%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Applied egg-rr77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.00000000000000037e-286 < A < 1.00000000000000002e-251

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

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

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

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

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

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

      if 1.00000000000000002e-251 < A < 4.2e-33

      1. Initial program 54.8%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Applied egg-rr73.6%

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

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

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

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

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

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

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

      if 4.2e-33 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 18: 60.4% accurate, 3.2× 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.55 \cdot 10^{-223}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 2 \cdot 10^{-308}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9.8 \cdot 10^{-216}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 2.55 \cdot 10^{-110}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}}{0.005555555555555556}\\ \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.55e-223)
         t_0
         (if (<= B 2e-308)
           (* 180.0 (/ (atan (/ 0.0 B)) PI))
           (if (<= B 9.8e-216)
             t_0
             (if (<= B 2.55e-110)
               (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
               (/ (/ (atan (/ (- C B) B)) PI) 0.005555555555555556)))))))
    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.55e-223) {
    		tmp = t_0;
    	} else if (B <= 2e-308) {
    		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	} else if (B <= 9.8e-216) {
    		tmp = t_0;
    	} else if (B <= 2.55e-110) {
    		tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
    	} else {
    		tmp = (atan(((C - B) / B)) / ((double) M_PI)) / 0.005555555555555556;
    	}
    	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.55e-223) {
    		tmp = t_0;
    	} else if (B <= 2e-308) {
    		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	} else if (B <= 9.8e-216) {
    		tmp = t_0;
    	} else if (B <= 2.55e-110) {
    		tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
    	} else {
    		tmp = (Math.atan(((C - B) / B)) / Math.PI) / 0.005555555555555556;
    	}
    	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.55e-223:
    		tmp = t_0
    	elif B <= 2e-308:
    		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	elif B <= 9.8e-216:
    		tmp = t_0
    	elif B <= 2.55e-110:
    		tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi
    	else:
    		tmp = (math.atan(((C - B) / B)) / math.pi) / 0.005555555555555556
    	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.55e-223)
    		tmp = t_0;
    	elseif (B <= 2e-308)
    		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
    	elseif (B <= 9.8e-216)
    		tmp = t_0;
    	elseif (B <= 2.55e-110)
    		tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi);
    	else
    		tmp = Float64(Float64(atan(Float64(Float64(C - B) / B)) / pi) / 0.005555555555555556);
    	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.55e-223)
    		tmp = t_0;
    	elseif (B <= 2e-308)
    		tmp = 180.0 * (atan((0.0 / B)) / pi);
    	elseif (B <= 9.8e-216)
    		tmp = t_0;
    	elseif (B <= 2.55e-110)
    		tmp = (180.0 * atan((0.5 * (B / A)))) / pi;
    	else
    		tmp = (atan(((C - B) / B)) / pi) / 0.005555555555555556;
    	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.55e-223], t$95$0, If[LessEqual[B, 2e-308], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.8e-216], t$95$0, If[LessEqual[B, 2.55e-110], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] / 0.005555555555555556), $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.55 \cdot 10^{-223}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 2 \cdot 10^{-308}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 9.8 \cdot 10^{-216}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 2.55 \cdot 10^{-110}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}}{0.005555555555555556}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if B < -1.55000000000000009e-223 or 1.9999999999999998e-308 < B < 9.8000000000000003e-216

      1. Initial program 56.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 66.9%

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

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

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

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

      if -1.55000000000000009e-223 < B < 1.9999999999999998e-308

      1. Initial program 55.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 70.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/70.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-in70.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-eval70.3%

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

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

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

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

      if 9.8000000000000003e-216 < B < 2.5500000000000001e-110

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

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

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

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

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

      if 2.5500000000000001e-110 < B

      1. Initial program 53.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. Applied egg-rr75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.55 \cdot 10^{-223}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2 \cdot 10^{-308}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9.8 \cdot 10^{-216}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.55 \cdot 10^{-110}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}}{0.005555555555555556}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 19: 56.2% accurate, 3.4× speedup?

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

      1. Initial program 29.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 70.4%

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

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

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

      if -3.5000000000000001e78 < A < 1.35000000000000004e-247

      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 47.4%

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

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

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

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

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

      if 1.35000000000000004e-247 < A < 3.1999999999999998e-97

      1. Initial program 37.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 40.8%

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

      if 3.1999999999999998e-97 < A

      1. Initial program 71.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 70.3%

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

          \[\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} \]
      6. Taylor expanded in C around 0 68.7%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 20: 56.7% accurate, 3.4× speedup?

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

      1. Initial program 29.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 70.4%

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

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

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

      if -7.49999999999999934e78 < A < 1.95e-248

      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 47.4%

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

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

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

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

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

      if 1.95e-248 < A < 9.6000000000000002e-99

      1. Initial program 34.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. Applied egg-rr61.7%

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

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

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

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

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

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

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

      if 9.6000000000000002e-99 < A

      1. Initial program 72.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 69.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 21: 56.8% accurate, 3.4× speedup?

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

      1. Initial program 29.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 70.4%

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

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

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

      if -2.1000000000000001e78 < A < 8.9999999999999992e-248

      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. Applied egg-rr78.7%

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

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

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

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

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

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

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

      if 8.9999999999999992e-248 < A < 1.24999999999999991e-105

      1. Initial program 34.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. Applied egg-rr61.7%

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

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

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

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

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

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

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

      if 1.24999999999999991e-105 < A

      1. Initial program 72.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 69.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 22: 45.6% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1.9 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.58 \cdot 10^{-223}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-106}:\\ \;\;\;\;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 -1.9e-60)
       (* 180.0 (/ (atan 1.0) PI))
       (if (<= B -1.58e-223)
         (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
         (if (<= B 2.1e-106)
           (* 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 <= -1.9e-60) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -1.58e-223) {
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	} else if (B <= 2.1e-106) {
    		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 <= -1.9e-60) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -1.58e-223) {
    		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	} else if (B <= 2.1e-106) {
    		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 <= -1.9e-60:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -1.58e-223:
    		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	elif B <= 2.1e-106:
    		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 <= -1.9e-60)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -1.58e-223)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
    	elseif (B <= 2.1e-106)
    		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 <= -1.9e-60)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -1.58e-223)
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	elseif (B <= 2.1e-106)
    		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, -1.9e-60], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.58e-223], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.1e-106], 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 -1.9 \cdot 10^{-60}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -1.58 \cdot 10^{-223}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 2.1 \cdot 10^{-106}:\\
    \;\;\;\;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 < -1.89999999999999997e-60

      1. Initial program 47.3%

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

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

      if -1.89999999999999997e-60 < B < -1.58e-223

      1. Initial program 75.5%

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

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

      if -1.58e-223 < B < 2.10000000000000003e-106

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

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

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

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

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

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

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

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

      if 2.10000000000000003e-106 < B

      1. Initial program 53.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 55.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.9 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.58 \cdot 10^{-223}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-106}:\\ \;\;\;\;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 23: 44.9% accurate, 3.6× speedup?

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

      1. Initial program 51.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 43.1%

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

      if -3.5999999999999998e-153 < B < 1.75e-106

      1. Initial program 55.1%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in C around inf 41.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/41.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-in41.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-eval41.4%

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

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

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

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

      if 1.75e-106 < B

      1. Initial program 53.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 55.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.6 \cdot 10^{-153}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.75 \cdot 10^{-106}:\\ \;\;\;\;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 24: 40.1% accurate, 3.8× speedup?

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

      1. Initial program 54.7%

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

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

      if -3.8e-302 < 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 43.2%

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

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

    Alternative 25: 20.9% 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 53.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 23.0%

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

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

    Reproduce

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