ABCF->ab-angle angle

Percentage Accurate: 53.1% → 80.4%
Time: 19.8s
Alternatives: 11
Speedup: 3.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 53.1% accurate, 1.0× speedup?

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

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

Alternative 1: 80.4% accurate, 1.9× speedup?

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

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


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

    1. Initial program 11.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 80.0%

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

    if -5.5999999999999997e91 < A

    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. Simplified82.9%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.6 \cdot 10^{+91}:\\ \;\;\;\;180 \cdot \frac{\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 2: 54.1% accurate, 3.2× speedup?

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

      1. Initial program 11.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 80.0%

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

      if -1.3999999999999999e89 < A < -4.2e-197 or -5.5000000000000001e-269 < A < 1.49999999999999994e-35

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

        \[\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+54.3%

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

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

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

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

      if -4.2e-197 < A < -5.5000000000000001e-269

      1. Initial program 37.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 48.0%

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

      if 1.49999999999999994e-35 < A

      1. Initial program 80.2%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.4 \cdot 10^{+89}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.2 \cdot 10^{-197}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -5.5 \cdot 10^{-269}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 1.5 \cdot 10^{-35}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \]

    Alternative 3: 56.4% accurate, 3.2× speedup?

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

      1. Initial program 11.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 80.0%

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

      if -1.3999999999999999e89 < A < -4.20000000000000024e-201 or -5.5000000000000001e-269 < A < 4.40000000000000011e-33

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

        \[\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+54.3%

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

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

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

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

      if -4.20000000000000024e-201 < A < -5.5000000000000001e-269

      1. Initial program 37.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 48.0%

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

      if 4.40000000000000011e-33 < A

      1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.4 \cdot 10^{+89}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.2 \cdot 10^{-201}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -5.5 \cdot 10^{-269}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 4.4 \cdot 10^{-33}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

    Alternative 4: 61.0% accurate, 3.3× speedup?

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

      1. Initial program 57.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 63.0%

        \[\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+63.0%

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

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

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

      if -1.1999999999999999e-189 < B < -1.2500000000000001e-294

      1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

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

      if 3.2e19 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.2 \cdot 10^{-189}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.25 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot 0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.2 \cdot 10^{+19}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

    Alternative 5: 64.2% accurate, 3.4× speedup?

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

      1. Initial program 54.8%

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

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

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

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

        if -2.59999999999999987e-143 < B < -1.4999999999999999e-294

        1. Initial program 29.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.4999999999999999e-294 < B

        1. Initial program 52.7%

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

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

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

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

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

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

        Alternative 6: 65.0% accurate, 3.5× speedup?

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

          1. Initial program 53.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 69.7%

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

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

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

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

          if -4.59999999999999984e-190 < B < -1.2500000000000001e-294

          1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

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

          if -1.2500000000000001e-294 < B

          1. Initial program 52.7%

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

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

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

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

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

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

          Alternative 7: 65.0% accurate, 3.5× speedup?

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

            1. Initial program 53.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. Simplified73.9%

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

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

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

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

              if -4.40000000000000008e-190 < B < -1.39999999999999995e-294

              1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

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

              if -1.39999999999999995e-294 < B

              1. Initial program 52.7%

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

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

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

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

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

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

              Alternative 8: 48.3% accurate, 3.5× speedup?

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

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

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

                if -1.90000000000000005e-271 < A < 1.69999999999999989e-32

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

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

                if 1.69999999999999989e-32 < A

                1. Initial program 80.2%

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.9 \cdot 10^{-271}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.7 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \]

              Alternative 9: 46.8% accurate, 3.6× speedup?

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

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

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

                if -6900 < B < 4.8e19

                1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 4.8e19 < B

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

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

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

              Alternative 10: 40.1% accurate, 3.8× speedup?

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

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

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

                if -1.999999999999994e-310 < B

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

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

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

              Alternative 11: 21.2% accurate, 4.0× speedup?

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

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

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

              Reproduce

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