ABCF->ab-angle angle

Percentage Accurate: 54.0% → 80.9%
Time: 23.5s
Alternatives: 20
Speedup: 3.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 54.0% accurate, 1.0× speedup?

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

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

Alternative 1: 80.9% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 19.6%

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

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

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

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

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

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

    if -3.4999999999999997e58 < A

    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. Step-by-step derivation
      1. Simplified85.0%

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

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

    Alternative 2: 74.1% accurate, 1.9× speedup?

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

      1. Initial program 85.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 93.6%

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

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

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

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

      if -4.59999999999999999e137 < C < 1.05e26

      1. Initial program 56.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.05e26 < C

      1. Initial program 22.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 74.1% accurate, 1.9× speedup?

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

      1. Initial program 85.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 93.6%

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

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

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

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

      if -3.79999999999999963e137 < C < 1.05e26

      1. Initial program 56.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180 \cdot \left(-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)\right)}{\pi}} \]
      13. Step-by-step derivation
        1. distribute-rgt-neg-out77.4%

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

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

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

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

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

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

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

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

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

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

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

      if 1.05e26 < C

      1. Initial program 22.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 80.7% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 8.99999999999999995e122 < C

      1. Initial program 16.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 80.6% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

      if 5.3000000000000002e116 < C

      1. Initial program 16.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 47.2% accurate, 3.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{if}\;A \leq -3.3 \cdot 10^{+41}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;A \leq -2.55 \cdot 10^{-77}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.45 \cdot 10^{-131}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;A \leq -3.5 \cdot 10^{-250}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 3.5 \cdot 10^{-195}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.7 \cdot 10^{-127}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\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
     (let* ((t_0 (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))))
       (if (<= A -3.3e+41)
         t_0
         (if (<= A -2.55e-77)
           (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
           (if (<= A -1.45e-131)
             t_0
             (if (<= A -3.5e-250)
               (* 180.0 (/ (atan -1.0) PI))
               (if (<= A 3.5e-195)
                 (* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
                 (if (<= A 1.7e-127)
                   (* 180.0 (/ (atan 1.0) PI))
                   (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
    	double tmp;
    	if (A <= -3.3e+41) {
    		tmp = t_0;
    	} else if (A <= -2.55e-77) {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	} else if (A <= -1.45e-131) {
    		tmp = t_0;
    	} else if (A <= -3.5e-250) {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	} else if (A <= 3.5e-195) {
    		tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
    	} else if (A <= 1.7e-127) {
    		tmp = 180.0 * (atan(1.0) / ((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 t_0 = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
    	double tmp;
    	if (A <= -3.3e+41) {
    		tmp = t_0;
    	} else if (A <= -2.55e-77) {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	} else if (A <= -1.45e-131) {
    		tmp = t_0;
    	} else if (A <= -3.5e-250) {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	} else if (A <= 3.5e-195) {
    		tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
    	} else if (A <= 1.7e-127) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else {
    		tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
    	tmp = 0
    	if A <= -3.3e+41:
    		tmp = t_0
    	elif A <= -2.55e-77:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	elif A <= -1.45e-131:
    		tmp = t_0
    	elif A <= -3.5e-250:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	elif A <= 3.5e-195:
    		tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi)
    	elif A <= 1.7e-127:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	else:
    		tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi))
    	tmp = 0.0
    	if (A <= -3.3e+41)
    		tmp = t_0;
    	elseif (A <= -2.55e-77)
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
    	elseif (A <= -1.45e-131)
    		tmp = t_0;
    	elseif (A <= -3.5e-250)
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	elseif (A <= 3.5e-195)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi));
    	elseif (A <= 1.7e-127)
    		tmp = Float64(180.0 * Float64(atan(1.0) / 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)
    	t_0 = 180.0 * (atan((0.5 * (B / A))) / pi);
    	tmp = 0.0;
    	if (A <= -3.3e+41)
    		tmp = t_0;
    	elseif (A <= -2.55e-77)
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	elseif (A <= -1.45e-131)
    		tmp = t_0;
    	elseif (A <= -3.5e-250)
    		tmp = 180.0 * (atan(-1.0) / pi);
    	elseif (A <= 3.5e-195)
    		tmp = 180.0 * (atan(((C / B) * 2.0)) / pi);
    	elseif (A <= 1.7e-127)
    		tmp = 180.0 * (atan(1.0) / pi);
    	else
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.3e+41], t$95$0, If[LessEqual[A, -2.55e-77], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.45e-131], t$95$0, If[LessEqual[A, -3.5e-250], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.5e-195], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.7e-127], N[(180.0 * N[(N[ArcTan[1.0], $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}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
    \mathbf{if}\;A \leq -3.3 \cdot 10^{+41}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;A \leq -2.55 \cdot 10^{-77}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -1.45 \cdot 10^{-131}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;A \leq -3.5 \cdot 10^{-250}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    \mathbf{elif}\;A \leq 3.5 \cdot 10^{-195}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq 1.7 \cdot 10^{-127}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\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 6 regimes
    2. if A < -3.3e41 or -2.55000000000000016e-77 < A < -1.4500000000000001e-131

      1. Initial program 24.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 67.4%

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

      if -3.3e41 < A < -2.55000000000000016e-77

      1. Initial program 42.0%

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

        \[\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} \]
      4. Taylor expanded in A around inf 44.2%

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

      if -1.4500000000000001e-131 < A < -3.4999999999999999e-250

      1. Initial program 48.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 46.4%

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

      if -3.4999999999999999e-250 < A < 3.50000000000000014e-195

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

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

      if 3.50000000000000014e-195 < A < 1.6999999999999999e-127

      1. Initial program 46.3%

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

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

      if 1.6999999999999999e-127 < A

      1. Initial program 77.0%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.3 \cdot 10^{+41}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.55 \cdot 10^{-77}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.45 \cdot 10^{-131}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -3.5 \cdot 10^{-250}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 3.5 \cdot 10^{-195}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.7 \cdot 10^{-127}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 7: 63.3% accurate, 3.1× speedup?

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

      1. Initial program 56.3%

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

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

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

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

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

      if -2.2e-208 < B < -1.59999999999999999e-304

      1. Initial program 49.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.59999999999999999e-304 < B < 4.8e-278

      1. Initial program 100.0%

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

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

      if 4.8e-278 < B < 3.45000000000000012e-90

      1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \color{blue}{{\left(\frac{\pi}{-\tan^{-1} \left(\frac{-0.5 \cdot \mathsf{fma}\left(B, \frac{C}{A}, B\right)}{A}\right)}\right)}^{-1}} \]
      8. Step-by-step derivation
        1. unpow-162.3%

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

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

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

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

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

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

      if 3.45000000000000012e-90 < B

      1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.2 \cdot 10^{-208}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-304}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B} + -0.5 \cdot \frac{B + \frac{A \cdot B}{C}}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-278}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.45 \cdot 10^{-90}:\\ \;\;\;\;-180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B + \frac{C \cdot B}{A}}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 46.1% accurate, 3.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.3 \cdot 10^{-118}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.4 \cdot 10^{-210}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq -3 \cdot 10^{-301}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.75 \cdot 10^{-271}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.06 \cdot 10^{-21}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))))
       (if (<= B -1.3e-118)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -3.4e-210)
           t_0
           (if (<= B -3e-301)
             (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
             (if (<= B 1.75e-271)
               (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
               (if (<= B 1.06e-21) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
    	double tmp;
    	if (B <= -1.3e-118) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -3.4e-210) {
    		tmp = t_0;
    	} else if (B <= -3e-301) {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	} else if (B <= 1.75e-271) {
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
    	} else if (B <= 1.06e-21) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
    	double tmp;
    	if (B <= -1.3e-118) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -3.4e-210) {
    		tmp = t_0;
    	} else if (B <= -3e-301) {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	} else if (B <= 1.75e-271) {
    		tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
    	} else if (B <= 1.06e-21) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
    	tmp = 0
    	if B <= -1.3e-118:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -3.4e-210:
    		tmp = t_0
    	elif B <= -3e-301:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	elif B <= 1.75e-271:
    		tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
    	elif B <= 1.06e-21:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi))
    	tmp = 0.0
    	if (B <= -1.3e-118)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -3.4e-210)
    		tmp = t_0;
    	elseif (B <= -3e-301)
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
    	elseif (B <= 1.75e-271)
    		tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi));
    	elseif (B <= 1.06e-21)
    		tmp = t_0;
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((0.5 * (B / A))) / pi);
    	tmp = 0.0;
    	if (B <= -1.3e-118)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -3.4e-210)
    		tmp = t_0;
    	elseif (B <= -3e-301)
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	elseif (B <= 1.75e-271)
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / pi);
    	elseif (B <= 1.06e-21)
    		tmp = t_0;
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.3e-118], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.4e-210], t$95$0, If[LessEqual[B, -3e-301], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.75e-271], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.06e-21], 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(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
    \mathbf{if}\;B \leq -1.3 \cdot 10^{-118}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -3.4 \cdot 10^{-210}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq -3 \cdot 10^{-301}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.75 \cdot 10^{-271}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.06 \cdot 10^{-21}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if B < -1.3e-118

      1. Initial program 57.0%

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

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

      if -1.3e-118 < B < -3.39999999999999974e-210 or 1.75e-271 < B < 1.05999999999999994e-21

      1. Initial program 48.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 51.1%

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

      if -3.39999999999999974e-210 < B < -2.99999999999999999e-301

      1. Initial program 49.6%

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

        \[\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} \]
      4. Taylor expanded in A around inf 54.2%

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

      if -2.99999999999999999e-301 < B < 1.75e-271

      1. Initial program 100.0%

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

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

      if 1.05999999999999994e-21 < B

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.3 \cdot 10^{-118}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.4 \cdot 10^{-210}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq -3 \cdot 10^{-301}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.75 \cdot 10^{-271}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.06 \cdot 10^{-21}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 64.5% accurate, 3.4× speedup?

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

      1. Initial program 57.8%

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

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

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

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

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

      if 2e-276 < B < 2.75000000000000015e-90

      1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \color{blue}{{\left(\frac{\pi}{-\tan^{-1} \left(\frac{-0.5 \cdot \mathsf{fma}\left(B, \frac{C}{A}, B\right)}{A}\right)}\right)}^{-1}} \]
      8. Step-by-step derivation
        1. unpow-162.3%

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

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

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

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

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

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

      if 2.75000000000000015e-90 < B

      1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 10: 64.0% accurate, 3.4× speedup?

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

      1. Initial program 57.8%

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

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

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

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

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

      if 3.09999999999999988e-273 < B < 9.19999999999999947e-123

      1. Initial program 37.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 9.19999999999999947e-123 < B

      1. Initial program 52.2%

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

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

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

    Alternative 11: 64.0% accurate, 3.4× speedup?

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

      1. Initial program 57.8%

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

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

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

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

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

      if 7.50000000000000005e-272 < B < 1.6000000000000001e-122

      1. Initial program 37.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.6000000000000001e-122 < B

      1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 45.9% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -23:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{-274}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-124}:\\ \;\;\;\;\frac{180 \cdot \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 -23.0)
       (* 180.0 (/ (atan 1.0) PI))
       (if (<= B 3.5e-274)
         (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
         (if (<= B 2.1e-124)
           (/ (* 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 <= -23.0) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= 3.5e-274) {
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
    	} else if (B <= 2.1e-124) {
    		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 <= -23.0) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= 3.5e-274) {
    		tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
    	} else if (B <= 2.1e-124) {
    		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 <= -23.0:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= 3.5e-274:
    		tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
    	elif B <= 2.1e-124:
    		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 <= -23.0)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= 3.5e-274)
    		tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi));
    	elseif (B <= 2.1e-124)
    		tmp = Float64(Float64(180.0 * 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 <= -23.0)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= 3.5e-274)
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / pi);
    	elseif (B <= 2.1e-124)
    		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, -23.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.5e-274], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.1e-124], N[(N[(180.0 * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;B \leq -23:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq 3.5 \cdot 10^{-274}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 2.1 \cdot 10^{-124}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if B < -23

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

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

      if -23 < B < 3.49999999999999982e-274

      1. Initial program 65.9%

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

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

      if 3.49999999999999982e-274 < B < 2.1000000000000001e-124

      1. Initial program 39.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.1000000000000001e-124 < B

      1. Initial program 51.6%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -23:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{-274}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-124}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 56.5% accurate, 3.5× speedup?

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

      1. Initial program 83.0%

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

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

      if -1.22e123 < C < 6e4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6e4 < C

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

        \[\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} \]
      4. Taylor expanded in A around inf 63.4%

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

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

    Alternative 14: 59.6% accurate, 3.5× speedup?

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

      1. Initial program 17.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 75.0%

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

      if -1.49999999999999993e80 < A < 4.3999999999999998e-84

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.3999999999999998e-84 < A

      1. Initial program 76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 15: 59.7% accurate, 3.5× speedup?

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

      1. Initial program 17.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 75.0%

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

      if -1.3e76 < A < 6.19999999999999985e-83

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.19999999999999985e-83 < A

      1. Initial program 76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 16: 44.6% accurate, 3.6× speedup?

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

      1. Initial program 56.5%

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

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

      if -1.31999999999999994e-123 < B < 3.45e-124

      1. Initial program 52.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.45e-124 < B

      1. Initial program 51.6%

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

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

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

    Alternative 17: 60.9% accurate, 3.6× speedup?

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

      1. Initial program 17.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 75.0%

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

      if -3.69999999999999995e77 < A

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

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

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

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

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

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

    Alternative 18: 60.9% accurate, 3.6× speedup?

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

      1. Initial program 17.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 75.0%

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

      if -1.10000000000000007e78 < A

      1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 19: 39.9% accurate, 3.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1 \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 -1e-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 <= -1e-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 <= -1e-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 <= -1e-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 <= -1e-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 <= -1e-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, -1e-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 -1 \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 < -9.999999999999969e-311

      1. Initial program 55.9%

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

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

      if -9.999999999999969e-311 < B

      1. Initial program 51.1%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1 \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 20: 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 53.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 19.0%

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

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

    Reproduce

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