ABCF->ab-angle angle

Percentage Accurate: 54.0% → 81.6%
Time: 22.5s
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: 54.0% accurate, 1.0× speedup?

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

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

Alternative 1: 81.6% accurate, 1.6× speedup?

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

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

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


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

    1. Initial program 7.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. Applied egg-rr43.5%

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

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

    if -5.1999999999999999e141 < A

    1. Initial program 61.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. Applied egg-rr86.0%

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

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

Alternative 2: 80.8% accurate, 1.6× speedup?

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

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

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


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

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

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

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

    if -4.99999999999999977e126 < A

    1. Initial program 62.0%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Step-by-step derivation
      1. Simplified85.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}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification86.1%

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

    Alternative 3: 46.4% accurate, 2.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -8 \cdot 10^{-35}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -5.5 \cdot 10^{-49}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 9.2 \cdot 10^{-274}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 8.2 \cdot 10^{-243}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-198}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 10^{-183}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 7.6 \cdot 10^{+37}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI)))
            (t_1 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
       (if (<= B -8e-35)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -5.5e-49)
           t_0
           (if (<= B 9.2e-274)
             t_1
             (if (<= B 8.2e-243)
               (/ (* 180.0 (atan (/ 0.0 B))) PI)
               (if (<= B 7e-198)
                 t_1
                 (if (<= B 1e-183)
                   t_0
                   (if (<= B 7.6e+37)
                     (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
                     (* 180.0 (/ (atan -1.0) PI)))))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
    	double t_1 = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
    	double tmp;
    	if (B <= -8e-35) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -5.5e-49) {
    		tmp = t_0;
    	} else if (B <= 9.2e-274) {
    		tmp = t_1;
    	} else if (B <= 8.2e-243) {
    		tmp = (180.0 * atan((0.0 / B))) / ((double) M_PI);
    	} else if (B <= 7e-198) {
    		tmp = t_1;
    	} else if (B <= 1e-183) {
    		tmp = t_0;
    	} else if (B <= 7.6e+37) {
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
    	double t_1 = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
    	double tmp;
    	if (B <= -8e-35) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -5.5e-49) {
    		tmp = t_0;
    	} else if (B <= 9.2e-274) {
    		tmp = t_1;
    	} else if (B <= 8.2e-243) {
    		tmp = (180.0 * Math.atan((0.0 / B))) / Math.PI;
    	} else if (B <= 7e-198) {
    		tmp = t_1;
    	} else if (B <= 1e-183) {
    		tmp = t_0;
    	} else if (B <= 7.6e+37) {
    		tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi)
    	t_1 = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
    	tmp = 0
    	if B <= -8e-35:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -5.5e-49:
    		tmp = t_0
    	elif B <= 9.2e-274:
    		tmp = t_1
    	elif B <= 8.2e-243:
    		tmp = (180.0 * math.atan((0.0 / B))) / math.pi
    	elif B <= 7e-198:
    		tmp = t_1
    	elif B <= 1e-183:
    		tmp = t_0
    	elif B <= 7.6e+37:
    		tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi))
    	t_1 = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi))
    	tmp = 0.0
    	if (B <= -8e-35)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -5.5e-49)
    		tmp = t_0;
    	elseif (B <= 9.2e-274)
    		tmp = t_1;
    	elseif (B <= 8.2e-243)
    		tmp = Float64(Float64(180.0 * atan(Float64(0.0 / B))) / pi);
    	elseif (B <= 7e-198)
    		tmp = t_1;
    	elseif (B <= 1e-183)
    		tmp = t_0;
    	elseif (B <= 7.6e+37)
    		tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan(((B * -0.5) / C)) / pi);
    	t_1 = 180.0 * (atan((2.0 * (C / B))) / pi);
    	tmp = 0.0;
    	if (B <= -8e-35)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -5.5e-49)
    		tmp = t_0;
    	elseif (B <= 9.2e-274)
    		tmp = t_1;
    	elseif (B <= 8.2e-243)
    		tmp = (180.0 * atan((0.0 / B))) / pi;
    	elseif (B <= 7e-198)
    		tmp = t_1;
    	elseif (B <= 1e-183)
    		tmp = t_0;
    	elseif (B <= 7.6e+37)
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / pi);
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8e-35], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.5e-49], t$95$0, If[LessEqual[B, 9.2e-274], t$95$1, If[LessEqual[B, 8.2e-243], N[(N[(180.0 * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 7e-198], t$95$1, If[LessEqual[B, 1e-183], t$95$0, If[LessEqual[B, 7.6e+37], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
    t_1 := 180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -8 \cdot 10^{-35}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -5.5 \cdot 10^{-49}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;B \leq 9.2 \cdot 10^{-274}:\\
    \;\;\;\;t_1\\
    
    \mathbf{elif}\;B \leq 8.2 \cdot 10^{-243}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 7 \cdot 10^{-198}:\\
    \;\;\;\;t_1\\
    
    \mathbf{elif}\;B \leq 10^{-183}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;B \leq 7.6 \cdot 10^{+37}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 6 regimes
    2. if B < -8.00000000000000006e-35

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

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

      if -8.00000000000000006e-35 < B < -5.50000000000000031e-49 or 7.0000000000000005e-198 < B < 1.00000000000000001e-183

      1. Initial program 13.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 51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.50000000000000031e-49 < B < 9.19999999999999984e-274 or 8.19999999999999962e-243 < B < 7.0000000000000005e-198

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

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

      if 9.19999999999999984e-274 < B < 8.19999999999999962e-243

      1. Initial program 39.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. Applied egg-rr100.0%

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

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

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

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

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

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

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

      if 1.00000000000000001e-183 < B < 7.59999999999999979e37

      1. Initial program 65.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 43.0%

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

      if 7.59999999999999979e37 < B

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8 \cdot 10^{-35}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -5.5 \cdot 10^{-49}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9.2 \cdot 10^{-274}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 8.2 \cdot 10^{-243}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-198}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 10^{-183}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.6 \cdot 10^{+37}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

    Alternative 4: 47.4% 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(\frac{0.5 \cdot B}{A}\right)}{\pi}\\ \mathbf{if}\;A \leq -1.35 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -4.5 \cdot 10^{+31}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -3 \cdot 10^{-309}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 3.5 \cdot 10^{-110}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 8 \cdot 10^{-17}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan 1.0) PI)))
            (t_1 (* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))))
       (if (<= A -1.35e+54)
         t_1
         (if (<= A -4.5e+31)
           t_0
           (if (<= A -3e-309)
             t_1
             (if (<= A 3.5e-110)
               t_0
               (if (<= A 8e-17)
                 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
                 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
    	double t_1 = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
    	double tmp;
    	if (A <= -1.35e+54) {
    		tmp = t_1;
    	} else if (A <= -4.5e+31) {
    		tmp = t_0;
    	} else if (A <= -3e-309) {
    		tmp = t_1;
    	} else if (A <= 3.5e-110) {
    		tmp = t_0;
    	} else if (A <= 8e-17) {
    		tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
    	} else {
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan(1.0) / Math.PI);
    	double t_1 = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
    	double tmp;
    	if (A <= -1.35e+54) {
    		tmp = t_1;
    	} else if (A <= -4.5e+31) {
    		tmp = t_0;
    	} else if (A <= -3e-309) {
    		tmp = t_1;
    	} else if (A <= 3.5e-110) {
    		tmp = t_0;
    	} else if (A <= 8e-17) {
    		tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
    	} else {
    		tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan(1.0) / math.pi)
    	t_1 = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi)
    	tmp = 0
    	if A <= -1.35e+54:
    		tmp = t_1
    	elif A <= -4.5e+31:
    		tmp = t_0
    	elif A <= -3e-309:
    		tmp = t_1
    	elif A <= 3.5e-110:
    		tmp = t_0
    	elif A <= 8e-17:
    		tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi)
    	else:
    		tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(1.0) / pi))
    	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi))
    	tmp = 0.0
    	if (A <= -1.35e+54)
    		tmp = t_1;
    	elseif (A <= -4.5e+31)
    		tmp = t_0;
    	elseif (A <= -3e-309)
    		tmp = t_1;
    	elseif (A <= 3.5e-110)
    		tmp = t_0;
    	elseif (A <= 8e-17)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan(1.0) / pi);
    	t_1 = 180.0 * (atan(((0.5 * B) / A)) / pi);
    	tmp = 0.0;
    	if (A <= -1.35e+54)
    		tmp = t_1;
    	elseif (A <= -4.5e+31)
    		tmp = t_0;
    	elseif (A <= -3e-309)
    		tmp = t_1;
    	elseif (A <= 3.5e-110)
    		tmp = t_0;
    	elseif (A <= 8e-17)
    		tmp = 180.0 * (atan(((B * -0.5) / C)) / pi);
    	else
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.35e+54], t$95$1, If[LessEqual[A, -4.5e+31], t$95$0, If[LessEqual[A, -3e-309], t$95$1, If[LessEqual[A, 3.5e-110], t$95$0, If[LessEqual[A, 8e-17], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
    \mathbf{if}\;A \leq -1.35 \cdot 10^{+54}:\\
    \;\;\;\;t_1\\
    
    \mathbf{elif}\;A \leq -4.5 \cdot 10^{+31}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;A \leq -3 \cdot 10^{-309}:\\
    \;\;\;\;t_1\\
    
    \mathbf{elif}\;A \leq 3.5 \cdot 10^{-110}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;A \leq 8 \cdot 10^{-17}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if A < -1.35000000000000005e54 or -4.4999999999999996e31 < A < -3.000000000000001e-309

      1. Initial program 41.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 A around -inf 53.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/53.2%

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

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

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

      if -1.35000000000000005e54 < A < -4.4999999999999996e31 or -3.000000000000001e-309 < A < 3.49999999999999974e-110

      1. Initial program 56.5%

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

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

      if 3.49999999999999974e-110 < A < 8.00000000000000057e-17

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 8.00000000000000057e-17 < A

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.35 \cdot 10^{+54}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.5 \cdot 10^{+31}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq -3 \cdot 10^{-309}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.5 \cdot 10^{-110}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 8 \cdot 10^{-17}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \]

    Alternative 5: 47.3% accurate, 2.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\ t_1 := \frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{if}\;A \leq -1.02 \cdot 10^{+53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -1.25 \cdot 10^{+32}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -6.5 \cdot 10^{-308}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-110}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 5.2 \cdot 10^{-18}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan 1.0) PI)))
            (t_1 (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)))
       (if (<= A -1.02e+53)
         t_1
         (if (<= A -1.25e+32)
           t_0
           (if (<= A -6.5e-308)
             t_1
             (if (<= A 3.9e-110)
               t_0
               (if (<= A 5.2e-18)
                 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
                 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
    	double t_1 = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
    	double tmp;
    	if (A <= -1.02e+53) {
    		tmp = t_1;
    	} else if (A <= -1.25e+32) {
    		tmp = t_0;
    	} else if (A <= -6.5e-308) {
    		tmp = t_1;
    	} else if (A <= 3.9e-110) {
    		tmp = t_0;
    	} else if (A <= 5.2e-18) {
    		tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
    	} else {
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan(1.0) / Math.PI);
    	double t_1 = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
    	double tmp;
    	if (A <= -1.02e+53) {
    		tmp = t_1;
    	} else if (A <= -1.25e+32) {
    		tmp = t_0;
    	} else if (A <= -6.5e-308) {
    		tmp = t_1;
    	} else if (A <= 3.9e-110) {
    		tmp = t_0;
    	} else if (A <= 5.2e-18) {
    		tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
    	} else {
    		tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan(1.0) / math.pi)
    	t_1 = (180.0 * math.atan((0.5 * (B / A)))) / math.pi
    	tmp = 0
    	if A <= -1.02e+53:
    		tmp = t_1
    	elif A <= -1.25e+32:
    		tmp = t_0
    	elif A <= -6.5e-308:
    		tmp = t_1
    	elif A <= 3.9e-110:
    		tmp = t_0
    	elif A <= 5.2e-18:
    		tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi)
    	else:
    		tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(1.0) / pi))
    	t_1 = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi)
    	tmp = 0.0
    	if (A <= -1.02e+53)
    		tmp = t_1;
    	elseif (A <= -1.25e+32)
    		tmp = t_0;
    	elseif (A <= -6.5e-308)
    		tmp = t_1;
    	elseif (A <= 3.9e-110)
    		tmp = t_0;
    	elseif (A <= 5.2e-18)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan(1.0) / pi);
    	t_1 = (180.0 * atan((0.5 * (B / A)))) / pi;
    	tmp = 0.0;
    	if (A <= -1.02e+53)
    		tmp = t_1;
    	elseif (A <= -1.25e+32)
    		tmp = t_0;
    	elseif (A <= -6.5e-308)
    		tmp = t_1;
    	elseif (A <= 3.9e-110)
    		tmp = t_0;
    	elseif (A <= 5.2e-18)
    		tmp = 180.0 * (atan(((B * -0.5) / C)) / pi);
    	else
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[A, -1.02e+53], t$95$1, If[LessEqual[A, -1.25e+32], t$95$0, If[LessEqual[A, -6.5e-308], t$95$1, If[LessEqual[A, 3.9e-110], t$95$0, If[LessEqual[A, 5.2e-18], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    t_1 := \frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
    \mathbf{if}\;A \leq -1.02 \cdot 10^{+53}:\\
    \;\;\;\;t_1\\
    
    \mathbf{elif}\;A \leq -1.25 \cdot 10^{+32}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;A \leq -6.5 \cdot 10^{-308}:\\
    \;\;\;\;t_1\\
    
    \mathbf{elif}\;A \leq 3.9 \cdot 10^{-110}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;A \leq 5.2 \cdot 10^{-18}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if A < -1.01999999999999999e53 or -1.2499999999999999e32 < A < -6.4999999999999999e-308

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

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

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

      if -1.01999999999999999e53 < A < -1.2499999999999999e32 or -6.4999999999999999e-308 < A < 3.9e-110

      1. Initial program 56.5%

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

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

      if 3.9e-110 < A < 5.2000000000000001e-18

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.2000000000000001e-18 < A

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.02 \cdot 10^{+53}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.25 \cdot 10^{+32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq -6.5 \cdot 10^{-308}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-110}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 5.2 \cdot 10^{-18}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \]

    Alternative 6: 46.5% 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 -1.9 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.16 \cdot 10^{-273}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.08 \cdot 10^{-243}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.22 \cdot 10^{-131}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
       (if (<= B -1.9e-48)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B 1.16e-273)
           t_0
           (if (<= B 1.08e-243)
             (/ (* 180.0 (atan (/ 0.0 B))) PI)
             (if (<= B 1.22e-131) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
    	double tmp;
    	if (B <= -1.9e-48) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= 1.16e-273) {
    		tmp = t_0;
    	} else if (B <= 1.08e-243) {
    		tmp = (180.0 * atan((0.0 / B))) / ((double) M_PI);
    	} else if (B <= 1.22e-131) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
    	double tmp;
    	if (B <= -1.9e-48) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= 1.16e-273) {
    		tmp = t_0;
    	} else if (B <= 1.08e-243) {
    		tmp = (180.0 * Math.atan((0.0 / B))) / Math.PI;
    	} else if (B <= 1.22e-131) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((C / B)) / math.pi)
    	tmp = 0
    	if B <= -1.9e-48:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= 1.16e-273:
    		tmp = t_0
    	elif B <= 1.08e-243:
    		tmp = (180.0 * math.atan((0.0 / B))) / math.pi
    	elif B <= 1.22e-131:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi))
    	tmp = 0.0
    	if (B <= -1.9e-48)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= 1.16e-273)
    		tmp = t_0;
    	elseif (B <= 1.08e-243)
    		tmp = Float64(Float64(180.0 * atan(Float64(0.0 / B))) / pi);
    	elseif (B <= 1.22e-131)
    		tmp = t_0;
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((C / B)) / pi);
    	tmp = 0.0;
    	if (B <= -1.9e-48)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= 1.16e-273)
    		tmp = t_0;
    	elseif (B <= 1.08e-243)
    		tmp = (180.0 * atan((0.0 / B))) / pi;
    	elseif (B <= 1.22e-131)
    		tmp = t_0;
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.9e-48], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.16e-273], t$95$0, If[LessEqual[B, 1.08e-243], N[(N[(180.0 * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.22e-131], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -1.9 \cdot 10^{-48}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.16 \cdot 10^{-273}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;B \leq 1.08 \cdot 10^{-243}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.22 \cdot 10^{-131}:\\
    \;\;\;\;t_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if B < -1.90000000000000001e-48

      1. Initial program 50.6%

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

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

      if -1.90000000000000001e-48 < B < 1.1599999999999999e-273 or 1.08e-243 < B < 1.21999999999999988e-131

      1. Initial program 63.5%

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

          \[\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. Step-by-step derivation
          1. +-commutative73.4%

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

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

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

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

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

        if 1.1599999999999999e-273 < B < 1.08e-243

        1. Initial program 39.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. Applied egg-rr100.0%

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

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

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

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

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

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

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

        if 1.21999999999999988e-131 < B

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.9 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.16 \cdot 10^{-273}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.08 \cdot 10^{-243}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.22 \cdot 10^{-131}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

      Alternative 7: 46.5% accurate, 2.4× speedup?

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

        1. Initial program 50.6%

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

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

        if -1.95e-48 < B < -2.2999999999999999e-259

        1. Initial program 68.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. Simplified79.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. Step-by-step derivation
            1. +-commutative79.1%

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

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

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

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

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

          if -2.2999999999999999e-259 < B < 7.19999999999999995e37

          1. Initial program 58.0%

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

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

          if 7.19999999999999995e37 < B

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.95 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.3 \cdot 10^{-259}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{+37}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

        Alternative 8: 46.5% accurate, 2.4× speedup?

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

          1. Initial program 50.6%

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

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

          if -7.99999999999999949e-49 < B < -1.2500000000000001e-260

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

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

          if -1.2500000000000001e-260 < B < 2.5999999999999999e37

          1. Initial program 58.0%

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

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

          if 2.5999999999999999e37 < B

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8 \cdot 10^{-49}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.25 \cdot 10^{-260}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{+37}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

        Alternative 9: 46.5% accurate, 2.4× speedup?

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

          1. Initial program 50.6%

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

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

          if -9.0000000000000004e-49 < B < -4.04999999999999982e-261

          1. Initial program 68.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. Simplified79.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. Step-by-step derivation
              1. +-commutative79.1%

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

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

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

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

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

            if -4.04999999999999982e-261 < B < 7.5000000000000003e37

            1. Initial program 58.0%

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

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

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

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

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

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

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

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

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

              if 7.5000000000000003e37 < B

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -9 \cdot 10^{-49}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4.05 \cdot 10^{-261}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.5 \cdot 10^{+37}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

            Alternative 10: 61.2% accurate, 2.4× speedup?

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

              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 B around -inf 66.2%

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

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

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

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

              if 2.70000000000000003e39 < C

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 11: 66.2% accurate, 2.4× speedup?

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

              1. Initial program 55.4%

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

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

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

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

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

              if 9.99999999999999992e-221 < B

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

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

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

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

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

              Alternative 12: 66.2% accurate, 2.4× speedup?

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

                1. Initial program 55.4%

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

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

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

                if 9.99999999999999992e-221 < B

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

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

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

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

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

                Alternative 13: 46.6% accurate, 2.5× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1.4 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.02 \cdot 10^{-131}:\\ \;\;\;\;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 -1.4e-48)
                   (* 180.0 (/ (atan 1.0) PI))
                   (if (<= B 1.02e-131)
                     (* 180.0 (/ (atan (/ C B)) PI))
                     (* 180.0 (/ (atan -1.0) PI)))))
                double code(double A, double B, double C) {
                	double tmp;
                	if (B <= -1.4e-48) {
                		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
                	} else if (B <= 1.02e-131) {
                		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 <= -1.4e-48) {
                		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
                	} else if (B <= 1.02e-131) {
                		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 <= -1.4e-48:
                		tmp = 180.0 * (math.atan(1.0) / math.pi)
                	elif B <= 1.02e-131:
                		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 <= -1.4e-48)
                		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
                	elseif (B <= 1.02e-131)
                		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 <= -1.4e-48)
                		tmp = 180.0 * (atan(1.0) / pi);
                	elseif (B <= 1.02e-131)
                		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, -1.4e-48], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.02e-131], 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 -1.4 \cdot 10^{-48}:\\
                \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
                
                \mathbf{elif}\;B \leq 1.02 \cdot 10^{-131}:\\
                \;\;\;\;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 3 regimes
                2. if B < -1.40000000000000002e-48

                  1. Initial program 50.6%

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

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

                  if -1.40000000000000002e-48 < B < 1.02000000000000001e-131

                  1. Initial program 61.3%

                    \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
                  2. Step-by-step derivation
                    1. 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. Step-by-step derivation
                      1. +-commutative73.6%

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

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

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

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

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

                    if 1.02000000000000001e-131 < B

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.4 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.02 \cdot 10^{-131}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{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 -1.6 \cdot 10^{-298}:\\ \;\;\;\;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 -1.6e-298)
                     (* 180.0 (/ (atan 1.0) PI))
                     (* 180.0 (/ (atan -1.0) PI))))
                  double code(double A, double B, double C) {
                  	double tmp;
                  	if (B <= -1.6e-298) {
                  		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 <= -1.6e-298) {
                  		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 <= -1.6e-298:
                  		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 <= -1.6e-298)
                  		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 <= -1.6e-298)
                  		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, -1.6e-298], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;B \leq -1.6 \cdot 10^{-298}:\\
                  \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if B < -1.59999999999999999e-298

                    1. Initial program 55.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 B around -inf 47.7%

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

                    if -1.59999999999999999e-298 < B

                    1. Initial program 56.2%

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

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

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

                  Alternative 15: 21.3% 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 55.9%

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

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

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

                  Reproduce

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