ABCF->ab-angle angle

Percentage Accurate: 54.6% → 80.6%
Time: 26.8s
Alternatives: 22
Speedup: 3.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 54.6% 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.6% accurate, 1.9× speedup?

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

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

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


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

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

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

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

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

    if -2e9 < A

    1. Initial program 66.5%

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

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

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

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

Alternative 2: 77.5% accurate, 1.9× speedup?

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

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

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

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


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

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

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

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

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

    if -1.5e21 < A < 1.8e-127

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

    if 1.8e-127 < A

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 77.5% accurate, 1.9× speedup?

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

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

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

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


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

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

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

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

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

    if -7.2e21 < A < 7.30000000000000033e-127

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

    if 7.30000000000000033e-127 < A

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

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

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

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

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

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

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

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

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

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

Alternative 4: 73.9% accurate, 1.9× speedup?

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

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

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

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


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

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

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

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

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

    if -9.00000000000000039e24 < A < 8.9999999999999995e164

    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. Step-by-step derivation
      1. associate--l-60.9%

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

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

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

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

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

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

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

    if 8.9999999999999995e164 < A

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 73.9% accurate, 1.9× speedup?

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

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

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

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


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

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

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

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

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

    if -3.2e23 < A < 8.9999999999999995e164

    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. Step-by-step derivation
      1. associate-*r/60.9%

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

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

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

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

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

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

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

    if 8.9999999999999995e164 < A

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 80.9% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -5.8 \cdot 10^{+23}:\\ \;\;\;\;\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 -5.8e+23)
   (/ (* 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 <= -5.8e+23) {
		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 <= -5.8e+23) {
		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 <= -5.8e+23:
		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 <= -5.8e+23)
		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 <= -5.8e+23)
		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, -5.8e+23], 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 -5.8 \cdot 10^{+23}:\\
\;\;\;\;\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 < -5.80000000000000025e23

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

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

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

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

    if -5.80000000000000025e23 < A

    1. Initial program 66.5%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.8 \cdot 10^{+23}:\\ \;\;\;\;\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: 46.7% accurate, 2.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.7 \cdot 10^{+16}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-58}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.02 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -8.2 \cdot 10^{-269}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-308}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-270}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{-249}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 2.05 \cdot 10^{-165}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI)))
            (t_1 (/ (* 180.0 (atan (/ C B))) PI)))
       (if (<= B -1.7e+16)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -1.6e-58)
           (/ (* 180.0 (atan (/ (- A) B))) PI)
           (if (<= B -1.02e-190)
             t_1
             (if (<= B -8.2e-269)
               t_0
               (if (<= B 1.8e-308)
                 t_1
                 (if (<= B 4.8e-270)
                   (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
                   (if (<= B 5.5e-249)
                     t_0
                     (if (<= B 2.05e-165)
                       (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
                       (* 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((C / B))) / ((double) M_PI);
    	double tmp;
    	if (B <= -1.7e+16) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -1.6e-58) {
    		tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
    	} else if (B <= -1.02e-190) {
    		tmp = t_1;
    	} else if (B <= -8.2e-269) {
    		tmp = t_0;
    	} else if (B <= 1.8e-308) {
    		tmp = t_1;
    	} else if (B <= 4.8e-270) {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	} else if (B <= 5.5e-249) {
    		tmp = t_0;
    	} else if (B <= 2.05e-165) {
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	double t_1 = (180.0 * Math.atan((C / B))) / Math.PI;
    	double tmp;
    	if (B <= -1.7e+16) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -1.6e-58) {
    		tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
    	} else if (B <= -1.02e-190) {
    		tmp = t_1;
    	} else if (B <= -8.2e-269) {
    		tmp = t_0;
    	} else if (B <= 1.8e-308) {
    		tmp = t_1;
    	} else if (B <= 4.8e-270) {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	} else if (B <= 5.5e-249) {
    		tmp = t_0;
    	} else if (B <= 2.05e-165) {
    		tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	t_1 = (180.0 * math.atan((C / B))) / math.pi
    	tmp = 0
    	if B <= -1.7e+16:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -1.6e-58:
    		tmp = (180.0 * math.atan((-A / B))) / math.pi
    	elif B <= -1.02e-190:
    		tmp = t_1
    	elif B <= -8.2e-269:
    		tmp = t_0
    	elif B <= 1.8e-308:
    		tmp = t_1
    	elif B <= 4.8e-270:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	elif B <= 5.5e-249:
    		tmp = t_0
    	elif B <= 2.05e-165:
    		tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi))
    	t_1 = Float64(Float64(180.0 * atan(Float64(C / B))) / pi)
    	tmp = 0.0
    	if (B <= -1.7e+16)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -1.6e-58)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi);
    	elseif (B <= -1.02e-190)
    		tmp = t_1;
    	elseif (B <= -8.2e-269)
    		tmp = t_0;
    	elseif (B <= 1.8e-308)
    		tmp = t_1;
    	elseif (B <= 4.8e-270)
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
    	elseif (B <= 5.5e-249)
    		tmp = t_0;
    	elseif (B <= 2.05e-165)
    		tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((0.0 / B)) / pi);
    	t_1 = (180.0 * atan((C / B))) / pi;
    	tmp = 0.0;
    	if (B <= -1.7e+16)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -1.6e-58)
    		tmp = (180.0 * atan((-A / B))) / pi;
    	elseif (B <= -1.02e-190)
    		tmp = t_1;
    	elseif (B <= -8.2e-269)
    		tmp = t_0;
    	elseif (B <= 1.8e-308)
    		tmp = t_1;
    	elseif (B <= 4.8e-270)
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	elseif (B <= 5.5e-249)
    		tmp = t_0;
    	elseif (B <= 2.05e-165)
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / pi);
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -1.7e+16], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.6e-58], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -1.02e-190], t$95$1, If[LessEqual[B, -8.2e-269], t$95$0, If[LessEqual[B, 1.8e-308], t$95$1, If[LessEqual[B, 4.8e-270], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.5e-249], t$95$0, If[LessEqual[B, 2.05e-165], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -1.7 \cdot 10^{+16}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -1.6 \cdot 10^{-58}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -1.02 \cdot 10^{-190}:\\
    \;\;\;\;t_1\\
    
    \mathbf{elif}\;B \leq -8.2 \cdot 10^{-269}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;B \leq 1.8 \cdot 10^{-308}:\\
    \;\;\;\;t_1\\
    
    \mathbf{elif}\;B \leq 4.8 \cdot 10^{-270}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 5.5 \cdot 10^{-249}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;B \leq 2.05 \cdot 10^{-165}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 7 regimes
    2. if B < -1.7e16

      1. Initial program 50.8%

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

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

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

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

      if -1.7e16 < B < -1.6e-58

      1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

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

      if -1.6e-58 < B < -1.02e-190 or -8.2000000000000006e-269 < B < 1.7999999999999999e-308

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

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

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

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

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

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

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

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

      if -1.02e-190 < B < -8.2000000000000006e-269 or 4.80000000000000003e-270 < B < 5.49999999999999999e-249

      1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

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

      if 1.7999999999999999e-308 < B < 4.80000000000000003e-270

      1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.49999999999999999e-249 < B < 2.0500000000000001e-165

      1. Initial program 52.7%

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

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

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

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

      if 2.0500000000000001e-165 < B

      1. Initial program 51.7%

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.7 \cdot 10^{+16}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-58}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.02 \cdot 10^{-190}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -8.2 \cdot 10^{-269}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-308}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-270}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{-249}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.05 \cdot 10^{-165}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 46.7% accurate, 2.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -5 \cdot 10^{+16}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.6 \cdot 10^{-58}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -9 \cdot 10^{-188}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.55 \cdot 10^{-265}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-308}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-270}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{-248}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-166}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
       (if (<= B -5e+16)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -2.6e-58)
           (/ (* 180.0 (atan (/ (- A) B))) PI)
           (if (<= B -9e-188)
             (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
             (if (<= B -1.55e-265)
               t_0
               (if (<= B 1.8e-308)
                 (/ (* 180.0 (atan (/ C B))) PI)
                 (if (<= B 3.8e-270)
                   (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
                   (if (<= B 1.4e-248)
                     t_0
                     (if (<= B 2.5e-166)
                       (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
                       (* 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 tmp;
    	if (B <= -5e+16) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -2.6e-58) {
    		tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
    	} else if (B <= -9e-188) {
    		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
    	} else if (B <= -1.55e-265) {
    		tmp = t_0;
    	} else if (B <= 1.8e-308) {
    		tmp = (180.0 * atan((C / B))) / ((double) M_PI);
    	} else if (B <= 3.8e-270) {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	} else if (B <= 1.4e-248) {
    		tmp = t_0;
    	} else if (B <= 2.5e-166) {
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	double tmp;
    	if (B <= -5e+16) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -2.6e-58) {
    		tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
    	} else if (B <= -9e-188) {
    		tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
    	} else if (B <= -1.55e-265) {
    		tmp = t_0;
    	} else if (B <= 1.8e-308) {
    		tmp = (180.0 * Math.atan((C / B))) / Math.PI;
    	} else if (B <= 3.8e-270) {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	} else if (B <= 1.4e-248) {
    		tmp = t_0;
    	} else if (B <= 2.5e-166) {
    		tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	tmp = 0
    	if B <= -5e+16:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -2.6e-58:
    		tmp = (180.0 * math.atan((-A / B))) / math.pi
    	elif B <= -9e-188:
    		tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
    	elif B <= -1.55e-265:
    		tmp = t_0
    	elif B <= 1.8e-308:
    		tmp = (180.0 * math.atan((C / B))) / math.pi
    	elif B <= 3.8e-270:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	elif B <= 1.4e-248:
    		tmp = t_0
    	elif B <= 2.5e-166:
    		tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi))
    	tmp = 0.0
    	if (B <= -5e+16)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -2.6e-58)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi);
    	elseif (B <= -9e-188)
    		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
    	elseif (B <= -1.55e-265)
    		tmp = t_0;
    	elseif (B <= 1.8e-308)
    		tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi);
    	elseif (B <= 3.8e-270)
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
    	elseif (B <= 1.4e-248)
    		tmp = t_0;
    	elseif (B <= 2.5e-166)
    		tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((0.0 / B)) / pi);
    	tmp = 0.0;
    	if (B <= -5e+16)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -2.6e-58)
    		tmp = (180.0 * atan((-A / B))) / pi;
    	elseif (B <= -9e-188)
    		tmp = 180.0 * (atan((2.0 * (C / B))) / pi);
    	elseif (B <= -1.55e-265)
    		tmp = t_0;
    	elseif (B <= 1.8e-308)
    		tmp = (180.0 * atan((C / B))) / pi;
    	elseif (B <= 3.8e-270)
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	elseif (B <= 1.4e-248)
    		tmp = t_0;
    	elseif (B <= 2.5e-166)
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / pi);
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5e+16], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.6e-58], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -9e-188], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.55e-265], t$95$0, If[LessEqual[B, 1.8e-308], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 3.8e-270], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e-248], t$95$0, If[LessEqual[B, 2.5e-166], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -5 \cdot 10^{+16}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -2.6 \cdot 10^{-58}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -9 \cdot 10^{-188}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -1.55 \cdot 10^{-265}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;B \leq 1.8 \cdot 10^{-308}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 3.8 \cdot 10^{-270}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.4 \cdot 10^{-248}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;B \leq 2.5 \cdot 10^{-166}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 8 regimes
    2. if B < -5e16

      1. Initial program 50.8%

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

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

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

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

      if -5e16 < B < -2.60000000000000007e-58

      1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

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

      if -2.60000000000000007e-58 < B < -8.99999999999999986e-188

      1. Initial program 61.7%

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

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

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

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

      if -8.99999999999999986e-188 < B < -1.54999999999999994e-265 or 3.80000000000000041e-270 < B < 1.40000000000000005e-248

      1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

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

      if -1.54999999999999994e-265 < B < 1.7999999999999999e-308

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

      if 1.7999999999999999e-308 < B < 3.80000000000000041e-270

      1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.40000000000000005e-248 < B < 2.5e-166

      1. Initial program 52.7%

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

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

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

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

      if 2.5e-166 < B

      1. Initial program 51.7%

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5 \cdot 10^{+16}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.6 \cdot 10^{-58}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -9 \cdot 10^{-188}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.55 \cdot 10^{-265}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-308}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-270}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{-248}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-166}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 54.4% accurate, 3.0× speedup?

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

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

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

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

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

      if -3.2e7 < A < 1.29999999999999992e-218 or 5.2000000000000002e-168 < A < 1.59999999999999994e-104 or 1.5000000000000001e-70 < A < 8.9999999999999995e164

      1. Initial program 63.5%

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.29999999999999992e-218 < A < 5.2000000000000002e-168 or 1.59999999999999994e-104 < A < 1.5000000000000001e-70

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 8.9999999999999995e164 < A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -32000000:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.3 \cdot 10^{-218}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5.2 \cdot 10^{-168}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.6 \cdot 10^{-104}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.5 \cdot 10^{-70}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 9 \cdot 10^{+164}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 46.5% accurate, 3.1× speedup?

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

      1. Initial program 50.8%

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

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

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

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

      if -2.2e16 < B < -1e-58

      1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

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

      if -1e-58 < B < -2.5999999999999998e-190

      1. Initial program 61.7%

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

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

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

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

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

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

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

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

      if -2.5999999999999998e-190 < B < 3.94999999999999993e-250

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right)}}{\pi} \]
      6. Step-by-step derivation
        1. associate-*r/53.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-in53.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-eval53.0%

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

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

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

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

      if 3.94999999999999993e-250 < B < 3.3999999999999997e-167

      1. Initial program 52.7%

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

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

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

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

      if 3.3999999999999997e-167 < B

      1. Initial program 51.7%

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.2 \cdot 10^{+16}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1 \cdot 10^{-58}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.6 \cdot 10^{-190}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.95 \cdot 10^{-250}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.4 \cdot 10^{-167}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 51.1% accurate, 3.1× speedup?

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

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

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

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

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

      if -5.3999999999999999e-92 < A < 2.5000000000000001e-237

      1. Initial program 62.3%

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

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

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

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

      if 2.5000000000000001e-237 < A < 2.0499999999999999e-100 or 1.5000000000000001e-70 < A < 2.3999999999999999e78

      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. Step-by-step derivation
        1. associate-*r/65.9%

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

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

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

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

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

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

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

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

      if 2.0499999999999999e-100 < A < 1.5000000000000001e-70

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.3999999999999999e78 < A

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.4 \cdot 10^{-92}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.5 \cdot 10^{-237}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 2.05 \cdot 10^{-100}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.5 \cdot 10^{-70}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.4 \cdot 10^{+78}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 46.5% accurate, 3.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.4 \cdot 10^{+16}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.8 \cdot 10^{-58}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -1.4 \cdot 10^{-187}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-248}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-166}:\\ \;\;\;\;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 (/ (- A) B))) PI)))
       (if (<= B -1.4e+16)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -3.8e-58)
           t_0
           (if (<= B -1.4e-187)
             (/ (* 180.0 (atan (/ C B))) PI)
             (if (<= B 1.05e-248)
               (* 180.0 (/ (atan (/ 0.0 B)) PI))
               (if (<= B 3.1e-166) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = (180.0 * atan((-A / B))) / ((double) M_PI);
    	double tmp;
    	if (B <= -1.4e+16) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -3.8e-58) {
    		tmp = t_0;
    	} else if (B <= -1.4e-187) {
    		tmp = (180.0 * atan((C / B))) / ((double) M_PI);
    	} else if (B <= 1.05e-248) {
    		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	} else if (B <= 3.1e-166) {
    		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((-A / B))) / Math.PI;
    	double tmp;
    	if (B <= -1.4e+16) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -3.8e-58) {
    		tmp = t_0;
    	} else if (B <= -1.4e-187) {
    		tmp = (180.0 * Math.atan((C / B))) / Math.PI;
    	} else if (B <= 1.05e-248) {
    		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	} else if (B <= 3.1e-166) {
    		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((-A / B))) / math.pi
    	tmp = 0
    	if B <= -1.4e+16:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -3.8e-58:
    		tmp = t_0
    	elif B <= -1.4e-187:
    		tmp = (180.0 * math.atan((C / B))) / math.pi
    	elif B <= 1.05e-248:
    		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	elif B <= 3.1e-166:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi)
    	tmp = 0.0
    	if (B <= -1.4e+16)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -3.8e-58)
    		tmp = t_0;
    	elseif (B <= -1.4e-187)
    		tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi);
    	elseif (B <= 1.05e-248)
    		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
    	elseif (B <= 3.1e-166)
    		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((-A / B))) / pi;
    	tmp = 0.0;
    	if (B <= -1.4e+16)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -3.8e-58)
    		tmp = t_0;
    	elseif (B <= -1.4e-187)
    		tmp = (180.0 * atan((C / B))) / pi;
    	elseif (B <= 1.05e-248)
    		tmp = 180.0 * (atan((0.0 / B)) / pi);
    	elseif (B <= 3.1e-166)
    		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[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -1.4e+16], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.8e-58], t$95$0, If[LessEqual[B, -1.4e-187], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.05e-248], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-166], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -1.4 \cdot 10^{+16}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -3.8 \cdot 10^{-58}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;B \leq -1.4 \cdot 10^{-187}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.05 \cdot 10^{-248}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 3.1 \cdot 10^{-166}:\\
    \;\;\;\;t_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if B < -1.4e16

      1. Initial program 50.8%

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

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

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

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

      if -1.4e16 < B < -3.7999999999999997e-58 or 1.05e-248 < B < 3.09999999999999984e-166

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

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

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

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

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

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

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

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

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

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

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

      if -3.7999999999999997e-58 < B < -1.4e-187

      1. Initial program 61.7%

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

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

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

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

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

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

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

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

      if -1.4e-187 < B < 1.05e-248

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right)}}{\pi} \]
      6. Step-by-step derivation
        1. associate-*r/53.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-in53.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-eval53.0%

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

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

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

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

      if 3.09999999999999984e-166 < B

      1. Initial program 51.7%

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

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

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

        \[\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 -1.4 \cdot 10^{+16}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.8 \cdot 10^{-58}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.4 \cdot 10^{-187}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-248}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-166}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 60.3% accurate, 3.2× speedup?

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

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

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

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

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

      if -1.5e7 < A < 2.5000000000000001e-219 or 6.2e-168 < A < 4.39999999999999989e-106

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.5000000000000001e-219 < A < 6.2e-168

      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. Step-by-step derivation
        1. associate-*r/42.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.39999999999999989e-106 < A

      1. Initial program 78.2%

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -15000000:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.5 \cdot 10^{-219}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 6.2 \cdot 10^{-168}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.4 \cdot 10^{-106}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 14: 60.3% accurate, 3.2× speedup?

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

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

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

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

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

      if -9.2e8 < A < 3.80000000000000025e-219 or 5.2000000000000002e-168 < A < 1.8200000000000001e-109

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.80000000000000025e-219 < A < 5.2000000000000002e-168

      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. Step-by-step derivation
        1. associate-*r/42.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.8200000000000001e-109 < A

      1. Initial program 78.2%

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

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

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

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

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

    Alternative 15: 47.9% accurate, 3.2× speedup?

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

      1. Initial program 31.3%

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

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

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

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

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

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

      if -4.3e-91 < A < 5.99999999999999975e-234 or 5.4999999999999999e-168 < A < 8.39999999999999969e-76

      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. Step-by-step derivation
        1. associate--l-60.8%

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

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

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

      if 5.99999999999999975e-234 < A < 5.4999999999999999e-168

      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. Step-by-step derivation
        1. associate-*r/56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 8.39999999999999969e-76 < A

      1. Initial program 82.8%

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.3 \cdot 10^{-91}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 6 \cdot 10^{-234}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 5.5 \cdot 10^{-168}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 8.4 \cdot 10^{-76}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 16: 47.9% accurate, 3.2× speedup?

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

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

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

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

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

      if -3.1000000000000001e-92 < A < 7.79999999999999939e-235 or 1.00000000000000004e-166 < A < 1.8999999999999999e-77

      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. Step-by-step derivation
        1. associate--l-60.8%

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

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

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

      if 7.79999999999999939e-235 < A < 1.00000000000000004e-166

      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. Step-by-step derivation
        1. associate-*r/56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.8999999999999999e-77 < A

      1. Initial program 82.8%

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

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

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

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

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

    Alternative 17: 47.9% accurate, 3.2× speedup?

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

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

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

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

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

      if -7.5000000000000005e-92 < A < 1.04999999999999996e-234 or 6.9999999999999998e-167 < A < 2.0499999999999999e-76

      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. Step-by-step derivation
        1. associate--l-60.8%

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

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

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

      if 1.04999999999999996e-234 < A < 6.9999999999999998e-167

      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. Step-by-step derivation
        1. associate-*r/56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.0499999999999999e-76 < A

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7.5 \cdot 10^{-92}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.05 \cdot 10^{-234}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 7 \cdot 10^{-167}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.05 \cdot 10^{-76}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 18: 46.6% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -3.5 \cdot 10^{-46}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4.4 \cdot 10^{-189}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{-98}:\\ \;\;\;\;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.5e-46)
       (* 180.0 (/ (atan 1.0) PI))
       (if (<= B -4.4e-189)
         (/ (* 180.0 (atan (/ C B))) PI)
         (if (<= B 2.4e-98)
           (* 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.5e-46) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -4.4e-189) {
    		tmp = (180.0 * atan((C / B))) / ((double) M_PI);
    	} else if (B <= 2.4e-98) {
    		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.5e-46) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -4.4e-189) {
    		tmp = (180.0 * Math.atan((C / B))) / Math.PI;
    	} else if (B <= 2.4e-98) {
    		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.5e-46:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -4.4e-189:
    		tmp = (180.0 * math.atan((C / B))) / math.pi
    	elif B <= 2.4e-98:
    		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.5e-46)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -4.4e-189)
    		tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi);
    	elseif (B <= 2.4e-98)
    		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.5e-46)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -4.4e-189)
    		tmp = (180.0 * atan((C / B))) / pi;
    	elseif (B <= 2.4e-98)
    		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.5e-46], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.4e-189], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2.4e-98], 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.5 \cdot 10^{-46}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -4.4 \cdot 10^{-189}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 2.4 \cdot 10^{-98}:\\
    \;\;\;\;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 < -3.5000000000000002e-46

      1. Initial program 58.3%

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

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

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

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

      if -3.5000000000000002e-46 < B < -4.40000000000000038e-189

      1. Initial program 64.5%

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

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

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

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

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

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

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

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

      if -4.40000000000000038e-189 < B < 2.40000000000000005e-98

      1. Initial program 53.3%

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

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

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

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

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

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

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

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

      if 2.40000000000000005e-98 < B

      1. Initial program 55.3%

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.5 \cdot 10^{-46}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4.4 \cdot 10^{-189}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{-98}:\\ \;\;\;\;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 19: 45.5% accurate, 3.6× speedup?

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

      1. Initial program 61.1%

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

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

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

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

      if -5.5000000000000003e-118 < B < 4.8000000000000001e-98

      1. Initial program 53.7%

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

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

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

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

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

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

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

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

      if 4.8000000000000001e-98 < B

      1. Initial program 55.3%

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.5 \cdot 10^{-118}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-98}:\\ \;\;\;\;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 20: 61.5% accurate, 3.6× speedup?

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

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

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

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

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

      if -5.5e7 < A

      1. Initial program 66.5%

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

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

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

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

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

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

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

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

    Alternative 21: 40.7% accurate, 3.8× speedup?

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

      1. Initial program 61.4%

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

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

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

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

      if -4.999999999999985e-310 < B

      1. Initial program 52.9%

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

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

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

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

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

    Alternative 22: 21.3% accurate, 4.0× speedup?

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

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

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

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

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

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

    Reproduce

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