ABCF->ab-angle angle

Percentage Accurate: 53.3% → 80.8%
Time: 22.1s
Alternatives: 14
Speedup: 2.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 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.3% 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.8% accurate, 1.6× speedup?

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

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

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


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

    1. Initial program 11.8%

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

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

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

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

    if -8.5e182 < A

    1. Initial program 64.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/64.4%

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

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

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

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

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

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

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

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

Alternative 2: 80.3% accurate, 1.6× speedup?

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

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

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


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

    1. Initial program 26.1%

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

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

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

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

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

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

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

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

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

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

    if -5.2e15 < A

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

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

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

    Alternative 3: 77.2% accurate, 1.6× speedup?

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

      1. Initial program 26.1%

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

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

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

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

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

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

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

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

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

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

      if -1.8e19 < A < 3.0999999999999998e25

      1. Initial program 61.3%

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

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

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

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

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

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

      if 3.0999999999999998e25 < A

      1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 74.7% accurate, 1.7× speedup?

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

      1. Initial program 26.1%

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

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

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

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

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

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

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

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

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

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

      if -1.5e19 < A < 2.40000000000000002e147

      1. Initial program 62.2%

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

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

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

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

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

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

      if 2.40000000000000002e147 < A

      1. Initial program 93.1%

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.5 \cdot 10^{+19}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(B \cdot \left(\frac{1}{A} + \frac{1}{A} \cdot \frac{C}{A}\right)\right)\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.4 \cdot 10^{+147}:\\ \;\;\;\;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(1 + \frac{C - A}{B}\right)}{\pi}\\ \end{array} \]

    Alternative 5: 47.9% accurate, 2.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;C \leq -2.4 \cdot 10^{-90}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -8 \cdot 10^{-235}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 3.8 \cdot 10^{-264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 1.15 \cdot 10^{-139}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 8.2 \cdot 10^{-85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 4.4 \cdot 10^{-7}:\\ \;\;\;\;t_0\\ \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
     (let* ((t_0 (* 180.0 (/ (atan -1.0) PI)))
            (t_1 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
       (if (<= C -2.4e-90)
         (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
         (if (<= C -8e-235)
           t_0
           (if (<= C 3.8e-264)
             t_1
             (if (<= C 1.15e-139)
               t_0
               (if (<= C 8.2e-85)
                 t_1
                 (if (<= C 4.4e-7)
                   t_0
                   (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
    	double t_1 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
    	double tmp;
    	if (C <= -2.4e-90) {
    		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
    	} else if (C <= -8e-235) {
    		tmp = t_0;
    	} else if (C <= 3.8e-264) {
    		tmp = t_1;
    	} else if (C <= 1.15e-139) {
    		tmp = t_0;
    	} else if (C <= 8.2e-85) {
    		tmp = t_1;
    	} else if (C <= 4.4e-7) {
    		tmp = t_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 t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
    	double t_1 = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
    	double tmp;
    	if (C <= -2.4e-90) {
    		tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
    	} else if (C <= -8e-235) {
    		tmp = t_0;
    	} else if (C <= 3.8e-264) {
    		tmp = t_1;
    	} else if (C <= 1.15e-139) {
    		tmp = t_0;
    	} else if (C <= 8.2e-85) {
    		tmp = t_1;
    	} else if (C <= 4.4e-7) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan(-1.0) / math.pi)
    	t_1 = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
    	tmp = 0
    	if C <= -2.4e-90:
    		tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
    	elif C <= -8e-235:
    		tmp = t_0
    	elif C <= 3.8e-264:
    		tmp = t_1
    	elif C <= 1.15e-139:
    		tmp = t_0
    	elif C <= 8.2e-85:
    		tmp = t_1
    	elif C <= 4.4e-7:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(-1.0) / pi))
    	t_1 = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi))
    	tmp = 0.0
    	if (C <= -2.4e-90)
    		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
    	elseif (C <= -8e-235)
    		tmp = t_0;
    	elseif (C <= 3.8e-264)
    		tmp = t_1;
    	elseif (C <= 1.15e-139)
    		tmp = t_0;
    	elseif (C <= 8.2e-85)
    		tmp = t_1;
    	elseif (C <= 4.4e-7)
    		tmp = t_0;
    	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)
    	t_0 = 180.0 * (atan(-1.0) / pi);
    	t_1 = 180.0 * (atan((-2.0 * (A / B))) / pi);
    	tmp = 0.0;
    	if (C <= -2.4e-90)
    		tmp = 180.0 * (atan((2.0 * (C / B))) / pi);
    	elseif (C <= -8e-235)
    		tmp = t_0;
    	elseif (C <= 3.8e-264)
    		tmp = t_1;
    	elseif (C <= 1.15e-139)
    		tmp = t_0;
    	elseif (C <= 8.2e-85)
    		tmp = t_1;
    	elseif (C <= 4.4e-7)
    		tmp = t_0;
    	else
    		tmp = 180.0 * (atan(((B * -0.5) / C)) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2.4e-90], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -8e-235], t$95$0, If[LessEqual[C, 3.8e-264], t$95$1, If[LessEqual[C, 1.15e-139], t$95$0, If[LessEqual[C, 8.2e-85], t$95$1, If[LessEqual[C, 4.4e-7], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    t_1 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
    \mathbf{if}\;C \leq -2.4 \cdot 10^{-90}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq -8 \cdot 10^{-235}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;C \leq 3.8 \cdot 10^{-264}:\\
    \;\;\;\;t_1\\
    
    \mathbf{elif}\;C \leq 1.15 \cdot 10^{-139}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;C \leq 8.2 \cdot 10^{-85}:\\
    \;\;\;\;t_1\\
    
    \mathbf{elif}\;C \leq 4.4 \cdot 10^{-7}:\\
    \;\;\;\;t_0\\
    
    \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 4 regimes
    2. if C < -2.4000000000000002e-90

      1. Initial program 78.2%

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

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

      if -2.4000000000000002e-90 < C < -7.9999999999999997e-235 or 3.80000000000000013e-264 < C < 1.15000000000000006e-139 or 8.19999999999999987e-85 < C < 4.4000000000000002e-7

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

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

      if -7.9999999999999997e-235 < C < 3.80000000000000013e-264 or 1.15000000000000006e-139 < C < 8.19999999999999987e-85

      1. Initial program 67.8%

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

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

      if 4.4000000000000002e-7 < C

      1. Initial program 22.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -2.4 \cdot 10^{-90}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -8 \cdot 10^{-235}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq 3.8 \cdot 10^{-264}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.15 \cdot 10^{-139}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq 8.2 \cdot 10^{-85}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.4 \cdot 10^{-7}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \end{array} \]

    Alternative 6: 46.8% accurate, 2.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{if}\;A \leq -2.2 \cdot 10^{-101}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -5.9 \cdot 10^{-232}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.02 \cdot 10^{-277}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 7.1 \cdot 10^{-109}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.85 \cdot 10^{+27}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
       (if (<= A -2.2e-101)
         (* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
         (if (<= A -5.9e-232)
           t_0
           (if (<= A 2.02e-277)
             (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
             (if (<= A 7.1e-109)
               t_0
               (if (<= A 1.85e+27)
                 (* 180.0 (/ (atan 1.0) PI))
                 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
    	double tmp;
    	if (A <= -2.2e-101) {
    		tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
    	} else if (A <= -5.9e-232) {
    		tmp = t_0;
    	} else if (A <= 2.02e-277) {
    		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
    	} else if (A <= 7.1e-109) {
    		tmp = t_0;
    	} else if (A <= 1.85e+27) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else {
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
    	double tmp;
    	if (A <= -2.2e-101) {
    		tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
    	} else if (A <= -5.9e-232) {
    		tmp = t_0;
    	} else if (A <= 2.02e-277) {
    		tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
    	} else if (A <= 7.1e-109) {
    		tmp = t_0;
    	} else if (A <= 1.85e+27) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else {
    		tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan(-1.0) / math.pi)
    	tmp = 0
    	if A <= -2.2e-101:
    		tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi)
    	elif A <= -5.9e-232:
    		tmp = t_0
    	elif A <= 2.02e-277:
    		tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
    	elif A <= 7.1e-109:
    		tmp = t_0
    	elif A <= 1.85e+27:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	else:
    		tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(-1.0) / pi))
    	tmp = 0.0
    	if (A <= -2.2e-101)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi));
    	elseif (A <= -5.9e-232)
    		tmp = t_0;
    	elseif (A <= 2.02e-277)
    		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
    	elseif (A <= 7.1e-109)
    		tmp = t_0;
    	elseif (A <= 1.85e+27)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan(-1.0) / pi);
    	tmp = 0.0;
    	if (A <= -2.2e-101)
    		tmp = 180.0 * (atan(((0.5 * B) / A)) / pi);
    	elseif (A <= -5.9e-232)
    		tmp = t_0;
    	elseif (A <= 2.02e-277)
    		tmp = 180.0 * (atan((2.0 * (C / B))) / pi);
    	elseif (A <= 7.1e-109)
    		tmp = t_0;
    	elseif (A <= 1.85e+27)
    		tmp = 180.0 * (atan(1.0) / pi);
    	else
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.2e-101], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -5.9e-232], t$95$0, If[LessEqual[A, 2.02e-277], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.1e-109], t$95$0, If[LessEqual[A, 1.85e+27], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    \mathbf{if}\;A \leq -2.2 \cdot 10^{-101}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -5.9 \cdot 10^{-232}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;A \leq 2.02 \cdot 10^{-277}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq 7.1 \cdot 10^{-109}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;A \leq 1.85 \cdot 10^{+27}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if A < -2.1999999999999999e-101

      1. Initial program 32.5%

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

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

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

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

      if -2.1999999999999999e-101 < A < -5.90000000000000017e-232 or 2.02e-277 < A < 7.0999999999999999e-109

      1. Initial program 65.5%

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

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

      if -5.90000000000000017e-232 < A < 2.02e-277

      1. Initial program 69.0%

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

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

      if 7.0999999999999999e-109 < A < 1.85000000000000001e27

      1. Initial program 58.9%

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

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

      if 1.85000000000000001e27 < A

      1. Initial program 84.7%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.2 \cdot 10^{-101}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -5.9 \cdot 10^{-232}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 2.02 \cdot 10^{-277}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 7.1 \cdot 10^{-109}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 1.85 \cdot 10^{+27}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \]

    Alternative 7: 57.4% accurate, 2.4× speedup?

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

      1. Initial program 32.5%

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

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

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

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

      if -9e-103 < A < -2.3e-231 or 3.2999999999999998e-274 < A < 4.40000000000000018e-231

      1. Initial program 60.1%

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

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

      if -2.3e-231 < A < 3.2999999999999998e-274 or 4.40000000000000018e-231 < A

      1. Initial program 76.0%

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -9 \cdot 10^{-103}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.3 \cdot 10^{-231} \lor \neg \left(A \leq 3.3 \cdot 10^{-274}\right) \land A \leq 4.4 \cdot 10^{-231}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \end{array} \]

    Alternative 8: 46.5% accurate, 2.4× speedup?

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

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

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

      if -3.35e19 < B < -2.05000000000000011e-196 or 4.2000000000000003e-155 < B < 3.3999999999999998e-115

      1. Initial program 68.3%

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

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

      if -2.05000000000000011e-196 < B < 4.2000000000000003e-155

      1. Initial program 56.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.3999999999999998e-115 < B

      1. Initial program 58.7%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.35 \cdot 10^{+19}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-196}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.2 \cdot 10^{-155}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.4 \cdot 10^{-115}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

    Alternative 9: 66.0% accurate, 2.4× speedup?

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

      1. Initial program 59.2%

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

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

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

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

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

      if -2.1000000000000001e-299 < B < 5.00000000000000014e-307

      1. Initial program 34.3%

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

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

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

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

      if 5.00000000000000014e-307 < B

      1. Initial program 59.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. Simplified74.9%

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

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

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

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

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

      Alternative 10: 45.5% accurate, 2.4× speedup?

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

        1. Initial program 57.2%

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

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

        if -6.9999999999999998e-162 < B < 1.9e-121

        1. Initial program 59.6%

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

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

        if 1.9e-121 < B

        1. Initial program 59.3%

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

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

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

      Alternative 11: 45.5% accurate, 2.5× speedup?

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

        1. Initial program 57.2%

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

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

        if -7.49999999999999972e-162 < B < 4.40000000000000025e-120

        1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 4.40000000000000025e-120 < B

        1. Initial program 59.3%

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

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

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

      Alternative 12: 45.0% accurate, 2.5× speedup?

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

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

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

        if -4.79999999999999982e-160 < B < 1.5999999999999999e-142

        1. Initial program 57.0%

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

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

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

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

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

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

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

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

        if 1.5999999999999999e-142 < B

        1. Initial program 60.5%

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

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

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

      Alternative 13: 39.9% accurate, 2.5× speedup?

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

        1. Initial program 58.8%

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

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

        if -3.99999999999999972e-303 < B

        1. Initial program 58.5%

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

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

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

      Alternative 14: 21.1% accurate, 2.5× speedup?

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

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

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

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

      Reproduce

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