ABCF->ab-angle angle

Percentage Accurate: 53.6% → 81.3%
Time: 20.6s
Alternatives: 21
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 21 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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 81.3% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -2.24999999999999997e-18

    1. Initial program 31.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. Simplified27.2%

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

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

    if -2.24999999999999997e-18 < A

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

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

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

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

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

Alternative 2: 75.7% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;A \leq 3.7 \cdot 10^{-22}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;A \leq 4.2 \cdot 10^{+74}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -9.49999999999999991e-13

    1. Initial program 30.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. Simplified26.5%

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

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

    if -9.49999999999999991e-13 < A < 3.7e-22 or 1.32e63 < A < 4.1999999999999998e74

    1. Initial program 56.0%

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

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

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

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

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

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

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

    if 3.7e-22 < A < 1.32e63

    1. Initial program 89.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. Simplified89.4%

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

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

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

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

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

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

    if 4.1999999999999998e74 < 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. Simplified76.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -9.5 \cdot 10^{-13}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\ \mathbf{elif}\;A \leq 3.7 \cdot 10^{-22}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.32 \cdot 10^{+63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.2 \cdot 10^{+74}:\\ \;\;\;\;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{A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 3: 75.9% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;A \leq 1.16 \cdot 10^{-22}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\

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

\mathbf{elif}\;A \leq 2.2 \cdot 10^{+74}:\\
\;\;\;\;\frac{180}{\pi} \cdot t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if A < -7.79999999999999986e-4

    1. Initial program 30.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. Simplified26.5%

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

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

    if -7.79999999999999986e-4 < A < 1.1600000000000001e-22

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

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

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

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

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

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

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

    if 1.1600000000000001e-22 < A < 4.4999999999999998e66

    1. Initial program 89.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. Simplified89.4%

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

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

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

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

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

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

    if 4.4999999999999998e66 < A < 2.2000000000000001e74

    1. Initial program 15.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. Simplified76.4%

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

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

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

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

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

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

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

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

    if 2.2000000000000001e74 < 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. Simplified76.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -0.00078:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\ \mathbf{elif}\;A \leq 1.16 \cdot 10^{-22}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.5 \cdot 10^{+66}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.2 \cdot 10^{+74}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 4: 77.0% accurate, 1.6× speedup?

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

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

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

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


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

    1. Initial program 30.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. Simplified26.5%

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

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

    if -5 < A < 3.1e-202

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

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

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

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

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

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

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

    if 3.1e-202 < A

    1. Initial program 69.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. Simplified88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\left(0 - \left(\color{blue}{\sqrt{\left(-A\right) \cdot \left(-A\right)}} - \mathsf{hypot}\left(A, B\right)\right)\right) \cdot \frac{1}{-B}\right) \]
      6. sqr-neg32.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 81.2% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -4.4 \cdot 10^{-20}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -4.4e-20)
   (* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A)))))
   (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -4.4e-20) {
		tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
	} 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 <= -4.4e-20) {
		tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
	} 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 <= -4.4e-20:
		tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A))))
	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 <= -4.4e-20)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A)))));
	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 <= -4.4e-20)
		tmp = (180.0 / pi) * atan((-0.5 * (B / (C - A))));
	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, -4.4e-20], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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 -4.4 \cdot 10^{-20}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -4.39999999999999982e-20

    1. Initial program 31.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. Simplified27.2%

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

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

    if -4.39999999999999982e-20 < A

    1. Initial program 65.3%

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

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

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

    Alternative 6: 77.0% accurate, 1.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -80:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\ \mathbf{elif}\;A \leq 3.1 \cdot 10^{-202}:\\ \;\;\;\;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 + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (if (<= A -80.0)
       (* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A)))))
       (if (<= A 3.1e-202)
         (* 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 <= -80.0) {
    		tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
    	} else if (A <= 3.1e-202) {
    		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 <= -80.0) {
    		tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
    	} else if (A <= 3.1e-202) {
    		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 <= -80.0:
    		tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A))))
    	elif A <= 3.1e-202:
    		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 <= -80.0)
    		tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A)))));
    	elseif (A <= 3.1e-202)
    		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 <= -80.0)
    		tmp = (180.0 / pi) * atan((-0.5 * (B / (C - A))));
    	elseif (A <= 3.1e-202)
    		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, -80.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.1e-202], 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 -80:\\
    \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
    
    \mathbf{elif}\;A \leq 3.1 \cdot 10^{-202}:\\
    \;\;\;\;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 + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if A < -80

      1. Initial program 30.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. Simplified26.5%

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

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

      if -80 < A < 3.1e-202

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

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

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

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

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

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

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

      if 3.1e-202 < A

      1. Initial program 69.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. Simplified69.8%

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

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

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

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

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

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

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

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

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

    Alternative 7: 66.5% accurate, 2.4× speedup?

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

      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. Simplified59.6%

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

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

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

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

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

      if -3.2000000000000001e-208 < B < 5.99999999999999958e-165 or 8.29999999999999964e-97 < B < 4.1000000000000001e-53

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.99999999999999958e-165 < B < 8.29999999999999964e-97 or 4.1000000000000001e-53 < B

      1. Initial program 55.9%

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.2 \cdot 10^{-208}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-165} \lor \neg \left(B \leq 8.3 \cdot 10^{-97}\right) \land B \leq 4.1 \cdot 10^{-53}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]

    Alternative 8: 66.6% accurate, 2.4× speedup?

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

      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. Simplified59.6%

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

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

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

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

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

      if -1.7999999999999999e-208 < B < 4.30000000000000007e-165 or 1.3999999999999999e-98 < B < 4.1000000000000001e-53

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

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

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

      if 4.30000000000000007e-165 < B < 1.3999999999999999e-98 or 4.1000000000000001e-53 < B

      1. Initial program 55.9%

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.8 \cdot 10^{-208}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{-165} \lor \neg \left(B \leq 1.4 \cdot 10^{-98}\right) \land B \leq 4.1 \cdot 10^{-53}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]

    Alternative 9: 66.5% accurate, 2.4× speedup?

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

      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. Simplified59.6%

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

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

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

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

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

      if -4.20000000000000024e-208 < B < 2.3e-165 or 4.5e-96 < B < 4.19999999999999955e-53

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

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

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

      if 2.3e-165 < B < 4.5e-96

      1. Initial program 69.6%

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

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

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

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

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

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

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

      if 4.19999999999999955e-53 < B

      1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

    Alternative 10: 53.1% accurate, 2.4× speedup?

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

      1. Initial program 44.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. Simplified53.9%

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

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

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

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

      if -1.999999999999994e-310 < A < 2.9999999999999998e-239

      1. Initial program 56.1%

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

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

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

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

      if 2.9999999999999998e-239 < A < 3.9e-25 or 5e45 < A

      1. Initial program 66.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. Simplified66.6%

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.9e-25 < A < 5e45

      1. Initial program 83.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. Simplified91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq 3 \cdot 10^{-239}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-25} \lor \neg \left(A \leq 5 \cdot 10^{+45}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\ \end{array} \]

    Alternative 11: 53.1% accurate, 2.4× speedup?

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

      1. Initial program 44.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. Simplified53.9%

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

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

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

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

      if -1.000000000000002e-309 < A < 5.8000000000000004e-239

      1. Initial program 56.1%

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

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

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

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

      if 5.8000000000000004e-239 < A < 1.9000000000000002e-30 or 1e47 < A

      1. Initial program 66.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. Simplified66.6%

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.9000000000000002e-30 < A < 1e47

      1. Initial program 83.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. Simplified91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq 5.8 \cdot 10^{-239}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;A \leq 1.9 \cdot 10^{-30} \lor \neg \left(A \leq 10^{+47}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

    Alternative 12: 47.2% accurate, 2.4× speedup?

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

      1. Initial program 48.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. Simplified48.0%

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

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

      if -3.99999999999999969e-24 < B < -1.2199999999999999e-262

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.2199999999999999e-262 < B < 5.7999999999999998e-142

      1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

      if 5.7999999999999998e-142 < B < 4.1e13

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

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

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

      if 4.1e13 < B

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4 \cdot 10^{-24}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.22 \cdot 10^{-262}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \mathbf{elif}\;B \leq 5.8 \cdot 10^{-142}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 41000000000000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

    Alternative 13: 47.2% accurate, 2.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \mathbf{if}\;B \leq -1.6 \cdot 10^{-24}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.85 \cdot 10^{-264}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-141}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 38000000000000:\\ \;\;\;\;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 PI) (atan (/ (- A) B)))))
       (if (<= B -1.6e-24)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -1.85e-264)
           t_0
           (if (<= B 3.8e-141)
             (* 180.0 (/ (atan (/ 0.0 B)) PI))
             (if (<= B 38000000000000.0) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
    double code(double A, double B, double C) {
    	double t_0 = (180.0 / ((double) M_PI)) * atan((-A / B));
    	double tmp;
    	if (B <= -1.6e-24) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -1.85e-264) {
    		tmp = t_0;
    	} else if (B <= 3.8e-141) {
    		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	} else if (B <= 38000000000000.0) {
    		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.PI) * Math.atan((-A / B));
    	double tmp;
    	if (B <= -1.6e-24) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -1.85e-264) {
    		tmp = t_0;
    	} else if (B <= 3.8e-141) {
    		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	} else if (B <= 38000000000000.0) {
    		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.pi) * math.atan((-A / B))
    	tmp = 0
    	if B <= -1.6e-24:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -1.85e-264:
    		tmp = t_0
    	elif B <= 3.8e-141:
    		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	elif B <= 38000000000000.0:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B)))
    	tmp = 0.0
    	if (B <= -1.6e-24)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -1.85e-264)
    		tmp = t_0;
    	elseif (B <= 3.8e-141)
    		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
    	elseif (B <= 38000000000000.0)
    		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 / pi) * atan((-A / B));
    	tmp = 0.0;
    	if (B <= -1.6e-24)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -1.85e-264)
    		tmp = t_0;
    	elseif (B <= 3.8e-141)
    		tmp = 180.0 * (atan((0.0 / B)) / pi);
    	elseif (B <= 38000000000000.0)
    		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[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.6e-24], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.85e-264], t$95$0, If[LessEqual[B, 3.8e-141], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 38000000000000.0], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
    \mathbf{if}\;B \leq -1.6 \cdot 10^{-24}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -1.85 \cdot 10^{-264}:\\
    \;\;\;\;t_0\\
    
    \mathbf{elif}\;B \leq 3.8 \cdot 10^{-141}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 38000000000000:\\
    \;\;\;\;t_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if B < -1.60000000000000006e-24

      1. Initial program 48.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. Simplified48.0%

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

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

      if -1.60000000000000006e-24 < B < -1.84999999999999998e-264 or 3.79999999999999987e-141 < B < 3.8e13

      1. Initial program 63.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. Simplified65.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.84999999999999998e-264 < B < 3.79999999999999987e-141

      1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

      if 3.8e13 < B

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.6 \cdot 10^{-24}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.85 \cdot 10^{-264}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-141}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 38000000000000:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

    Alternative 14: 51.2% accurate, 2.4× speedup?

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

      1. Initial program 59.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. Simplified58.3%

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

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

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

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

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

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

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

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

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

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

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

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

      if -7.50000000000000044e-263 < B < 1.55e-142

      1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

      if 1.55e-142 < B < 3.2e15

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

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

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

      if 3.2e15 < B

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -7.5 \cdot 10^{-263}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.55 \cdot 10^{-142}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.2 \cdot 10^{+15}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

    Alternative 15: 63.2% accurate, 2.4× speedup?

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

      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. Simplified59.6%

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

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

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

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

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

      if -1.95000000000000009e-205 < B < 2e11

      1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2e11 < B

      1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 16: 52.7% accurate, 2.4× speedup?

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

      1. Initial program 44.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. Simplified40.2%

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

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

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

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

      if -9.1999999999999998e-304 < A < 9.59999999999999971e-239

      1. Initial program 56.1%

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

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

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

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

      if 9.59999999999999971e-239 < A

      1. Initial program 69.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. Simplified69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 17: 52.7% accurate, 2.4× speedup?

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

      1. Initial program 44.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. Simplified53.9%

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

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

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

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

      if -2.49999999999999999e-306 < A < 1.34999999999999995e-238

      1. Initial program 56.1%

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

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

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

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

      if 1.34999999999999995e-238 < A

      1. Initial program 69.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. Simplified69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 18: 45.3% accurate, 2.5× speedup?

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

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

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

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

      if -3.4000000000000001e-146 < B < 4.00000000000000012e-53

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

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

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

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

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

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

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

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

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

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

      if 4.00000000000000012e-53 < B

      1. Initial program 53.7%

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

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

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

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

    Alternative 19: 52.5% accurate, 2.5× speedup?

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

      1. Initial program 44.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. Simplified40.2%

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

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

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

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

      if -8.19999999999999965e-308 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 20: 40.9% accurate, 2.5× speedup?

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

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

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

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

      if -5.0000000000000003e-294 < B

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

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

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

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

    Alternative 21: 21.7% 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 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. Simplified54.3%

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

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

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

    Reproduce

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