ABCF->ab-angle angle

Percentage Accurate: 56.5% → 81.7%
Time: 23.0s
Alternatives: 15
Speedup: 3.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 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: 56.5% 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: 81.7% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 18.1%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\right)\right)} \]
      2. expm1-udef39.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\right)} - 1} \]
      3. associate-/l*39.6%

        \[\leadsto e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0.5}{\frac{A}{B}}\right)}}{\pi}\right)} - 1 \]
    7. Applied egg-rr39.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)}{\pi}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5e119 < A

    1. Initial program 65.2%

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

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

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

    Alternative 2: 78.5% accurate, 1.9× speedup?

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

      1. Initial program 18.1%

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\right)\right)} \]
        2. expm1-udef39.6%

          \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\right)} - 1} \]
        3. associate-/l*39.6%

          \[\leadsto e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0.5}{\frac{A}{B}}\right)}}{\pi}\right)} - 1 \]
      7. Applied egg-rr39.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)}{\pi}\right)} - 1} \]
      8. Step-by-step derivation
        1. expm1-def80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.8000000000000002e125 < A < 1.5e57

      1. Initial program 59.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.5e57 < A

      1. Initial program 80.9%

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

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

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

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

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

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

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

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

        \[\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.8 \cdot 10^{+125}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;A \leq 1.5 \cdot 10^{+57}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\ \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: 76.8% accurate, 1.9× speedup?

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

      1. Initial program 18.1%

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\right)\right)} \]
        2. expm1-udef39.6%

          \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\right)} - 1} \]
        3. associate-/l*39.6%

          \[\leadsto e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0.5}{\frac{A}{B}}\right)}}{\pi}\right)} - 1 \]
      7. Applied egg-rr39.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)}{\pi}\right)} - 1} \]
      8. Step-by-step derivation
        1. expm1-def80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.49999999999999971e131 < A < 1.1e61

      1. Initial program 59.8%

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

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

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

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

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

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

      if 1.1e61 < A

      1. Initial program 80.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. Simplified96.5%

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

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

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

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

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

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

      Alternative 4: 76.7% accurate, 1.9× speedup?

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

        1. Initial program 18.1%

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

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

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

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

            \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\right)\right)} \]
          2. expm1-udef39.6%

            \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\right)} - 1} \]
          3. associate-/l*39.6%

            \[\leadsto e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0.5}{\frac{A}{B}}\right)}}{\pi}\right)} - 1 \]
        7. Applied egg-rr39.6%

          \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)}{\pi}\right)} - 1} \]
        8. Step-by-step derivation
          1. expm1-def80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -2.8e124 < A < 7.0000000000000004e60

        1. Initial program 59.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 7.0000000000000004e60 < A

        1. Initial program 80.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. Simplified96.5%

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

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

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

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

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

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

        Alternative 5: 45.4% accurate, 3.1× speedup?

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

          1. Initial program 82.1%

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

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

          if -7.5000000000000005e39 < C < -2.0999999999999999e-32 or -3.8000000000000001e-121 < C < -1.45e-252

          1. Initial program 64.2%

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

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

          if -2.0999999999999999e-32 < C < -3.8000000000000001e-121

          1. Initial program 72.5%

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

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

          if -1.45e-252 < C < 4.59999999999999983e-203

          1. Initial program 59.5%

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

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

          if 4.59999999999999983e-203 < C

          1. Initial program 38.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -7.5 \cdot 10^{+39}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -2.1 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq -3.8 \cdot 10^{-121}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -1.45 \cdot 10^{-252}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq 4.6 \cdot 10^{-203}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 6: 46.9% accurate, 3.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -5.2 \cdot 10^{-28}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.3 \cdot 10^{-169}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 3.55 \cdot 10^{-71}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{+15}:\\ \;\;\;\;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 (* -2.0 (/ A B))) PI))))
           (if (<= B -5.2e-28)
             (* 180.0 (/ (atan 1.0) PI))
             (if (<= B -1.3e-169)
               t_0
               (if (<= B 3.55e-71)
                 (* 180.0 (/ (atan (/ 0.0 B)) PI))
                 (if (<= B 1.25e+15) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
        double code(double A, double B, double C) {
        	double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
        	double tmp;
        	if (B <= -5.2e-28) {
        		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
        	} else if (B <= -1.3e-169) {
        		tmp = t_0;
        	} else if (B <= 3.55e-71) {
        		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
        	} else if (B <= 1.25e+15) {
        		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((-2.0 * (A / B))) / Math.PI);
        	double tmp;
        	if (B <= -5.2e-28) {
        		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
        	} else if (B <= -1.3e-169) {
        		tmp = t_0;
        	} else if (B <= 3.55e-71) {
        		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
        	} else if (B <= 1.25e+15) {
        		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((-2.0 * (A / B))) / math.pi)
        	tmp = 0
        	if B <= -5.2e-28:
        		tmp = 180.0 * (math.atan(1.0) / math.pi)
        	elif B <= -1.3e-169:
        		tmp = t_0
        	elif B <= 3.55e-71:
        		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
        	elif B <= 1.25e+15:
        		tmp = t_0
        	else:
        		tmp = 180.0 * (math.atan(-1.0) / math.pi)
        	return tmp
        
        function code(A, B, C)
        	t_0 = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi))
        	tmp = 0.0
        	if (B <= -5.2e-28)
        		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
        	elseif (B <= -1.3e-169)
        		tmp = t_0;
        	elseif (B <= 3.55e-71)
        		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
        	elseif (B <= 1.25e+15)
        		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((-2.0 * (A / B))) / pi);
        	tmp = 0.0;
        	if (B <= -5.2e-28)
        		tmp = 180.0 * (atan(1.0) / pi);
        	elseif (B <= -1.3e-169)
        		tmp = t_0;
        	elseif (B <= 3.55e-71)
        		tmp = 180.0 * (atan((0.0 / B)) / pi);
        	elseif (B <= 1.25e+15)
        		tmp = t_0;
        	else
        		tmp = 180.0 * (atan(-1.0) / pi);
        	end
        	tmp_2 = tmp;
        end
        
        code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.2e-28], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.3e-169], t$95$0, If[LessEqual[B, 3.55e-71], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.25e+15], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
        \mathbf{if}\;B \leq -5.2 \cdot 10^{-28}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
        
        \mathbf{elif}\;B \leq -1.3 \cdot 10^{-169}:\\
        \;\;\;\;t_0\\
        
        \mathbf{elif}\;B \leq 3.55 \cdot 10^{-71}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
        
        \mathbf{elif}\;B \leq 1.25 \cdot 10^{+15}:\\
        \;\;\;\;t_0\\
        
        \mathbf{else}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if B < -5.2e-28

          1. Initial program 44.5%

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

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

          if -5.2e-28 < B < -1.30000000000000007e-169 or 3.55000000000000004e-71 < B < 1.25e15

          1. Initial program 68.5%

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

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

          if -1.30000000000000007e-169 < B < 3.55000000000000004e-71

          1. Initial program 63.5%

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

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

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

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

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

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

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

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

          if 1.25e15 < B

          1. Initial program 53.5%

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.2 \cdot 10^{-28}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.3 \cdot 10^{-169}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.55 \cdot 10^{-71}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{+15}:\\ \;\;\;\;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 7: 47.1% accurate, 3.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -6.2 \cdot 10^{-51}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-198}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.55 \cdot 10^{-71}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.02 \cdot 10^{+15}:\\ \;\;\;\;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 -6.2e-51)
           (* 180.0 (/ (atan 1.0) PI))
           (if (<= B -8.5e-198)
             (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
             (if (<= B 1.55e-71)
               (* 180.0 (/ (atan (/ 0.0 B)) PI))
               (if (<= B 1.02e+15)
                 (* 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 <= -6.2e-51) {
        		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
        	} else if (B <= -8.5e-198) {
        		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
        	} else if (B <= 1.55e-71) {
        		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
        	} else if (B <= 1.02e+15) {
        		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 <= -6.2e-51) {
        		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
        	} else if (B <= -8.5e-198) {
        		tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
        	} else if (B <= 1.55e-71) {
        		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
        	} else if (B <= 1.02e+15) {
        		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 <= -6.2e-51:
        		tmp = 180.0 * (math.atan(1.0) / math.pi)
        	elif B <= -8.5e-198:
        		tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
        	elif B <= 1.55e-71:
        		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
        	elif B <= 1.02e+15:
        		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 <= -6.2e-51)
        		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
        	elseif (B <= -8.5e-198)
        		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
        	elseif (B <= 1.55e-71)
        		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
        	elseif (B <= 1.02e+15)
        		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 <= -6.2e-51)
        		tmp = 180.0 * (atan(1.0) / pi);
        	elseif (B <= -8.5e-198)
        		tmp = 180.0 * (atan((2.0 * (C / B))) / pi);
        	elseif (B <= 1.55e-71)
        		tmp = 180.0 * (atan((0.0 / B)) / pi);
        	elseif (B <= 1.02e+15)
        		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, -6.2e-51], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.5e-198], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.55e-71], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.02e+15], 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 -6.2 \cdot 10^{-51}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
        
        \mathbf{elif}\;B \leq -8.5 \cdot 10^{-198}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
        
        \mathbf{elif}\;B \leq 1.55 \cdot 10^{-71}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
        
        \mathbf{elif}\;B \leq 1.02 \cdot 10^{+15}:\\
        \;\;\;\;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 5 regimes
        2. if B < -6.1999999999999995e-51

          1. Initial program 46.1%

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

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

          if -6.1999999999999995e-51 < B < -8.4999999999999994e-198

          1. Initial program 69.7%

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

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

          if -8.4999999999999994e-198 < B < 1.55000000000000001e-71

          1. Initial program 63.7%

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

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

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

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

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

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

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

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

          if 1.55000000000000001e-71 < B < 1.02e15

          1. Initial program 67.8%

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

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

          if 1.02e15 < B

          1. Initial program 53.5%

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.2 \cdot 10^{-51}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-198}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.55 \cdot 10^{-71}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.02 \cdot 10^{+15}:\\ \;\;\;\;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: 61.1% accurate, 3.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -2.6 \cdot 10^{-21}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-198} \lor \neg \left(B \leq 3.2 \cdot 10^{-228}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \end{array} \end{array} \]
        (FPCore (A B C)
         :precision binary64
         (if (<= B -2.6e-21)
           (* (/ 180.0 PI) (atan (/ (+ B C) B)))
           (if (or (<= B -8.5e-198) (not (<= B 3.2e-228)))
             (* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))
             (* 180.0 (/ (atan (/ 0.0 B)) PI)))))
        double code(double A, double B, double C) {
        	double tmp;
        	if (B <= -2.6e-21) {
        		tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
        	} else if ((B <= -8.5e-198) || !(B <= 3.2e-228)) {
        		tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
        	} else {
        		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
        	}
        	return tmp;
        }
        
        public static double code(double A, double B, double C) {
        	double tmp;
        	if (B <= -2.6e-21) {
        		tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
        	} else if ((B <= -8.5e-198) || !(B <= 3.2e-228)) {
        		tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
        	} else {
        		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
        	}
        	return tmp;
        }
        
        def code(A, B, C):
        	tmp = 0
        	if B <= -2.6e-21:
        		tmp = (180.0 / math.pi) * math.atan(((B + C) / B))
        	elif (B <= -8.5e-198) or not (B <= 3.2e-228):
        		tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi)
        	else:
        		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
        	return tmp
        
        function code(A, B, C)
        	tmp = 0.0
        	if (B <= -2.6e-21)
        		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B)));
        	elseif ((B <= -8.5e-198) || !(B <= 3.2e-228))
        		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi));
        	else
        		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
        	end
        	return tmp
        end
        
        function tmp_2 = code(A, B, C)
        	tmp = 0.0;
        	if (B <= -2.6e-21)
        		tmp = (180.0 / pi) * atan(((B + C) / B));
        	elseif ((B <= -8.5e-198) || ~((B <= 3.2e-228)))
        		tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi);
        	else
        		tmp = 180.0 * (atan((0.0 / B)) / pi);
        	end
        	tmp_2 = tmp;
        end
        
        code[A_, B_, C_] := If[LessEqual[B, -2.6e-21], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, -8.5e-198], N[Not[LessEqual[B, 3.2e-228]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;B \leq -2.6 \cdot 10^{-21}:\\
        \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
        
        \mathbf{elif}\;B \leq -8.5 \cdot 10^{-198} \lor \neg \left(B \leq 3.2 \cdot 10^{-228}\right):\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
        
        \mathbf{else}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -2.60000000000000017e-21

          1. Initial program 44.5%

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}{\pi} \]
          6. Step-by-step derivation
            1. expm1-log1p-u64.3%

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

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

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

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

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

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

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

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

          if -2.60000000000000017e-21 < B < -8.4999999999999994e-198 or 3.20000000000000022e-228 < B

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

              \[\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. Taylor expanded in B around inf 71.6%

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

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

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

            if -8.4999999999999994e-198 < B < 3.20000000000000022e-228

            1. Initial program 59.3%

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.6 \cdot 10^{-21}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-198} \lor \neg \left(B \leq 3.2 \cdot 10^{-228}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 9: 50.7% accurate, 3.4× speedup?

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

            1. Initial program 74.0%

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

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

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

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

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

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

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

            if -2.7000000000000001e-123 < C < -4.0000000000000003e-253

            1. Initial program 80.0%

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

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

            if -4.0000000000000003e-253 < C < 6.29999999999999992e-204

            1. Initial program 59.5%

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

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

            if 6.29999999999999992e-204 < C

            1. Initial program 38.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -2.7 \cdot 10^{-123}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -4 \cdot 10^{-253}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq 6.3 \cdot 10^{-204}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 10: 64.6% accurate, 3.5× speedup?

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

            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. Simplified71.8%

                \[\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. Taylor expanded in B around -inf 66.7%

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

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

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

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

              if -8.4999999999999994e-198 < B < 4.99999999999999998e-244

              1. Initial program 59.3%

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

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

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

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

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

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

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

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

              if 4.99999999999999998e-244 < B

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

                  \[\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. Taylor expanded in B around inf 75.9%

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

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

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

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

              Alternative 11: 55.3% accurate, 3.5× speedup?

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

                1. Initial program 24.2%

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

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

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

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

                if -1.8e71 < A < 0.021499999999999998

                1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

                if 0.021499999999999998 < A

                1. Initial program 77.9%

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

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

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

              Alternative 12: 55.4% accurate, 3.5× speedup?

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

                1. Initial program 25.2%

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

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0.5 \cdot B}{A}\right)}}{\pi} \]
                6. Step-by-step derivation
                  1. expm1-log1p-u69.4%

                    \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\right)\right)} \]
                  2. expm1-udef38.0%

                    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\right)} - 1} \]
                  3. associate-/l*38.0%

                    \[\leadsto e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0.5}{\frac{A}{B}}\right)}}{\pi}\right)} - 1 \]
                7. Applied egg-rr38.0%

                  \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)}{\pi}\right)} - 1} \]
                8. Step-by-step derivation
                  1. expm1-def69.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -4.0500000000000001e68 < A < 400

                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. Taylor expanded in A around 0 58.8%

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

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

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

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

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

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

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

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

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

                if 400 < A

                1. Initial program 77.9%

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

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

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

              Alternative 13: 46.8% accurate, 3.6× speedup?

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

                1. Initial program 48.5%

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

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

                if -5.50000000000000026e-81 < B < 2.9000000000000002e-52

                1. Initial program 65.2%

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

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

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

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

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

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

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

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

                if 2.9000000000000002e-52 < B

                1. Initial program 56.2%

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.5 \cdot 10^{-81}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 2.9 \cdot 10^{-52}:\\ \;\;\;\;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 14: 39.8% accurate, 3.8× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -2 \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 -2e-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 <= -2e-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 <= -2e-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 <= -2e-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 <= -2e-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 <= -2e-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, -2e-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 -2 \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 < -1.999999999999994e-310

                1. Initial program 57.6%

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

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

                if -1.999999999999994e-310 < B

                1. Initial program 58.4%

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2 \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 15: 20.8% accurate, 4.0× speedup?

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

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

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

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

              Reproduce

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