ABCF->ab-angle angle

Percentage Accurate: 54.3% → 82.0%
Time: 18.4s
Alternatives: 18
Speedup: 3.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 54.3% accurate, 1.0× speedup?

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

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

Alternative 1: 82.0% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 14.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. Add Preprocessing
    3. Taylor expanded in A around -inf 77.0%

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

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

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

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

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

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

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

    if -1.89999999999999995e128 < A

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

Alternative 2: 78.7% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 16.2%

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

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

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

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

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

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

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

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

    if -2.0499999999999999e119 < A < 1.9e17

    1. Initial program 57.7%

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

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

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

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

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

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

    if 1.9e17 < A

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 78.7% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;A \leq 1.85 \cdot 10^{+17}:\\
\;\;\;\;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{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\


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

    1. Initial program 16.2%

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

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

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

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

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

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

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

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

    if -1.22000000000000011e121 < A < 1.85e17

    1. Initial program 57.7%

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

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

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

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

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

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

    if 1.85e17 < A

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 75.9% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;A \leq 1.35 \cdot 10^{+35}:\\
\;\;\;\;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{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\


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

    1. Initial program 16.2%

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

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

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

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

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

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

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

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

    if -7.39999999999999973e118 < A < 1.35000000000000001e35

    1. Initial program 57.7%

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

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

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

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

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

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

    if 1.35000000000000001e35 < A

    1. Initial program 75.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. Add Preprocessing
    3. Taylor expanded in B around inf 80.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7.4 \cdot 10^{+118}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B \cdot \left(1 + \frac{C}{A}\right)}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.35 \cdot 10^{+35}:\\ \;\;\;\;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{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 78.7% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 16.2%

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

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

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

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

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

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

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

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

    if -1.75000000000000004e120 < A < 1.8e17

    1. Initial program 57.7%

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

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

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

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

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

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

    if 1.8e17 < A

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{180 \cdot \left(-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)\right)}{\pi}} \]
    8. Step-by-step derivation
      1. distribute-rgt-neg-out89.0%

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

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

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

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

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

Alternative 6: 81.6% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 16.2%

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

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

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

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

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

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

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

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

    if -6.19999999999999947e120 < A

    1. Initial program 62.4%

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

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

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

    Alternative 7: 47.5% accurate, 3.2× speedup?

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

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

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

      if -3.3e-48 < C < -1.4e-113

      1. Initial program 10.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. Add Preprocessing
      3. Taylor expanded in A around -inf 68.7%

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

      if -1.4e-113 < C < 4.19999999999999977e-196

      1. Initial program 64.8%

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

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

      if 4.19999999999999977e-196 < C < 1.02000000000000005e-48

      1. Initial program 55.3%

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

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

      if 1.02000000000000005e-48 < C

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -3.3 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;C \leq -1.4 \cdot 10^{-113}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.2 \cdot 10^{-196}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.02 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 54.8% accurate, 3.2× speedup?

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

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

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

      if -2.00000000000000011e32 < C < 1.8e-167

      1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.8e-167 < C < 5.40000000000000019e-52

      1. Initial program 50.2%

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

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

      if 5.40000000000000019e-52 < C < 1.32e-48

      1. Initial program 100.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. Add Preprocessing
      3. Taylor expanded in A around inf 100.0%

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

      if 1.32e-48 < C

      1. Initial program 20.8%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -2 \cdot 10^{+32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.8 \cdot 10^{-167}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 5.4 \cdot 10^{-52}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 1.32 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 47.2% accurate, 3.4× speedup?

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

      1. Initial program 52.0%

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

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

      if -1.2000000000000001e-43 < B < 1.52000000000000007e-294

      1. Initial program 67.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. Add Preprocessing
      3. Taylor expanded in A around inf 43.8%

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

      if 1.52000000000000007e-294 < B < 1.40000000000000005e-86

      1. Initial program 50.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. Add Preprocessing
      3. Taylor expanded in A around -inf 48.4%

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

      if 1.40000000000000005e-86 < B

      1. Initial program 51.2%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.2 \cdot 10^{-43}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.52 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{-86}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 46.9% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -3.8 \cdot 10^{-43}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.9 \cdot 10^{-88}:\\ \;\;\;\;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.8e-43)
       (* 180.0 (/ (atan 1.0) PI))
       (if (<= B 1.05e-294)
         (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
         (if (<= B 4.9e-88)
           (* 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.8e-43) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= 1.05e-294) {
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	} else if (B <= 4.9e-88) {
    		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.8e-43) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= 1.05e-294) {
    		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	} else if (B <= 4.9e-88) {
    		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.8e-43:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= 1.05e-294:
    		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	elif B <= 4.9e-88:
    		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.8e-43)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= 1.05e-294)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
    	elseif (B <= 4.9e-88)
    		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.8e-43)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= 1.05e-294)
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	elseif (B <= 4.9e-88)
    		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.8e-43], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.05e-294], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.9e-88], 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.8 \cdot 10^{-43}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.05 \cdot 10^{-294}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 4.9 \cdot 10^{-88}:\\
    \;\;\;\;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 4 regimes
    2. if B < -3.7999999999999997e-43

      1. Initial program 52.0%

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

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

      if -3.7999999999999997e-43 < B < 1.04999999999999992e-294

      1. Initial program 67.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. Add Preprocessing
      3. Taylor expanded in A around inf 43.8%

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

      if 1.04999999999999992e-294 < B < 4.90000000000000028e-88

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

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

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

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

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

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

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

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

      if 4.90000000000000028e-88 < B

      1. Initial program 51.2%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.8 \cdot 10^{-43}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.9 \cdot 10^{-88}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 60.0% accurate, 3.5× speedup?

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

      1. Initial program 30.7%

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

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

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

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

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

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

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

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

      if -2.4000000000000001e-92 < 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. Add Preprocessing
      3. Taylor expanded in B around inf 62.5%

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

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

    Alternative 12: 58.4% accurate, 3.5× speedup?

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

      1. Initial program 30.7%

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

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

      if -4.49999999999999991e-88 < A < 3.2000000000000001e-134

      1. Initial program 60.2%

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

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

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

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

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

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

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

      if 3.2000000000000001e-134 < A

      1. Initial program 70.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. Add Preprocessing
      3. Taylor expanded in C around 0 66.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 58.4% accurate, 3.5× speedup?

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

      1. Initial program 30.7%

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

        \[\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/67.5%

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

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

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

      if -4.80000000000000026e-86 < A < 5.5000000000000002e-134

      1. Initial program 60.2%

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

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

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

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

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

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

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

      if 5.5000000000000002e-134 < A

      1. Initial program 70.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. Add Preprocessing
      3. Taylor expanded in C around 0 66.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 14: 58.4% accurate, 3.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -2.8 \cdot 10^{-92}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-136}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\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 -2.8e-92)
       (/ (* 180.0 (atan (/ (* 0.5 B) A))) PI)
       (if (<= A 5e-136)
         (/ (* 180.0 (atan (/ (- C B) B))) PI)
         (* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -2.8e-92) {
    		tmp = (180.0 * atan(((0.5 * B) / A))) / ((double) M_PI);
    	} else if (A <= 5e-136) {
    		tmp = (180.0 * atan(((C - B) / 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 <= -2.8e-92) {
    		tmp = (180.0 * Math.atan(((0.5 * B) / A))) / Math.PI;
    	} else if (A <= 5e-136) {
    		tmp = (180.0 * Math.atan(((C - B) / 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 <= -2.8e-92:
    		tmp = (180.0 * math.atan(((0.5 * B) / A))) / math.pi
    	elif A <= 5e-136:
    		tmp = (180.0 * math.atan(((C - B) / 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 <= -2.8e-92)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * B) / A))) / pi);
    	elseif (A <= 5e-136)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / 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 <= -2.8e-92)
    		tmp = (180.0 * atan(((0.5 * B) / A))) / pi;
    	elseif (A <= 5e-136)
    		tmp = (180.0 * atan(((C - B) / B))) / pi;
    	else
    		tmp = 180.0 * (atan((-1.0 - (A / B))) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[A, -2.8e-92], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 5e-136], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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.8 \cdot 10^{-92}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq 5 \cdot 10^{-136}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\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 3 regimes
    2. if A < -2.8e-92

      1. Initial program 30.7%

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

        \[\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/67.5%

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

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

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

      if -2.8e-92 < A < 5.0000000000000002e-136

      1. Initial program 60.2%

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

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

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

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

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

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

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

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

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

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

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

      if 5.0000000000000002e-136 < A

      1. Initial program 70.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. Add Preprocessing
      3. Taylor expanded in C around 0 66.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 15: 59.4% accurate, 3.6× speedup?

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

      1. Initial program 30.7%

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

        \[\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/67.5%

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

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

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

      if -5.20000000000000027e-88 < 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. Add Preprocessing
      3. Taylor expanded in B around inf 62.5%

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

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

    Alternative 16: 46.0% accurate, 3.6× speedup?

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

      1. Initial program 54.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. Add Preprocessing
      3. Taylor expanded in B around -inf 52.1%

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

      if -5.3e-107 < B < 3.5000000000000001e-88

      1. Initial program 59.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. Add Preprocessing
      3. Taylor expanded in C around inf 29.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. associate-*r/29.2%

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

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

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

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

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

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

      if 3.5000000000000001e-88 < B

      1. Initial program 51.2%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.3 \cdot 10^{-107}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{-88}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 17: 41.1% accurate, 3.8× speedup?

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

      1. Initial program 57.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. Add Preprocessing
      3. Taylor expanded in B around -inf 39.5%

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

      if -9.999999999999969e-311 < B

      1. Initial program 51.7%

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

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

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

    Alternative 18: 21.2% accurate, 4.0× speedup?

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

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

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

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

    Reproduce

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