ABCF->ab-angle angle

Percentage Accurate: 53.7% → 78.3%
Time: 19.8s
Alternatives: 15
Speedup: 2.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 53.7% accurate, 1.0× speedup?

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

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

Alternative 1: 78.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\ \mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0
         (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
   (if (or (<= t_0 -0.5) (not (<= t_0 0.0)))
     (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))
     (* (atan (* B (/ 0.5 A))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
	double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
	double tmp;
	if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
		tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
	} else {
		tmp = atan((B * (0.5 / A))) * (180.0 / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
	double tmp;
	if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
		tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
	} else {
		tmp = Math.atan((B * (0.5 / A))) * (180.0 / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0))))
	tmp = 0
	if (t_0 <= -0.5) or not (t_0 <= 0.0):
		tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi)
	else:
		tmp = math.atan((B * (0.5 / A))) * (180.0 / math.pi)
	return tmp
function code(A, B, C)
	t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))
	tmp = 0.0
	if ((t_0 <= -0.5) || !(t_0 <= 0.0))
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi));
	else
		tmp = Float64(atan(Float64(B * Float64(0.5 / A))) * Float64(180.0 / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0))));
	tmp = 0.0;
	if ((t_0 <= -0.5) || ~((t_0 <= 0.0)))
		tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi);
	else
		tmp = atan((B * (0.5 / A))) * (180.0 / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[Or[LessEqual[t$95$0, -0.5], N[Not[LessEqual[t$95$0, 0.0]], $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], N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.5 or -0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))

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

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

      if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0

      1. Initial program 13.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. Taylor expanded in A around -inf 48.3%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0.5 \cdot B}{A}\right)}}{\pi} \]
      5. Step-by-step derivation
        1. add-exp-log15.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \leq -0.5 \lor \neg \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \leq 0\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\ \end{array} \]

    Alternative 2: 74.8% accurate, 1.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ t_1 := \tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{if}\;A \leq -5.9 \cdot 10^{+140}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -8.8 \cdot 10^{+46}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -2.2 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 50000000000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI)))
            (t_1 (* (atan (* B (/ 0.5 A))) (/ 180.0 PI))))
       (if (<= A -5.9e+140)
         t_1
         (if (<= A -8.8e+46)
           t_0
           (if (<= A -2.2e+27)
             t_1
             (if (<= A 50000000000000.0)
               t_0
               (* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
    	double t_1 = atan((B * (0.5 / A))) * (180.0 / ((double) M_PI));
    	double tmp;
    	if (A <= -5.9e+140) {
    		tmp = t_1;
    	} else if (A <= -8.8e+46) {
    		tmp = t_0;
    	} else if (A <= -2.2e+27) {
    		tmp = t_1;
    	} else if (A <= 50000000000000.0) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
    	double t_1 = Math.atan((B * (0.5 / A))) * (180.0 / Math.PI);
    	double tmp;
    	if (A <= -5.9e+140) {
    		tmp = t_1;
    	} else if (A <= -8.8e+46) {
    		tmp = t_0;
    	} else if (A <= -2.2e+27) {
    		tmp = t_1;
    	} else if (A <= 50000000000000.0) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi)
    	t_1 = math.atan((B * (0.5 / A))) * (180.0 / math.pi)
    	tmp = 0
    	if A <= -5.9e+140:
    		tmp = t_1
    	elif A <= -8.8e+46:
    		tmp = t_0
    	elif A <= -2.2e+27:
    		tmp = t_1
    	elif A <= 50000000000000.0:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi))
    	t_1 = Float64(atan(Float64(B * Float64(0.5 / A))) * Float64(180.0 / pi))
    	tmp = 0.0
    	if (A <= -5.9e+140)
    		tmp = t_1;
    	elseif (A <= -8.8e+46)
    		tmp = t_0;
    	elseif (A <= -2.2e+27)
    		tmp = t_1;
    	elseif (A <= 50000000000000.0)
    		tmp = t_0;
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi);
    	t_1 = atan((B * (0.5 / A))) * (180.0 / pi);
    	tmp = 0.0;
    	if (A <= -5.9e+140)
    		tmp = t_1;
    	elseif (A <= -8.8e+46)
    		tmp = t_0;
    	elseif (A <= -2.2e+27)
    		tmp = t_1;
    	elseif (A <= 50000000000000.0)
    		tmp = t_0;
    	else
    		tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.9e+140], t$95$1, If[LessEqual[A, -8.8e+46], t$95$0, If[LessEqual[A, -2.2e+27], t$95$1, If[LessEqual[A, 50000000000000.0], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
    t_1 := \tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\
    \mathbf{if}\;A \leq -5.9 \cdot 10^{+140}:\\
    \;\;\;\;t_1\\
    
    \mathbf{elif}\;A \leq -8.8 \cdot 10^{+46}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;A \leq -2.2 \cdot 10^{+27}:\\
    \;\;\;\;t_1\\
    
    \mathbf{elif}\;A \leq 50000000000000:\\
    \;\;\;\;t_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if A < -5.9000000000000003e140 or -8.8000000000000001e46 < A < -2.1999999999999999e27

      1. Initial program 13.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. Taylor expanded in A around -inf 73.7%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0.5 \cdot B}{A}\right)}}{\pi} \]
      5. Step-by-step derivation
        1. add-exp-log47.4%

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

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

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

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

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

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

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

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

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

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

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

      if -5.9000000000000003e140 < A < -8.8000000000000001e46 or -2.1999999999999999e27 < A < 5e13

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

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

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

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

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

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

      if 5e13 < A

      1. Initial program 73.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. Simplified89.7%

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.9 \cdot 10^{+140}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq -8.8 \cdot 10^{+46}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.2 \cdot 10^{+27}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq 50000000000000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\ \end{array} \]

      Alternative 3: 72.0% accurate, 1.7× speedup?

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

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

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

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

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

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

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

        if -3.3000000000000001e37 < C < 6.2000000000000003e165

        1. Initial program 55.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. Taylor expanded in C around 0 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 6.2000000000000003e165 < C

        1. Initial program 3.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. Taylor expanded in C around inf 56.1%

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -3.3 \cdot 10^{+37}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 6.2 \cdot 10^{+165}:\\ \;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \end{array} \]

      Alternative 4: 47.3% accurate, 2.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{if}\;A \leq -1.65 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -1.85 \cdot 10^{-257}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -6.6 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.1 \cdot 10^{-237}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 8.5 \cdot 10^{-161}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.45 \cdot 10^{-116}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (let* ((t_0 (* 180.0 (/ (atan -1.0) PI)))
              (t_1 (* 180.0 (/ (atan (* B (/ 0.5 A))) PI))))
         (if (<= A -1.65e-60)
           t_1
           (if (<= A -1.85e-257)
             t_0
             (if (<= A -6.6e-305)
               t_1
               (if (<= A 1.1e-237)
                 t_0
                 (if (<= A 8.5e-161)
                   (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
                   (if (<= A 1.45e-116)
                     t_0
                     (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))))))))))
      double code(double A, double B, double C) {
      	double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
      	double t_1 = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
      	double tmp;
      	if (A <= -1.65e-60) {
      		tmp = t_1;
      	} else if (A <= -1.85e-257) {
      		tmp = t_0;
      	} else if (A <= -6.6e-305) {
      		tmp = t_1;
      	} else if (A <= 1.1e-237) {
      		tmp = t_0;
      	} else if (A <= 8.5e-161) {
      		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
      	} else if (A <= 1.45e-116) {
      		tmp = t_0;
      	} else {
      		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
      	}
      	return tmp;
      }
      
      public static double code(double A, double B, double C) {
      	double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
      	double t_1 = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
      	double tmp;
      	if (A <= -1.65e-60) {
      		tmp = t_1;
      	} else if (A <= -1.85e-257) {
      		tmp = t_0;
      	} else if (A <= -6.6e-305) {
      		tmp = t_1;
      	} else if (A <= 1.1e-237) {
      		tmp = t_0;
      	} else if (A <= 8.5e-161) {
      		tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
      	} else if (A <= 1.45e-116) {
      		tmp = t_0;
      	} else {
      		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
      	}
      	return tmp;
      }
      
      def code(A, B, C):
      	t_0 = 180.0 * (math.atan(-1.0) / math.pi)
      	t_1 = 180.0 * (math.atan((B * (0.5 / A))) / math.pi)
      	tmp = 0
      	if A <= -1.65e-60:
      		tmp = t_1
      	elif A <= -1.85e-257:
      		tmp = t_0
      	elif A <= -6.6e-305:
      		tmp = t_1
      	elif A <= 1.1e-237:
      		tmp = t_0
      	elif A <= 8.5e-161:
      		tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
      	elif A <= 1.45e-116:
      		tmp = t_0
      	else:
      		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
      	return tmp
      
      function code(A, B, C)
      	t_0 = Float64(180.0 * Float64(atan(-1.0) / pi))
      	t_1 = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi))
      	tmp = 0.0
      	if (A <= -1.65e-60)
      		tmp = t_1;
      	elseif (A <= -1.85e-257)
      		tmp = t_0;
      	elseif (A <= -6.6e-305)
      		tmp = t_1;
      	elseif (A <= 1.1e-237)
      		tmp = t_0;
      	elseif (A <= 8.5e-161)
      		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
      	elseif (A <= 1.45e-116)
      		tmp = t_0;
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	t_0 = 180.0 * (atan(-1.0) / pi);
      	t_1 = 180.0 * (atan((B * (0.5 / A))) / pi);
      	tmp = 0.0;
      	if (A <= -1.65e-60)
      		tmp = t_1;
      	elseif (A <= -1.85e-257)
      		tmp = t_0;
      	elseif (A <= -6.6e-305)
      		tmp = t_1;
      	elseif (A <= 1.1e-237)
      		tmp = t_0;
      	elseif (A <= 8.5e-161)
      		tmp = 180.0 * (atan((2.0 * (C / B))) / pi);
      	elseif (A <= 1.45e-116)
      		tmp = t_0;
      	else
      		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.65e-60], t$95$1, If[LessEqual[A, -1.85e-257], t$95$0, If[LessEqual[A, -6.6e-305], t$95$1, If[LessEqual[A, 1.1e-237], t$95$0, If[LessEqual[A, 8.5e-161], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.45e-116], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
      t_1 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
      \mathbf{if}\;A \leq -1.65 \cdot 10^{-60}:\\
      \;\;\;\;t_1\\
      
      \mathbf{elif}\;A \leq -1.85 \cdot 10^{-257}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;A \leq -6.6 \cdot 10^{-305}:\\
      \;\;\;\;t_1\\
      
      \mathbf{elif}\;A \leq 1.1 \cdot 10^{-237}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;A \leq 8.5 \cdot 10^{-161}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
      
      \mathbf{elif}\;A \leq 1.45 \cdot 10^{-116}:\\
      \;\;\;\;t_0\\
      
      \mathbf{else}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if A < -1.6499999999999999e-60 or -1.84999999999999992e-257 < A < -6.59999999999999965e-305

        1. Initial program 31.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. Taylor expanded in A around -inf 55.7%

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

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

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

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

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

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

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

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

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

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

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

        if -1.6499999999999999e-60 < A < -1.84999999999999992e-257 or -6.59999999999999965e-305 < A < 1.09999999999999999e-237 or 8.50000000000000054e-161 < A < 1.4499999999999999e-116

        1. Initial program 58.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. Taylor expanded in B around inf 43.3%

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

        if 1.09999999999999999e-237 < A < 8.50000000000000054e-161

        1. Initial program 90.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. Taylor expanded in C around -inf 51.7%

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

        if 1.4499999999999999e-116 < A

        1. Initial program 67.8%

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.65 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.85 \cdot 10^{-257}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -6.6 \cdot 10^{-305}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.1 \cdot 10^{-237}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 8.5 \cdot 10^{-161}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.45 \cdot 10^{-116}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \]

      Alternative 5: 47.2% accurate, 2.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -9.5 \cdot 10^{-49}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 8.6 \cdot 10^{-262}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{-110}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-60}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 11.2 \lor \neg \left(B \leq 6.2 \cdot 10^{+21}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (let* ((t_0 (* 180.0 (/ (atan (/ (- A) B)) PI)))
              (t_1 (* 180.0 (/ (atan (/ C B)) PI))))
         (if (<= B -9.5e-49)
           (* 180.0 (/ (atan 1.0) PI))
           (if (<= B 8.6e-262)
             t_0
             (if (<= B 2.3e-110)
               t_1
               (if (<= B 1.25e-60)
                 t_0
                 (if (or (<= B 11.2) (not (<= B 6.2e+21)))
                   (* 180.0 (/ (atan -1.0) PI))
                   t_1)))))))
      double code(double A, double B, double C) {
      	double t_0 = 180.0 * (atan((-A / B)) / ((double) M_PI));
      	double t_1 = 180.0 * (atan((C / B)) / ((double) M_PI));
      	double tmp;
      	if (B <= -9.5e-49) {
      		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
      	} else if (B <= 8.6e-262) {
      		tmp = t_0;
      	} else if (B <= 2.3e-110) {
      		tmp = t_1;
      	} else if (B <= 1.25e-60) {
      		tmp = t_0;
      	} else if ((B <= 11.2) || !(B <= 6.2e+21)) {
      		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      public static double code(double A, double B, double C) {
      	double t_0 = 180.0 * (Math.atan((-A / B)) / Math.PI);
      	double t_1 = 180.0 * (Math.atan((C / B)) / Math.PI);
      	double tmp;
      	if (B <= -9.5e-49) {
      		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
      	} else if (B <= 8.6e-262) {
      		tmp = t_0;
      	} else if (B <= 2.3e-110) {
      		tmp = t_1;
      	} else if (B <= 1.25e-60) {
      		tmp = t_0;
      	} else if ((B <= 11.2) || !(B <= 6.2e+21)) {
      		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(A, B, C):
      	t_0 = 180.0 * (math.atan((-A / B)) / math.pi)
      	t_1 = 180.0 * (math.atan((C / B)) / math.pi)
      	tmp = 0
      	if B <= -9.5e-49:
      		tmp = 180.0 * (math.atan(1.0) / math.pi)
      	elif B <= 8.6e-262:
      		tmp = t_0
      	elif B <= 2.3e-110:
      		tmp = t_1
      	elif B <= 1.25e-60:
      		tmp = t_0
      	elif (B <= 11.2) or not (B <= 6.2e+21):
      		tmp = 180.0 * (math.atan(-1.0) / math.pi)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(A, B, C)
      	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi))
      	t_1 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi))
      	tmp = 0.0
      	if (B <= -9.5e-49)
      		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
      	elseif (B <= 8.6e-262)
      		tmp = t_0;
      	elseif (B <= 2.3e-110)
      		tmp = t_1;
      	elseif (B <= 1.25e-60)
      		tmp = t_0;
      	elseif ((B <= 11.2) || !(B <= 6.2e+21))
      		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	t_0 = 180.0 * (atan((-A / B)) / pi);
      	t_1 = 180.0 * (atan((C / B)) / pi);
      	tmp = 0.0;
      	if (B <= -9.5e-49)
      		tmp = 180.0 * (atan(1.0) / pi);
      	elseif (B <= 8.6e-262)
      		tmp = t_0;
      	elseif (B <= 2.3e-110)
      		tmp = t_1;
      	elseif (B <= 1.25e-60)
      		tmp = t_0;
      	elseif ((B <= 11.2) || ~((B <= 6.2e+21)))
      		tmp = 180.0 * (atan(-1.0) / pi);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9.5e-49], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.6e-262], t$95$0, If[LessEqual[B, 2.3e-110], t$95$1, If[LessEqual[B, 1.25e-60], t$95$0, If[Or[LessEqual[B, 11.2], N[Not[LessEqual[B, 6.2e+21]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
      t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
      \mathbf{if}\;B \leq -9.5 \cdot 10^{-49}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
      
      \mathbf{elif}\;B \leq 8.6 \cdot 10^{-262}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;B \leq 2.3 \cdot 10^{-110}:\\
      \;\;\;\;t_1\\
      
      \mathbf{elif}\;B \leq 1.25 \cdot 10^{-60}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;B \leq 11.2 \lor \neg \left(B \leq 6.2 \cdot 10^{+21}\right):\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;t_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if B < -9.50000000000000006e-49

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

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

        if -9.50000000000000006e-49 < B < 8.6000000000000002e-262 or 2.3000000000000001e-110 < B < 1.25e-60

        1. Initial program 52.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. Simplified64.9%

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

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

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

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

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

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

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

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

          if 8.6000000000000002e-262 < B < 2.3000000000000001e-110 or 11.199999999999999 < B < 6.2e21

          1. Initial program 61.7%

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

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

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

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

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

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

            if 1.25e-60 < B < 11.199999999999999 or 6.2e21 < B

            1. Initial program 50.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. Taylor expanded in B around inf 58.0%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -9.5 \cdot 10^{-49}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 8.6 \cdot 10^{-262}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{-110}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 11.2 \lor \neg \left(B \leq 6.2 \cdot 10^{+21}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \end{array} \]

          Alternative 6: 47.3% accurate, 2.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -2.8 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 4 \cdot 10^{-261}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.15 \cdot 10^{-111}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 4000 \lor \neg \left(B \leq 1.4 \cdot 10^{+21}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
          (FPCore (A B C)
           :precision binary64
           (let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
             (if (<= B -2.8e-48)
               (* 180.0 (/ (atan 1.0) PI))
               (if (<= B 4e-261)
                 (* 180.0 (/ (atan (/ (- A) B)) PI))
                 (if (<= B 2.15e-111)
                   t_0
                   (if (<= B 5.5e-60)
                     (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
                     (if (or (<= B 4000.0) (not (<= B 1.4e+21)))
                       (* 180.0 (/ (atan -1.0) PI))
                       t_0)))))))
          double code(double A, double B, double C) {
          	double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
          	double tmp;
          	if (B <= -2.8e-48) {
          		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
          	} else if (B <= 4e-261) {
          		tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
          	} else if (B <= 2.15e-111) {
          		tmp = t_0;
          	} else if (B <= 5.5e-60) {
          		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
          	} else if ((B <= 4000.0) || !(B <= 1.4e+21)) {
          		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          public static double code(double A, double B, double C) {
          	double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
          	double tmp;
          	if (B <= -2.8e-48) {
          		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
          	} else if (B <= 4e-261) {
          		tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
          	} else if (B <= 2.15e-111) {
          		tmp = t_0;
          	} else if (B <= 5.5e-60) {
          		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
          	} else if ((B <= 4000.0) || !(B <= 1.4e+21)) {
          		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(A, B, C):
          	t_0 = 180.0 * (math.atan((C / B)) / math.pi)
          	tmp = 0
          	if B <= -2.8e-48:
          		tmp = 180.0 * (math.atan(1.0) / math.pi)
          	elif B <= 4e-261:
          		tmp = 180.0 * (math.atan((-A / B)) / math.pi)
          	elif B <= 2.15e-111:
          		tmp = t_0
          	elif B <= 5.5e-60:
          		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
          	elif (B <= 4000.0) or not (B <= 1.4e+21):
          		tmp = 180.0 * (math.atan(-1.0) / math.pi)
          	else:
          		tmp = t_0
          	return tmp
          
          function code(A, B, C)
          	t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi))
          	tmp = 0.0
          	if (B <= -2.8e-48)
          		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
          	elseif (B <= 4e-261)
          		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi));
          	elseif (B <= 2.15e-111)
          		tmp = t_0;
          	elseif (B <= 5.5e-60)
          		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
          	elseif ((B <= 4000.0) || !(B <= 1.4e+21))
          		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(A, B, C)
          	t_0 = 180.0 * (atan((C / B)) / pi);
          	tmp = 0.0;
          	if (B <= -2.8e-48)
          		tmp = 180.0 * (atan(1.0) / pi);
          	elseif (B <= 4e-261)
          		tmp = 180.0 * (atan((-A / B)) / pi);
          	elseif (B <= 2.15e-111)
          		tmp = t_0;
          	elseif (B <= 5.5e-60)
          		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
          	elseif ((B <= 4000.0) || ~((B <= 1.4e+21)))
          		tmp = 180.0 * (atan(-1.0) / pi);
          	else
          		tmp = t_0;
          	end
          	tmp_2 = tmp;
          end
          
          code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.8e-48], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4e-261], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.15e-111], t$95$0, If[LessEqual[B, 5.5e-60], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 4000.0], N[Not[LessEqual[B, 1.4e+21]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
          \mathbf{if}\;B \leq -2.8 \cdot 10^{-48}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
          
          \mathbf{elif}\;B \leq 4 \cdot 10^{-261}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
          
          \mathbf{elif}\;B \leq 2.15 \cdot 10^{-111}:\\
          \;\;\;\;t_0\\
          
          \mathbf{elif}\;B \leq 5.5 \cdot 10^{-60}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
          
          \mathbf{elif}\;B \leq 4000 \lor \neg \left(B \leq 1.4 \cdot 10^{+21}\right):\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;t_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 5 regimes
          2. if B < -2.80000000000000005e-48

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

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

            if -2.80000000000000005e-48 < B < 3.99999999999999994e-261

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

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

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

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

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

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

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

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

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

              if 3.99999999999999994e-261 < B < 2.1499999999999999e-111 or 4e3 < B < 1.4e21

              1. Initial program 61.7%

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

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

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

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

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

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

                if 2.1499999999999999e-111 < B < 5.4999999999999997e-60

                1. Initial program 64.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. Taylor expanded in A around inf 40.0%

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

                if 5.4999999999999997e-60 < B < 4e3 or 1.4e21 < B

                1. Initial program 50.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. Taylor expanded in B around inf 58.0%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.8 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 4 \cdot 10^{-261}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.15 \cdot 10^{-111}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 4000 \lor \neg \left(B \leq 1.4 \cdot 10^{+21}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \end{array} \]

              Alternative 7: 52.8% accurate, 2.4× speedup?

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

                1. Initial program 53.5%

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

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

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

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

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

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

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

                  if -3.59999999999999978e-56 < B < -1.79999999999999986e-173

                  1. Initial program 25.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. Taylor expanded in C around inf 39.1%

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

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

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

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

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

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

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

                  if -1.79999999999999986e-173 < B < 4.6000000000000002e-262

                  1. Initial program 63.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. Simplified75.3%

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

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

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

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

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

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

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

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

                    if 4.6000000000000002e-262 < B < 1.85000000000000008e-110

                    1. Initial program 58.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. Simplified71.5%

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

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

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

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

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

                      if 1.85000000000000008e-110 < B

                      1. Initial program 54.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. Taylor expanded in C around 0 45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.6 \cdot 10^{-56}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.8 \cdot 10^{-173}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.6 \cdot 10^{-262}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{-110}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

                    Alternative 8: 52.2% accurate, 2.4× speedup?

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

                      1. Initial program 31.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. Taylor expanded in A around -inf 55.7%

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

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

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

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

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

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

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

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

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

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

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

                      if -1.6000000000000001e-60 < A < -2.05e-256

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

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

                      if -5.5e-305 < A

                      1. Initial program 70.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. Taylor expanded in C around 0 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.6 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.05 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -5.5 \cdot 10^{-305}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

                    Alternative 9: 52.2% accurate, 2.4× speedup?

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

                      1. Initial program 28.0%

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

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

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

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

                      if -1.6499999999999999e-60 < A < -2.9999999999999999e-257

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

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

                      if -2.9999999999999999e-257 < A < -1.35000000000000005e-304

                      1. Initial program 59.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. Taylor expanded in A around -inf 59.6%

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

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

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

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

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

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

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

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

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

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

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

                      if -1.35000000000000005e-304 < A

                      1. Initial program 70.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. Taylor expanded in C around 0 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.65 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -3 \cdot 10^{-257}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq -1.35 \cdot 10^{-304}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

                    Alternative 10: 45.8% accurate, 2.4× speedup?

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

                      1. Initial program 53.5%

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

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

                      if -3.7000000000000002e-56 < B < -3.49999999999999975e-228

                      1. Initial program 35.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. Taylor expanded in C around inf 36.1%

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

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

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

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

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

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

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

                      if -3.49999999999999975e-228 < B < 1.95e21

                      1. Initial program 61.1%

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

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

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

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

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

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

                        if 1.95e21 < B

                        1. Initial program 50.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. Taylor expanded in B around inf 60.5%

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.7 \cdot 10^{-56}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.5 \cdot 10^{-228}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.95 \cdot 10^{+21}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

                      Alternative 11: 63.0% accurate, 2.4× speedup?

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

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

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

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

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

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

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

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

                          if -5.59999999999999986e-47 < B

                          1. Initial program 53.7%

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

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

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

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

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.6 \cdot 10^{-47}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\ \end{array} \]

                          Alternative 12: 65.2% accurate, 2.4× speedup?

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

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

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

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

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

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

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

                              if -5.00000000000000004e-51 < B

                              1. Initial program 53.7%

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

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

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

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

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

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

                              Alternative 13: 44.5% accurate, 2.5× speedup?

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

                                1. Initial program 53.5%

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

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

                                if -3.59999999999999978e-56 < B < 1.44999999999999992e-132

                                1. Initial program 50.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. Taylor expanded in C around inf 32.3%

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

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

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

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

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

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

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

                                if 1.44999999999999992e-132 < B

                                1. Initial program 55.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. Taylor expanded in B around inf 49.9%

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.6 \cdot 10^{-56}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.45 \cdot 10^{-132}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

                              Alternative 14: 39.8% accurate, 2.5× speedup?

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

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

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

                                if -6.1999999999999999e-299 < B

                                1. Initial program 55.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. Taylor expanded in B around inf 37.6%

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.2 \cdot 10^{-299}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

                              Alternative 15: 20.5% accurate, 2.5× 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.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. Taylor expanded in B around inf 21.8%

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

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

                              Reproduce

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