ABCF->ab-angle angle

Percentage Accurate: 54.8% → 85.0%
Time: 27.8s
Alternatives: 26
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 26 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.8% 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: 85.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\

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


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

    1. Initial program 62.9%

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

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

      1. Initial program 23.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. Simplified10.4%

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

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

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

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

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

      1. Initial program 61.7%

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

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

          \[\leadsto \frac{180 \cdot \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} \]
        3. *-un-lft-identity61.7%

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

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

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

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

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

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

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

    Alternative 2: 81.7% accurate, 1.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{if}\;A \leq -4.2 \cdot 10^{+110}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -2.1 \cdot 10^{+43}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -9.4 \cdot 10^{-12}:\\ \;\;\;\;t_0\\ \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
     (let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
       (if (<= A -4.2e+110)
         t_0
         (if (<= A -2.1e+43)
           (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
           (if (<= A -9.4e-12)
             t_0
             (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI)))))))
    double code(double A, double B, double C) {
    	double t_0 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
    	double tmp;
    	if (A <= -4.2e+110) {
    		tmp = t_0;
    	} else if (A <= -2.1e+43) {
    		tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
    	} else if (A <= -9.4e-12) {
    		tmp = t_0;
    	} 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 t_0 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
    	double tmp;
    	if (A <= -4.2e+110) {
    		tmp = t_0;
    	} else if (A <= -2.1e+43) {
    		tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
    	} else if (A <= -9.4e-12) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A)))
    	tmp = 0
    	if A <= -4.2e+110:
    		tmp = t_0
    	elif A <= -2.1e+43:
    		tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi)
    	elif A <= -9.4e-12:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A))))
    	tmp = 0.0
    	if (A <= -4.2e+110)
    		tmp = t_0;
    	elseif (A <= -2.1e+43)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi));
    	elseif (A <= -9.4e-12)
    		tmp = t_0;
    	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)
    	t_0 = (180.0 / pi) * atan(((B * -0.5) / (C - A)));
    	tmp = 0.0;
    	if (A <= -4.2e+110)
    		tmp = t_0;
    	elseif (A <= -2.1e+43)
    		tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi);
    	elseif (A <= -9.4e-12)
    		tmp = t_0;
    	else
    		tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.2e+110], t$95$0, If[LessEqual[A, -2.1e+43], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.4e-12], t$95$0, 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}
    t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
    \mathbf{if}\;A \leq -4.2 \cdot 10^{+110}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;A \leq -2.1 \cdot 10^{+43}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -9.4 \cdot 10^{-12}:\\
    \;\;\;\;t_0\\
    
    \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 3 regimes
    2. if A < -4.2000000000000003e110 or -2.10000000000000002e43 < A < -9.39999999999999953e-12

      1. Initial program 20.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. Simplified23.6%

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

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

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

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

      if -4.2000000000000003e110 < A < -2.10000000000000002e43

      1. Initial program 47.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. Simplified37.1%

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

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

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

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

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

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

      if -9.39999999999999953e-12 < A

      1. Initial program 67.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. Simplified87.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}} \]
      3. Recombined 3 regimes into one program.
      4. Final simplification85.9%

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

      Alternative 3: 76.2% accurate, 1.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{if}\;A \leq -1.2 \cdot 10^{+109}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -1.2 \cdot 10^{+42}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -110000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.05 \cdot 10^{-16}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI)))
              (t_1 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
         (if (<= A -1.2e+109)
           t_1
           (if (<= A -1.2e+42)
             t_0
             (if (<= A -110000000000.0)
               t_1
               (if (<= A 1.05e-16)
                 t_0
                 (/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI)))))))
      double code(double A, double B, double C) {
      	double t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
      	double t_1 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
      	double tmp;
      	if (A <= -1.2e+109) {
      		tmp = t_1;
      	} else if (A <= -1.2e+42) {
      		tmp = t_0;
      	} else if (A <= -110000000000.0) {
      		tmp = t_1;
      	} else if (A <= 1.05e-16) {
      		tmp = t_0;
      	} else {
      		tmp = (180.0 * atan((((C - A) / B) + -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 - Math.hypot(B, C)) / B)) / Math.PI);
      	double t_1 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
      	double tmp;
      	if (A <= -1.2e+109) {
      		tmp = t_1;
      	} else if (A <= -1.2e+42) {
      		tmp = t_0;
      	} else if (A <= -110000000000.0) {
      		tmp = t_1;
      	} else if (A <= 1.05e-16) {
      		tmp = t_0;
      	} else {
      		tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
      	}
      	return tmp;
      }
      
      def code(A, B, C):
      	t_0 = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi)
      	t_1 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A)))
      	tmp = 0
      	if A <= -1.2e+109:
      		tmp = t_1
      	elif A <= -1.2e+42:
      		tmp = t_0
      	elif A <= -110000000000.0:
      		tmp = t_1
      	elif A <= 1.05e-16:
      		tmp = t_0
      	else:
      		tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi
      	return tmp
      
      function code(A, B, C)
      	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi))
      	t_1 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A))))
      	tmp = 0.0
      	if (A <= -1.2e+109)
      		tmp = t_1;
      	elseif (A <= -1.2e+42)
      		tmp = t_0;
      	elseif (A <= -110000000000.0)
      		tmp = t_1;
      	elseif (A <= 1.05e-16)
      		tmp = t_0;
      	else
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi);
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi);
      	t_1 = (180.0 / pi) * atan(((B * -0.5) / (C - A)));
      	tmp = 0.0;
      	if (A <= -1.2e+109)
      		tmp = t_1;
      	elseif (A <= -1.2e+42)
      		tmp = t_0;
      	elseif (A <= -110000000000.0)
      		tmp = t_1;
      	elseif (A <= 1.05e-16)
      		tmp = t_0;
      	else
      		tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi;
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.2e+109], t$95$1, If[LessEqual[A, -1.2e+42], t$95$0, If[LessEqual[A, -110000000000.0], t$95$1, If[LessEqual[A, 1.05e-16], t$95$0, N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
      t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
      \mathbf{if}\;A \leq -1.2 \cdot 10^{+109}:\\
      \;\;\;\;t_1\\
      
      \mathbf{elif}\;A \leq -1.2 \cdot 10^{+42}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;A \leq -110000000000:\\
      \;\;\;\;t_1\\
      
      \mathbf{elif}\;A \leq 1.05 \cdot 10^{-16}:\\
      \;\;\;\;t_0\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if A < -1.19999999999999994e109 or -1.1999999999999999e42 < A < -1.1e11

        1. Initial program 19.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. Simplified20.9%

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

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

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

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

        if -1.19999999999999994e109 < A < -1.1999999999999999e42 or -1.1e11 < A < 1.0500000000000001e-16

        1. Initial program 55.2%

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

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

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

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

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

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

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

        if 1.0500000000000001e-16 < A

        1. Initial program 81.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-*r/81.8%

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

            \[\leadsto \frac{180 \cdot \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} \]
          3. *-un-lft-identity81.8%

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 78.4% accurate, 1.6× speedup?

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

        1. Initial program 84.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. Simplified84.8%

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

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

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

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

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

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

        if -2.1e19 < C < 1.69999999999999991e29

        1. Initial program 58.6%

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

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

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

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

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

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

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

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

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

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

        if 1.69999999999999991e29 < C

        1. Initial program 26.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. Simplified57.1%

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

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

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

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

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

      Alternative 5: 59.2% accurate, 2.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{if}\;A \leq -1.2 \cdot 10^{+109}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.4 \cdot 10^{+43}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -4.2 \cdot 10^{-14}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -5 \cdot 10^{-149}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 2.4 \cdot 10^{-176}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2 \cdot 10^{-16}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (let* ((t_0 (/ (* 180.0 (atan (/ (- C B) B))) PI))
              (t_1 (* 180.0 (/ (atan (/ (+ B C) B)) PI))))
         (if (<= A -1.2e+109)
           (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
           (if (<= A -2.4e+43)
             t_0
             (if (<= A -4.2e-14)
               (/ (* 180.0 (atan (* B (/ 0.5 A)))) PI)
               (if (<= A -5e-149)
                 t_1
                 (if (<= A 2.4e-176)
                   t_0
                   (if (<= A 2e-16) t_1 (* 180.0 (/ (atan (/ (- B A) B)) PI))))))))))
      double code(double A, double B, double C) {
      	double t_0 = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
      	double t_1 = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
      	double tmp;
      	if (A <= -1.2e+109) {
      		tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
      	} else if (A <= -2.4e+43) {
      		tmp = t_0;
      	} else if (A <= -4.2e-14) {
      		tmp = (180.0 * atan((B * (0.5 / A)))) / ((double) M_PI);
      	} else if (A <= -5e-149) {
      		tmp = t_1;
      	} else if (A <= 2.4e-176) {
      		tmp = t_0;
      	} else if (A <= 2e-16) {
      		tmp = t_1;
      	} else {
      		tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
      	}
      	return tmp;
      }
      
      public static double code(double A, double B, double C) {
      	double t_0 = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
      	double t_1 = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
      	double tmp;
      	if (A <= -1.2e+109) {
      		tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
      	} else if (A <= -2.4e+43) {
      		tmp = t_0;
      	} else if (A <= -4.2e-14) {
      		tmp = (180.0 * Math.atan((B * (0.5 / A)))) / Math.PI;
      	} else if (A <= -5e-149) {
      		tmp = t_1;
      	} else if (A <= 2.4e-176) {
      		tmp = t_0;
      	} else if (A <= 2e-16) {
      		tmp = t_1;
      	} else {
      		tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
      	}
      	return tmp;
      }
      
      def code(A, B, C):
      	t_0 = (180.0 * math.atan(((C - B) / B))) / math.pi
      	t_1 = 180.0 * (math.atan(((B + C) / B)) / math.pi)
      	tmp = 0
      	if A <= -1.2e+109:
      		tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
      	elif A <= -2.4e+43:
      		tmp = t_0
      	elif A <= -4.2e-14:
      		tmp = (180.0 * math.atan((B * (0.5 / A)))) / math.pi
      	elif A <= -5e-149:
      		tmp = t_1
      	elif A <= 2.4e-176:
      		tmp = t_0
      	elif A <= 2e-16:
      		tmp = t_1
      	else:
      		tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi)
      	return tmp
      
      function code(A, B, C)
      	t_0 = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi)
      	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi))
      	tmp = 0.0
      	if (A <= -1.2e+109)
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi));
      	elseif (A <= -2.4e+43)
      		tmp = t_0;
      	elseif (A <= -4.2e-14)
      		tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(0.5 / A)))) / pi);
      	elseif (A <= -5e-149)
      		tmp = t_1;
      	elseif (A <= 2.4e-176)
      		tmp = t_0;
      	elseif (A <= 2e-16)
      		tmp = t_1;
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi));
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	t_0 = (180.0 * atan(((C - B) / B))) / pi;
      	t_1 = 180.0 * (atan(((B + C) / B)) / pi);
      	tmp = 0.0;
      	if (A <= -1.2e+109)
      		tmp = 180.0 * (atan(((B * 0.5) / A)) / pi);
      	elseif (A <= -2.4e+43)
      		tmp = t_0;
      	elseif (A <= -4.2e-14)
      		tmp = (180.0 * atan((B * (0.5 / A)))) / pi;
      	elseif (A <= -5e-149)
      		tmp = t_1;
      	elseif (A <= 2.4e-176)
      		tmp = t_0;
      	elseif (A <= 2e-16)
      		tmp = t_1;
      	else
      		tmp = 180.0 * (atan(((B - A) / B)) / pi);
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.2e+109], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.4e+43], t$95$0, If[LessEqual[A, -4.2e-14], N[(N[(180.0 * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -5e-149], t$95$1, If[LessEqual[A, 2.4e-176], t$95$0, If[LessEqual[A, 2e-16], t$95$1, N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
      t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
      \mathbf{if}\;A \leq -1.2 \cdot 10^{+109}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
      
      \mathbf{elif}\;A \leq -2.4 \cdot 10^{+43}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;A \leq -4.2 \cdot 10^{-14}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
      
      \mathbf{elif}\;A \leq -5 \cdot 10^{-149}:\\
      \;\;\;\;t_1\\
      
      \mathbf{elif}\;A \leq 2.4 \cdot 10^{-176}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;A \leq 2 \cdot 10^{-16}:\\
      \;\;\;\;t_1\\
      
      \mathbf{else}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if A < -1.19999999999999994e109

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

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

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

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

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

        if -1.19999999999999994e109 < A < -2.40000000000000023e43 or -4.99999999999999968e-149 < A < 2.40000000000000006e-176

        1. Initial program 51.9%

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

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

            \[\leadsto \frac{180 \cdot \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} \]
          3. *-un-lft-identity51.9%

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

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

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

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

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

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

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

        if -2.40000000000000023e43 < A < -4.1999999999999998e-14

        1. Initial program 15.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. Simplified14.0%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\sqrt[3]{{\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{A} \cdot B\right)}{\pi}\right)}^{3}}} \]
        10. Step-by-step derivation
          1. rem-cbrt-cube58.3%

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

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

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

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

        if -4.1999999999999998e-14 < A < -4.99999999999999968e-149 or 2.40000000000000006e-176 < A < 2e-16

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

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

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

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

        if 2e-16 < A

        1. Initial program 81.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. Simplified81.3%

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.2 \cdot 10^{+109}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.4 \cdot 10^{+43}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.2 \cdot 10^{-14}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -5 \cdot 10^{-149}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.4 \cdot 10^{-176}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2 \cdot 10^{-16}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \end{array} \]

      Alternative 6: 49.6% accurate, 2.4× speedup?

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

        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. Simplified35.7%

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.42e-297 < A < 4.2e-178

        1. Initial program 46.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. Simplified46.7%

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

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

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

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

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

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

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

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

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

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

        if 4.2e-178 < A < 1.50000000000000002e-122

        1. Initial program 82.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. Simplified82.9%

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

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

        if 1.50000000000000002e-122 < A < 3.9000000000000002e-60

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

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

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

        if 3.9000000000000002e-60 < A

        1. Initial program 81.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. Simplified81.3%

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.42 \cdot 10^{-297}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.2 \cdot 10^{-178}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.5 \cdot 10^{-122}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]

      Alternative 7: 62.7% accurate, 2.4× 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.08 \cdot 10^{-280}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-269}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-80}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{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.08e-280)
           t_0
           (if (<= B 2.1e-269)
             (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
             (if (<= B 5.2e-80) t_0 (/ (* 180.0 (atan (/ (- C B) 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.08e-280) {
      		tmp = t_0;
      	} else if (B <= 2.1e-269) {
      		tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
      	} else if (B <= 5.2e-80) {
      		tmp = t_0;
      	} else {
      		tmp = (180.0 * atan(((C - B) / 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.08e-280) {
      		tmp = t_0;
      	} else if (B <= 2.1e-269) {
      		tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
      	} else if (B <= 5.2e-80) {
      		tmp = t_0;
      	} else {
      		tmp = (180.0 * Math.atan(((C - B) / 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.08e-280:
      		tmp = t_0
      	elif B <= 2.1e-269:
      		tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi
      	elif B <= 5.2e-80:
      		tmp = t_0
      	else:
      		tmp = (180.0 * math.atan(((C - B) / 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.08e-280)
      		tmp = t_0;
      	elseif (B <= 2.1e-269)
      		tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi);
      	elseif (B <= 5.2e-80)
      		tmp = t_0;
      	else
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / 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.08e-280)
      		tmp = t_0;
      	elseif (B <= 2.1e-269)
      		tmp = (180.0 * atan((0.5 * (B / A)))) / pi;
      	elseif (B <= 5.2e-80)
      		tmp = t_0;
      	else
      		tmp = (180.0 * atan(((C - B) / 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.08e-280], t$95$0, If[LessEqual[B, 2.1e-269], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 5.2e-80], t$95$0, N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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.08 \cdot 10^{-280}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;B \leq 2.1 \cdot 10^{-269}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
      
      \mathbf{elif}\;B \leq 5.2 \cdot 10^{-80}:\\
      \;\;\;\;t_0\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if B < -1.07999999999999996e-280 or 2.10000000000000005e-269 < B < 5.2000000000000002e-80

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

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

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

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

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

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

        if -1.07999999999999996e-280 < B < 2.10000000000000005e-269

        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. associate-*r/54.8%

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

            \[\leadsto \frac{180 \cdot \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} \]
          3. *-un-lft-identity54.8%

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

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

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

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

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

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

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

        if 5.2000000000000002e-80 < B

        1. Initial program 54.9%

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

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

            \[\leadsto \frac{180 \cdot \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} \]
          3. *-un-lft-identity54.9%

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.08 \cdot 10^{-280}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-269}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-80}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \end{array} \]

      Alternative 8: 46.6% accurate, 2.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -4.3 \cdot 10^{-13}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4.4 \cdot 10^{-134}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-260}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.7 \cdot 10^{-80}:\\ \;\;\;\;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 (- (/ A B))) PI))))
         (if (<= B -4.3e-13)
           (* 180.0 (/ (atan 1.0) PI))
           (if (<= B -4.4e-134)
             t_0
             (if (<= B 2.1e-260)
               (* 180.0 (/ (atan (/ 0.0 B)) PI))
               (if (<= B 5.7e-80) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
      double code(double A, double B, double C) {
      	double t_0 = 180.0 * (atan(-(A / B)) / ((double) M_PI));
      	double tmp;
      	if (B <= -4.3e-13) {
      		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
      	} else if (B <= -4.4e-134) {
      		tmp = t_0;
      	} else if (B <= 2.1e-260) {
      		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
      	} else if (B <= 5.7e-80) {
      		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(-(A / B)) / Math.PI);
      	double tmp;
      	if (B <= -4.3e-13) {
      		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
      	} else if (B <= -4.4e-134) {
      		tmp = t_0;
      	} else if (B <= 2.1e-260) {
      		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
      	} else if (B <= 5.7e-80) {
      		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(-(A / B)) / math.pi)
      	tmp = 0
      	if B <= -4.3e-13:
      		tmp = 180.0 * (math.atan(1.0) / math.pi)
      	elif B <= -4.4e-134:
      		tmp = t_0
      	elif B <= 2.1e-260:
      		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
      	elif B <= 5.7e-80:
      		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(-Float64(A / B))) / pi))
      	tmp = 0.0
      	if (B <= -4.3e-13)
      		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
      	elseif (B <= -4.4e-134)
      		tmp = t_0;
      	elseif (B <= 2.1e-260)
      		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
      	elseif (B <= 5.7e-80)
      		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(-(A / B)) / pi);
      	tmp = 0.0;
      	if (B <= -4.3e-13)
      		tmp = 180.0 * (atan(1.0) / pi);
      	elseif (B <= -4.4e-134)
      		tmp = t_0;
      	elseif (B <= 2.1e-260)
      		tmp = 180.0 * (atan((0.0 / B)) / pi);
      	elseif (B <= 5.7e-80)
      		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[(A / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.3e-13], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.4e-134], t$95$0, If[LessEqual[B, 2.1e-260], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.7e-80], 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{A}{B}\right)}{\pi}\\
      \mathbf{if}\;B \leq -4.3 \cdot 10^{-13}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
      
      \mathbf{elif}\;B \leq -4.4 \cdot 10^{-134}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;B \leq 2.1 \cdot 10^{-260}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
      
      \mathbf{elif}\;B \leq 5.7 \cdot 10^{-80}:\\
      \;\;\;\;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 < -4.2999999999999999e-13

        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. Simplified51.0%

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

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

        if -4.2999999999999999e-13 < B < -4.3999999999999999e-134 or 2.10000000000000005e-260 < B < 5.6999999999999999e-80

        1. Initial program 68.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. Simplified67.1%

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

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

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

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

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

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

        if -4.3999999999999999e-134 < B < 2.10000000000000005e-260

        1. Initial program 57.0%

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

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

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

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

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

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

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

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

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

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

        if 5.6999999999999999e-80 < B

        1. Initial program 54.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. Simplified55.0%

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.3 \cdot 10^{-13}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4.4 \cdot 10^{-134}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-260}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.7 \cdot 10^{-80}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

      Alternative 9: 49.6% accurate, 2.4× speedup?

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

        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. Simplified35.7%

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

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

        if -2.6000000000000001e-297 < A < 1.3500000000000001e-177

        1. Initial program 46.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. Simplified46.7%

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

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

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

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

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

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

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

        if 1.3500000000000001e-177 < A < 1.02000000000000002e-122

        1. Initial program 82.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. Simplified82.9%

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

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

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

        if 1.02000000000000002e-122 < A < 1.64999999999999991e-59

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

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

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

        if 1.64999999999999991e-59 < A

        1. Initial program 81.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. Simplified81.3%

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.6 \cdot 10^{-297}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.35 \cdot 10^{-177}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.02 \cdot 10^{-122}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.65 \cdot 10^{-59}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \end{array} \]

      Alternative 10: 49.6% accurate, 2.4× speedup?

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

        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. Simplified35.7%

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

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

        if -3.3000000000000002e-299 < A < 2.3999999999999999e-177

        1. Initial program 46.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. Simplified46.7%

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

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

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

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

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

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

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

        if 2.3999999999999999e-177 < A < 2.00000000000000012e-122

        1. Initial program 82.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. Simplified82.9%

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

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

        if 2.00000000000000012e-122 < A < 4.1999999999999998e-61

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

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

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

        if 4.1999999999999998e-61 < A

        1. Initial program 81.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. Simplified81.3%

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.3 \cdot 10^{-299}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.4 \cdot 10^{-177}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2 \cdot 10^{-122}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.2 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \end{array} \]

      Alternative 11: 49.5% accurate, 2.4× speedup?

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

        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. Simplified35.7%

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.5999999999999998e-297 < A < 5.9999999999999997e-178

        1. Initial program 46.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. Simplified46.7%

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

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

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

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

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

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

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

        if 5.9999999999999997e-178 < A < 1.3200000000000001e-122

        1. Initial program 82.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. Simplified82.9%

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

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

        if 1.3200000000000001e-122 < A < 9.79999999999999954e-59

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

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

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

        if 9.79999999999999954e-59 < A

        1. Initial program 81.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. Simplified81.3%

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.6 \cdot 10^{-297}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 6 \cdot 10^{-178}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.32 \cdot 10^{-122}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 9.8 \cdot 10^{-59}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \end{array} \]

      Alternative 12: 49.5% accurate, 2.4× speedup?

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

        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. Simplified35.7%

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

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

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

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

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

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

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

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

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

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

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

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

        if -3.0999999999999997e-297 < A < 5.20000000000000011e-179

        1. Initial program 46.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. Simplified46.7%

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

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

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

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

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

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

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

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

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

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

        if 5.20000000000000011e-179 < A < 1.19999999999999994e-122

        1. Initial program 82.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. Simplified82.9%

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

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

        if 1.19999999999999994e-122 < A < 3.79999999999999994e-60

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

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

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

        if 3.79999999999999994e-60 < A

        1. Initial program 81.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. Simplified81.3%

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.1 \cdot 10^{-297}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5.2 \cdot 10^{-179}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-122}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \end{array} \]

      Alternative 13: 46.7% accurate, 2.4× speedup?

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

        1. Initial program 84.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. Simplified84.8%

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

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

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

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

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

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

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

        if -5.6e15 < C < 2.3000000000000001e-270

        1. Initial program 63.7%

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1 \cdot A}{B}\right)}}{\pi} \]
          2. 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} \color{blue}{\left(\frac{-A}{B}\right)}}{\pi} \]

        if 2.3000000000000001e-270 < C < 1.42000000000000004e-67

        1. Initial program 54.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. Simplified51.8%

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

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

        if 1.42000000000000004e-67 < C

        1. Initial program 30.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. Simplified29.3%

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

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

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

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

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

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

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

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

      Alternative 14: 66.5% accurate, 2.4× speedup?

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

        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. Simplified55.1%

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

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

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

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

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

        if -2.45e-281 < B < 3.59999999999999998e-269

        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. associate-*r/54.8%

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

            \[\leadsto \frac{180 \cdot \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} \]
          3. *-un-lft-identity54.8%

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

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

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

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

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

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

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

        if 3.59999999999999998e-269 < B

        1. Initial program 58.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. Simplified58.4%

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

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

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

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

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

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

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

      Alternative 15: 63.7% accurate, 2.4× speedup?

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

        1. Initial program 31.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. Simplified43.6%

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

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

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

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

        if -3.5499999999999999e-121 < A

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

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

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

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

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

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

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

      Alternative 16: 57.3% accurate, 2.4× speedup?

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

        1. Initial program 28.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.6e-7 < A < 3.99999999999999992e-12

        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. Simplified58.0%

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

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

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

        if 3.99999999999999992e-12 < A

        1. Initial program 81.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. Simplified81.3%

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

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

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

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

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

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

      Alternative 17: 59.7% accurate, 2.4× speedup?

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

        1. Initial program 28.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -3.5000000000000002e-14 < A < 6.80000000000000031e-13

        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. Simplified58.0%

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

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

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

        if 6.80000000000000031e-13 < A

        1. Initial program 81.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. Simplified81.3%

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

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

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

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

      Alternative 18: 59.7% accurate, 2.4× speedup?

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

        1. Initial program 28.0%

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

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

            \[\leadsto \frac{180 \cdot \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} \]
          3. *-un-lft-identity28.0%

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

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

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

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

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

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

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

        if -0.0011800000000000001 < A < 2.2e-16

        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. Simplified58.0%

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

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

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

        if 2.2e-16 < A

        1. Initial program 81.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. Simplified81.3%

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

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

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

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

      Alternative 19: 59.7% accurate, 2.4× speedup?

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

        1. Initial program 28.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\sqrt[3]{{\left(180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{A} \cdot B\right)}{\pi}\right)}^{3}}} \]
        10. Step-by-step derivation
          1. rem-cbrt-cube63.0%

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

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

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

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

        if -1.99999999999999989e-20 < A < 3.20000000000000023e-16

        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. Simplified58.0%

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

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

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

        if 3.20000000000000023e-16 < A

        1. Initial program 81.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. Simplified81.3%

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

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

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

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

      Alternative 20: 63.7% accurate, 2.4× speedup?

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

        1. Initial program 31.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. Simplified43.6%

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

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

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

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

        if -2.1e-120 < A

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

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

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

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

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

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

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

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

      Alternative 21: 63.7% accurate, 2.4× speedup?

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

        1. Initial program 31.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. Simplified43.6%

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

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

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

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

        if -4.5000000000000003e-121 < A

        1. Initial program 71.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-*r/71.2%

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

            \[\leadsto \frac{180 \cdot \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} \]
          3. *-un-lft-identity71.2%

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 22: 44.4% accurate, 2.5× speedup?

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

        1. Initial program 54.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. Simplified54.7%

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

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

        if -1.75e-114 < B < 1.55000000000000007e-108

        1. Initial program 60.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. Simplified55.5%

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

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

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

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

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

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

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

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

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

        if 1.55000000000000007e-108 < B

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

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

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

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

      Alternative 23: 46.6% accurate, 2.5× speedup?

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

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

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

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

        if -1.15000000000000005e-41 < B < 3.39999999999999997e-111

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

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

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

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

        if 3.39999999999999997e-111 < B

        1. Initial program 55.3%

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

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

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

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

      Alternative 24: 46.5% accurate, 2.5× speedup?

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

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

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

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

        if -1.8999999999999999e-41 < B < 7.49999999999999978e-118

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

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

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

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

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

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

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

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

        if 7.49999999999999978e-118 < B

        1. Initial program 55.3%

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

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

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

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

      Alternative 25: 39.7% accurate, 2.5× 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 56.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. Simplified54.5%

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

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

        if -1.999999999999994e-310 < B

        1. Initial program 58.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. Simplified56.2%

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

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

        \[\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 26: 20.8% 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 57.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. Simplified55.4%

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

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

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

      Reproduce

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