ABCF->ab-angle angle

Percentage Accurate: 53.4% → 80.1%
Time: 24.6s
Alternatives: 16
Speedup: 3.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 53.4% accurate, 1.0× speedup?

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

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

Alternative 1: 80.1% accurate, 1.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -6.5000000000000005e154

    1. Initial program 13.2%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
    3. Simplified13.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}^{2}}\right)\right)\right)}{\pi}} \]
    4. Add Preprocessing
    5. Taylor expanded in A around -inf 78.8%

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

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

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

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

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

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

    if -6.5000000000000005e154 < A < -2.4e-245

    1. Initial program 49.7%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
    3. Simplified47.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}^{2}}\right)\right)\right)}{\pi}} \]
    4. Add Preprocessing
    5. Taylor expanded in A around 0 47.4%

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

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

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

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

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

    if -2.4e-245 < A < -9.5000000000000006e-269

    1. Initial program 25.8%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
    3. Simplified25.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}^{2}}\right)\right)\right)}{\pi}} \]
    4. Add Preprocessing
    5. Taylor expanded in A around 0 25.8%

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

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

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

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

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

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

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

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

    if -9.5000000000000006e-269 < A

    1. Initial program 69.6%

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

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

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

    Alternative 2: 81.8% accurate, 1.0× speedup?

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

      1. Initial program 59.8%

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

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

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

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

      if 5.09999999999999967e159 < C

      1. Initial program 8.7%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
      3. Simplified8.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}^{2}}\right)\right)\right)}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in A around 0 8.7%

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

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

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

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

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

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

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

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

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

    Alternative 3: 74.1% accurate, 1.8× 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}\\ \mathbf{if}\;A \leq -5.2 \cdot 10^{+154}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.4 \cdot 10^{-245}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;A \leq -9.5 \cdot 10^{-269}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 8.5 \cdot 10^{+114}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B} + -0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))))
       (if (<= A -5.2e+154)
         (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
         (if (<= A -2.4e-245)
           t_0
           (if (<= A -9.5e-269)
             (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
             (if (<= A 8.5e+114)
               t_0
               (* 180.0 (/ (atan (+ (* -2.0 (/ A B)) (* -0.5 (/ B A)))) PI))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
    	double tmp;
    	if (A <= -5.2e+154) {
    		tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
    	} else if (A <= -2.4e-245) {
    		tmp = t_0;
    	} else if (A <= -9.5e-269) {
    		tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
    	} else if (A <= 8.5e+114) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (atan(((-2.0 * (A / B)) + (-0.5 * (B / A)))) / ((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 tmp;
    	if (A <= -5.2e+154) {
    		tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
    	} else if (A <= -2.4e-245) {
    		tmp = t_0;
    	} else if (A <= -9.5e-269) {
    		tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
    	} else if (A <= 8.5e+114) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (Math.atan(((-2.0 * (A / B)) + (-0.5 * (B / A)))) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi)
    	tmp = 0
    	if A <= -5.2e+154:
    		tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi
    	elif A <= -2.4e-245:
    		tmp = t_0
    	elif A <= -9.5e-269:
    		tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi)
    	elif A <= 8.5e+114:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan(((-2.0 * (A / B)) + (-0.5 * (B / A)))) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi))
    	tmp = 0.0
    	if (A <= -5.2e+154)
    		tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi);
    	elseif (A <= -2.4e-245)
    		tmp = t_0;
    	elseif (A <= -9.5e-269)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi));
    	elseif (A <= 8.5e+114)
    		tmp = t_0;
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-2.0 * Float64(A / B)) + Float64(-0.5 * Float64(B / A)))) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi);
    	tmp = 0.0;
    	if (A <= -5.2e+154)
    		tmp = (180.0 * atan((0.5 * (B / A)))) / pi;
    	elseif (A <= -2.4e-245)
    		tmp = t_0;
    	elseif (A <= -9.5e-269)
    		tmp = 180.0 * (atan(((B * -0.5) / C)) / pi);
    	elseif (A <= 8.5e+114)
    		tmp = t_0;
    	else
    		tmp = 180.0 * (atan(((-2.0 * (A / B)) + (-0.5 * (B / A)))) / 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]}, If[LessEqual[A, -5.2e+154], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -2.4e-245], t$95$0, If[LessEqual[A, -9.5e-269], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 8.5e+114], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
    \mathbf{if}\;A \leq -5.2 \cdot 10^{+154}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -2.4 \cdot 10^{-245}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;A \leq -9.5 \cdot 10^{-269}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq 8.5 \cdot 10^{+114}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B} + -0.5 \cdot \frac{B}{A}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if A < -5.19999999999999978e154

      1. Initial program 13.2%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
      3. Simplified13.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}^{2}}\right)\right)\right)}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in A around -inf 78.8%

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

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

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

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

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

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

      if -5.19999999999999978e154 < A < -2.4e-245 or -9.5000000000000006e-269 < A < 8.5000000000000001e114

      1. Initial program 55.0%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
      3. Simplified53.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}^{2}}\right)\right)\right)}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in A around 0 50.7%

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

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

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

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

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

      if -2.4e-245 < A < -9.5000000000000006e-269

      1. Initial program 25.8%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
      3. Simplified25.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}^{2}}\right)\right)\right)}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in A around 0 25.8%

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

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

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

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

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

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

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

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

      if 8.5000000000000001e114 < A

      1. Initial program 89.5%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
      3. Simplified89.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}^{2}}\right)\right)\right)}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in C around 0 89.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.2 \cdot 10^{+154}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.4 \cdot 10^{-245}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -9.5 \cdot 10^{-269}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 8.5 \cdot 10^{+114}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B} + -0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 78.4% accurate, 1.9× speedup?

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

      1. Initial program 77.7%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
      3. Simplified76.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}^{2}}\right)\right)\right)}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in A around 0 75.9%

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

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

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

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

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

      if -2.5000000000000001e-55 < C < 3.0999999999999998e159

      1. Initial program 51.4%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
      3. Simplified50.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}^{2}}\right)\right)\right)}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in C around 0 48.8%

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

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

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

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

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

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

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

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

      if 3.0999999999999998e159 < C

      1. Initial program 8.7%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
      3. Simplified8.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}^{2}}\right)\right)\right)}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in A around 0 8.7%

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

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

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

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

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

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

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

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

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

    Alternative 5: 80.9% accurate, 1.9× speedup?

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

      1. Initial program 59.8%

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

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

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

        if 1.80000000000000018e159 < C

        1. Initial program 8.7%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified8.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in A around 0 8.7%

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

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

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

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

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

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

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

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

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

      Alternative 6: 54.8% accurate, 3.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;C \leq -2.7 \cdot 10^{-27}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;C \leq 2.65 \cdot 10^{+76} \lor \neg \left(C \leq 1.15 \cdot 10^{+103}\right) \land C \leq 4.4 \cdot 10^{+159}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (if (<= C -2.7e-27)
         (* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
         (if (or (<= C 2.65e+76) (and (not (<= C 1.15e+103)) (<= C 4.4e+159)))
           (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
           (* 180.0 (/ (atan (/ (* B -0.5) C)) PI)))))
      double code(double A, double B, double C) {
      	double tmp;
      	if (C <= -2.7e-27) {
      		tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
      	} else if ((C <= 2.65e+76) || (!(C <= 1.15e+103) && (C <= 4.4e+159))) {
      		tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
      	} else {
      		tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
      	}
      	return tmp;
      }
      
      public static double code(double A, double B, double C) {
      	double tmp;
      	if (C <= -2.7e-27) {
      		tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
      	} else if ((C <= 2.65e+76) || (!(C <= 1.15e+103) && (C <= 4.4e+159))) {
      		tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
      	} else {
      		tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
      	}
      	return tmp;
      }
      
      def code(A, B, C):
      	tmp = 0
      	if C <= -2.7e-27:
      		tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi)
      	elif (C <= 2.65e+76) or (not (C <= 1.15e+103) and (C <= 4.4e+159)):
      		tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi)
      	else:
      		tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi)
      	return tmp
      
      function code(A, B, C)
      	tmp = 0.0
      	if (C <= -2.7e-27)
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi));
      	elseif ((C <= 2.65e+76) || (!(C <= 1.15e+103) && (C <= 4.4e+159)))
      		tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi));
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi));
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	tmp = 0.0;
      	if (C <= -2.7e-27)
      		tmp = 180.0 * (atan(((C / B) * 2.0)) / pi);
      	elseif ((C <= 2.65e+76) || (~((C <= 1.15e+103)) && (C <= 4.4e+159)))
      		tmp = 180.0 * (atan((1.0 - (A / B))) / pi);
      	else
      		tmp = 180.0 * (atan(((B * -0.5) / C)) / pi);
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := If[LessEqual[C, -2.7e-27], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 2.65e+76], And[N[Not[LessEqual[C, 1.15e+103]], $MachinePrecision], LessEqual[C, 4.4e+159]]], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;C \leq -2.7 \cdot 10^{-27}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
      
      \mathbf{elif}\;C \leq 2.65 \cdot 10^{+76} \lor \neg \left(C \leq 1.15 \cdot 10^{+103}\right) \land C \leq 4.4 \cdot 10^{+159}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if C < -2.69999999999999989e-27

        1. Initial program 77.6%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified76.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in C around -inf 72.6%

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

        if -2.69999999999999989e-27 < C < 2.65000000000000008e76 or 1.15000000000000004e103 < C < 4.3999999999999998e159

        1. Initial program 53.6%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified52.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in C around 0 50.3%

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

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

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

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

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

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

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

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

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

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

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

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

        if 2.65000000000000008e76 < C < 1.15000000000000004e103 or 4.3999999999999998e159 < C

        1. Initial program 10.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--l-10.9%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified10.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in A around 0 13.7%

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -2.7 \cdot 10^{-27}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;C \leq 2.65 \cdot 10^{+76} \lor \neg \left(C \leq 1.15 \cdot 10^{+103}\right) \land C \leq 4.4 \cdot 10^{+159}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 7: 56.8% accurate, 3.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;C \leq -9.5 \cdot 10^{-212}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.26 \cdot 10^{+76} \lor \neg \left(C \leq 1.6 \cdot 10^{+103}\right) \land C \leq 1.8 \cdot 10^{+159}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (if (<= C -9.5e-212)
         (* 180.0 (/ (atan (/ (+ C B) B)) PI))
         (if (or (<= C 1.26e+76) (and (not (<= C 1.6e+103)) (<= C 1.8e+159)))
           (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
           (* 180.0 (/ (atan (/ (* B -0.5) C)) PI)))))
      double code(double A, double B, double C) {
      	double tmp;
      	if (C <= -9.5e-212) {
      		tmp = 180.0 * (atan(((C + B) / B)) / ((double) M_PI));
      	} else if ((C <= 1.26e+76) || (!(C <= 1.6e+103) && (C <= 1.8e+159))) {
      		tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
      	} else {
      		tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
      	}
      	return tmp;
      }
      
      public static double code(double A, double B, double C) {
      	double tmp;
      	if (C <= -9.5e-212) {
      		tmp = 180.0 * (Math.atan(((C + B) / B)) / Math.PI);
      	} else if ((C <= 1.26e+76) || (!(C <= 1.6e+103) && (C <= 1.8e+159))) {
      		tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
      	} else {
      		tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
      	}
      	return tmp;
      }
      
      def code(A, B, C):
      	tmp = 0
      	if C <= -9.5e-212:
      		tmp = 180.0 * (math.atan(((C + B) / B)) / math.pi)
      	elif (C <= 1.26e+76) or (not (C <= 1.6e+103) and (C <= 1.8e+159)):
      		tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi)
      	else:
      		tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi)
      	return tmp
      
      function code(A, B, C)
      	tmp = 0.0
      	if (C <= -9.5e-212)
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + B) / B)) / pi));
      	elseif ((C <= 1.26e+76) || (!(C <= 1.6e+103) && (C <= 1.8e+159)))
      		tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi));
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi));
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	tmp = 0.0;
      	if (C <= -9.5e-212)
      		tmp = 180.0 * (atan(((C + B) / B)) / pi);
      	elseif ((C <= 1.26e+76) || (~((C <= 1.6e+103)) && (C <= 1.8e+159)))
      		tmp = 180.0 * (atan((1.0 - (A / B))) / pi);
      	else
      		tmp = 180.0 * (atan(((B * -0.5) / C)) / pi);
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := If[LessEqual[C, -9.5e-212], N[(180.0 * N[(N[ArcTan[N[(N[(C + B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 1.26e+76], And[N[Not[LessEqual[C, 1.6e+103]], $MachinePrecision], LessEqual[C, 1.8e+159]]], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;C \leq -9.5 \cdot 10^{-212}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\
      
      \mathbf{elif}\;C \leq 1.26 \cdot 10^{+76} \lor \neg \left(C \leq 1.6 \cdot 10^{+103}\right) \land C \leq 1.8 \cdot 10^{+159}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if C < -9.50000000000000029e-212

        1. Initial program 72.2%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified70.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in A around 0 67.2%

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

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

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

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

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

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

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

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

        if -9.50000000000000029e-212 < C < 1.26000000000000007e76 or 1.59999999999999996e103 < C < 1.80000000000000018e159

        1. Initial program 49.8%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified49.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in C around 0 49.5%

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.26000000000000007e76 < C < 1.59999999999999996e103 or 1.80000000000000018e159 < C

        1. Initial program 10.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--l-10.9%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified10.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in A around 0 13.7%

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -9.5 \cdot 10^{-212}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.26 \cdot 10^{+76} \lor \neg \left(C \leq 1.6 \cdot 10^{+103}\right) \land C \leq 1.8 \cdot 10^{+159}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 8: 57.8% accurate, 3.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;C \leq -7 \cdot 10^{-76}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.12 \cdot 10^{+78} \lor \neg \left(C \leq 3.8 \cdot 10^{+102}\right) \land C \leq 1.8 \cdot 10^{+159}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (if (<= C -7e-76)
         (* 180.0 (/ (atan (/ (- C B) B)) PI))
         (if (or (<= C 1.12e+78) (and (not (<= C 3.8e+102)) (<= C 1.8e+159)))
           (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
           (* 180.0 (/ (atan (/ (* B -0.5) C)) PI)))))
      double code(double A, double B, double C) {
      	double tmp;
      	if (C <= -7e-76) {
      		tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
      	} else if ((C <= 1.12e+78) || (!(C <= 3.8e+102) && (C <= 1.8e+159))) {
      		tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
      	} else {
      		tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
      	}
      	return tmp;
      }
      
      public static double code(double A, double B, double C) {
      	double tmp;
      	if (C <= -7e-76) {
      		tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
      	} else if ((C <= 1.12e+78) || (!(C <= 3.8e+102) && (C <= 1.8e+159))) {
      		tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
      	} else {
      		tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
      	}
      	return tmp;
      }
      
      def code(A, B, C):
      	tmp = 0
      	if C <= -7e-76:
      		tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi)
      	elif (C <= 1.12e+78) or (not (C <= 3.8e+102) and (C <= 1.8e+159)):
      		tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi)
      	else:
      		tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi)
      	return tmp
      
      function code(A, B, C)
      	tmp = 0.0
      	if (C <= -7e-76)
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi));
      	elseif ((C <= 1.12e+78) || (!(C <= 3.8e+102) && (C <= 1.8e+159)))
      		tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi));
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi));
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	tmp = 0.0;
      	if (C <= -7e-76)
      		tmp = 180.0 * (atan(((C - B) / B)) / pi);
      	elseif ((C <= 1.12e+78) || (~((C <= 3.8e+102)) && (C <= 1.8e+159)))
      		tmp = 180.0 * (atan((1.0 - (A / B))) / pi);
      	else
      		tmp = 180.0 * (atan(((B * -0.5) / C)) / pi);
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := If[LessEqual[C, -7e-76], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 1.12e+78], And[N[Not[LessEqual[C, 3.8e+102]], $MachinePrecision], LessEqual[C, 1.8e+159]]], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;C \leq -7 \cdot 10^{-76}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
      
      \mathbf{elif}\;C \leq 1.12 \cdot 10^{+78} \lor \neg \left(C \leq 3.8 \cdot 10^{+102}\right) \land C \leq 1.8 \cdot 10^{+159}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if C < -6.99999999999999995e-76

        1. Initial program 74.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. Step-by-step derivation
          1. associate--l-73.6%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified73.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in A around 0 72.7%

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

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

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

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

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

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

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

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

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

        if -6.99999999999999995e-76 < C < 1.12e78 or 3.79999999999999979e102 < C < 1.80000000000000018e159

        1. Initial program 53.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. Step-by-step derivation
          1. associate--l-52.6%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified52.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in C around 0 50.5%

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.12e78 < C < 3.79999999999999979e102 or 1.80000000000000018e159 < C

        1. Initial program 10.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--l-10.9%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified10.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in A around 0 13.7%

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -7 \cdot 10^{-76}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.12 \cdot 10^{+78} \lor \neg \left(C \leq 3.8 \cdot 10^{+102}\right) \land C \leq 1.8 \cdot 10^{+159}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 9: 47.3% accurate, 3.5× speedup?

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

        1. Initial program 49.3%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified49.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in B around -inf 60.6%

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

        if -6.4999999999999994e-61 < B < 1.65e15

        1. Initial program 57.6%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. 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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in A around inf 33.4%

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

        if 1.65e15 < B

        1. Initial program 54.6%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified54.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in B around inf 62.0%

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

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

      Alternative 10: 47.5% accurate, 3.5× speedup?

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

        1. Initial program 46.8%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified46.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in B around -inf 67.1%

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

        if -1.8999999999999999e-20 < B < 1.1200000000000001e29

        1. Initial program 58.0%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified56.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in C around -inf 33.8%

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

        if 1.1200000000000001e29 < B

        1. Initial program 54.6%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified54.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in B around inf 62.0%

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

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

      Alternative 11: 49.1% accurate, 3.5× speedup?

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

        1. Initial program 77.8%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified77.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in C around -inf 73.6%

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

        if -4.20000000000000016e-26 < C < 2.6e159

        1. Initial program 52.2%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
        3. Simplified51.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}^{2}}\right)\right)\right)}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in C around 0 49.1%

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

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

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

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

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

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

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

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

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

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

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

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

        if 2.6e159 < C

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -4.2 \cdot 10^{-26}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;C \leq 2.6 \cdot 10^{+159}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \end{array} \]
        7. Add Preprocessing

        Alternative 12: 66.2% accurate, 3.6× speedup?

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

          1. Initial program 51.6%

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
          3. Simplified50.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}^{2}}\right)\right)\right)}{\pi}} \]
          4. Add Preprocessing
          5. Taylor expanded in B around -inf 61.2%

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

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

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

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

          if 1.1e-198 < B

          1. Initial program 59.8%

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
          3. Simplified59.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}^{2}}\right)\right)\right)}{\pi}} \]
          4. Add Preprocessing
          5. Taylor expanded in B around inf 75.6%

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

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

        Alternative 13: 45.8% accurate, 3.6× speedup?

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

          1. Initial program 51.2%

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
          3. Simplified51.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}^{2}}\right)\right)\right)}{\pi}} \]
          4. Add Preprocessing
          5. Taylor expanded in B around -inf 53.5%

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

          if -9.0000000000000001e-146 < B < 1.39999999999999994e-115

          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. Add Preprocessing
          3. Taylor expanded in C around -inf 53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.39999999999999994e-115 < B

            1. Initial program 57.8%

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
            3. Simplified57.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}^{2}}\right)\right)\right)}{\pi}} \]
            4. Add Preprocessing
            5. Taylor expanded in B around inf 49.1%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -9 \cdot 10^{-146}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{-115}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
          7. Add Preprocessing

          Alternative 14: 63.2% accurate, 3.6× speedup?

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

            1. Initial program 53.7%

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
            3. Simplified52.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}^{2}}\right)\right)\right)}{\pi}} \]
            4. Add Preprocessing
            5. Taylor expanded in B around -inf 60.9%

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

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

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

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

            if 6.50000000000000043e-28 < B

            1. Initial program 56.2%

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
            3. 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}^{2}}\right)\right)\right)}{\pi}} \]
            4. Add Preprocessing
            5. Taylor expanded in A around 0 50.0%

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

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

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

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

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

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

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

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

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

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

          Alternative 15: 40.3% accurate, 3.8× speedup?

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

            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--l-52.0%

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
            3. Simplified52.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}^{2}}\right)\right)\right)}{\pi}} \]
            4. Add Preprocessing
            5. Taylor expanded in B around -inf 44.6%

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

            if -7.4999999999999998e-308 < B

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
            3. 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}^{2}}\right)\right)\right)}{\pi}} \]
            4. Add Preprocessing
            5. Taylor expanded in B around inf 34.0%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -7.5 \cdot 10^{-308}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 16: 21.7% accurate, 4.0× speedup?

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)}{\pi} \]
          3. Simplified53.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}^{2}}\right)\right)\right)}{\pi}} \]
          4. Add Preprocessing
          5. Taylor expanded in B around inf 16.4%

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

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

          Reproduce

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