ABCF->ab-angle angle

Percentage Accurate: 53.6% → 81.0%
Time: 20.0s
Alternatives: 18
Speedup: 3.5×

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: 53.6% accurate, 1.0× speedup?

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

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

Alternative 1: 81.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;C \leq 7.6 \cdot 10^{+151}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 7.6000000000000001e151

    1. Initial program 60.4%

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

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

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

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

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

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

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

      \[\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

    if 7.6000000000000001e151 < C

    1. Initial program 7.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. Step-by-step derivation
      1. associate-*r/7.3%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.6 \cdot 10^{-20}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -4.5999999999999998e-20

    1. Initial program 73.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 A around 0 71.7%

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

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

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

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

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

    if -4.5999999999999998e-20 < C < 4.6000000000000001e148

    1. Initial program 54.8%

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

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

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

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

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

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

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

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

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

    if 4.6000000000000001e148 < C

    1. Initial program 7.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. Step-by-step derivation
      1. associate-*r/7.3%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 74.8% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 29.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 72.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/72.5%

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

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

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

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

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

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

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

    if -2.9000000000000001e98 < A < 4.7000000000000003e76

    1. Initial program 57.0%

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

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

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

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

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

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

    if 4.7000000000000003e76 < A

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

Alternative 4: 80.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -4.5 \cdot 10^{+98}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\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 -4.5e+98)
   (* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
   (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
	double tmp;
	if (A <= -4.5e+98) {
		tmp = atan((0.5 * (B / A))) * (180.0 / ((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 <= -4.5e+98) {
		tmp = Math.atan((0.5 * (B / A))) * (180.0 / 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 <= -4.5e+98:
		tmp = math.atan((0.5 * (B / A))) * (180.0 / 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 <= -4.5e+98)
		tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / 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 <= -4.5e+98)
		tmp = atan((0.5 * (B / A))) * (180.0 / 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, -4.5e+98], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / 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 -4.5 \cdot 10^{+98}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\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 < -4.5000000000000002e98

    1. Initial program 29.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 72.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/72.5%

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

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

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

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

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

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

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

    if -4.5000000000000002e98 < A

    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. Step-by-step derivation
      1. Simplified84.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.5 \cdot 10^{+98}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\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 5: 46.0% accurate, 2.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.25 \cdot 10^{-67}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3 \cdot 10^{-138}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq -2.1 \cdot 10^{-184}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -8.2 \cdot 10^{-195}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -1.98 \cdot 10^{-289}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;B \leq -5 \cdot 10^{-296}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-247}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 3.6 \cdot 10^{-111}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI)))
            (t_1 (* 180.0 (/ (atan (/ A (- B))) PI)))
            (t_2 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
       (if (<= B -1.25e-67)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -3e-138)
           t_0
           (if (<= B -2.1e-184)
             (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
             (if (<= B -8.2e-195)
               t_1
               (if (<= B -1.98e-289)
                 t_2
                 (if (<= B -5e-296)
                   t_1
                   (if (<= B 1.7e-247)
                     t_0
                     (if (<= B 3.6e-111) t_2 (* 180.0 (/ (atan -1.0) PI))))))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
    	double t_1 = 180.0 * (atan((A / -B)) / ((double) M_PI));
    	double t_2 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	double tmp;
    	if (B <= -1.25e-67) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -3e-138) {
    		tmp = t_0;
    	} else if (B <= -2.1e-184) {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	} else if (B <= -8.2e-195) {
    		tmp = t_1;
    	} else if (B <= -1.98e-289) {
    		tmp = t_2;
    	} else if (B <= -5e-296) {
    		tmp = t_1;
    	} else if (B <= 1.7e-247) {
    		tmp = t_0;
    	} else if (B <= 3.6e-111) {
    		tmp = t_2;
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
    	double t_1 = 180.0 * (Math.atan((A / -B)) / Math.PI);
    	double t_2 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	double tmp;
    	if (B <= -1.25e-67) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -3e-138) {
    		tmp = t_0;
    	} else if (B <= -2.1e-184) {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	} else if (B <= -8.2e-195) {
    		tmp = t_1;
    	} else if (B <= -1.98e-289) {
    		tmp = t_2;
    	} else if (B <= -5e-296) {
    		tmp = t_1;
    	} else if (B <= 1.7e-247) {
    		tmp = t_0;
    	} else if (B <= 3.6e-111) {
    		tmp = t_2;
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((C / B)) / math.pi)
    	t_1 = 180.0 * (math.atan((A / -B)) / math.pi)
    	t_2 = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	tmp = 0
    	if B <= -1.25e-67:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -3e-138:
    		tmp = t_0
    	elif B <= -2.1e-184:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	elif B <= -8.2e-195:
    		tmp = t_1
    	elif B <= -1.98e-289:
    		tmp = t_2
    	elif B <= -5e-296:
    		tmp = t_1
    	elif B <= 1.7e-247:
    		tmp = t_0
    	elif B <= 3.6e-111:
    		tmp = t_2
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi))
    	t_1 = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi))
    	t_2 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi))
    	tmp = 0.0
    	if (B <= -1.25e-67)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -3e-138)
    		tmp = t_0;
    	elseif (B <= -2.1e-184)
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
    	elseif (B <= -8.2e-195)
    		tmp = t_1;
    	elseif (B <= -1.98e-289)
    		tmp = t_2;
    	elseif (B <= -5e-296)
    		tmp = t_1;
    	elseif (B <= 1.7e-247)
    		tmp = t_0;
    	elseif (B <= 3.6e-111)
    		tmp = t_2;
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((C / B)) / pi);
    	t_1 = 180.0 * (atan((A / -B)) / pi);
    	t_2 = 180.0 * (atan((0.0 / B)) / pi);
    	tmp = 0.0;
    	if (B <= -1.25e-67)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -3e-138)
    		tmp = t_0;
    	elseif (B <= -2.1e-184)
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	elseif (B <= -8.2e-195)
    		tmp = t_1;
    	elseif (B <= -1.98e-289)
    		tmp = t_2;
    	elseif (B <= -5e-296)
    		tmp = t_1;
    	elseif (B <= 1.7e-247)
    		tmp = t_0;
    	elseif (B <= 3.6e-111)
    		tmp = t_2;
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.25e-67], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3e-138], t$95$0, If[LessEqual[B, -2.1e-184], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.2e-195], t$95$1, If[LessEqual[B, -1.98e-289], t$95$2, If[LessEqual[B, -5e-296], t$95$1, If[LessEqual[B, 1.7e-247], t$95$0, If[LessEqual[B, 3.6e-111], t$95$2, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
    t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -1.25 \cdot 10^{-67}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -3 \cdot 10^{-138}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq -2.1 \cdot 10^{-184}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -8.2 \cdot 10^{-195}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq -1.98 \cdot 10^{-289}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;B \leq -5 \cdot 10^{-296}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq 1.7 \cdot 10^{-247}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 3.6 \cdot 10^{-111}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 6 regimes
    2. if B < -1.25e-67

      1. Initial program 45.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 60.1%

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

      if -1.25e-67 < B < -3.0000000000000001e-138 or -5.0000000000000003e-296 < B < 1.7000000000000001e-247

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

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

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

      if -3.0000000000000001e-138 < B < -2.0999999999999999e-184

      1. Initial program 42.2%

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

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

      if -2.0999999999999999e-184 < B < -8.20000000000000024e-195 or -1.98000000000000003e-289 < B < -5.0000000000000003e-296

      1. Initial program 85.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 B around inf 83.8%

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

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

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

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

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

      if -8.20000000000000024e-195 < B < -1.98000000000000003e-289 or 1.7000000000000001e-247 < B < 3.6000000000000001e-111

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

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

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

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

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

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

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

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

      if 3.6000000000000001e-111 < 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 60.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.25 \cdot 10^{-67}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3 \cdot 10^{-138}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.1 \cdot 10^{-184}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -8.2 \cdot 10^{-195}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.98 \cdot 10^{-289}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -5 \cdot 10^{-296}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-247}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.6 \cdot 10^{-111}:\\ \;\;\;\;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 6: 45.9% accurate, 2.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -2.36 \cdot 10^{-63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.5 \cdot 10^{-138}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-184}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.1 \cdot 10^{-192}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq -5.9 \cdot 10^{-288}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -2 \cdot 10^{-296}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{-248}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-111}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (/ A (- B))) PI)))
            (t_1 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
       (if (<= B -2.36e-63)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -3.5e-138)
           (* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
           (if (<= B -2.05e-184)
             (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
             (if (<= B -2.1e-192)
               t_0
               (if (<= B -5.9e-288)
                 t_1
                 (if (<= B -2e-296)
                   t_0
                   (if (<= B 4.3e-248)
                     (* 180.0 (/ (atan (/ C B)) PI))
                     (if (<= B 1.3e-111) t_1 (* 180.0 (/ (atan -1.0) PI))))))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((A / -B)) / ((double) M_PI));
    	double t_1 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	double tmp;
    	if (B <= -2.36e-63) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -3.5e-138) {
    		tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
    	} else if (B <= -2.05e-184) {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	} else if (B <= -2.1e-192) {
    		tmp = t_0;
    	} else if (B <= -5.9e-288) {
    		tmp = t_1;
    	} else if (B <= -2e-296) {
    		tmp = t_0;
    	} else if (B <= 4.3e-248) {
    		tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
    	} else if (B <= 1.3e-111) {
    		tmp = t_1;
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((A / -B)) / Math.PI);
    	double t_1 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	double tmp;
    	if (B <= -2.36e-63) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -3.5e-138) {
    		tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
    	} else if (B <= -2.05e-184) {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	} else if (B <= -2.1e-192) {
    		tmp = t_0;
    	} else if (B <= -5.9e-288) {
    		tmp = t_1;
    	} else if (B <= -2e-296) {
    		tmp = t_0;
    	} else if (B <= 4.3e-248) {
    		tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
    	} else if (B <= 1.3e-111) {
    		tmp = t_1;
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((A / -B)) / math.pi)
    	t_1 = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	tmp = 0
    	if B <= -2.36e-63:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -3.5e-138:
    		tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi)
    	elif B <= -2.05e-184:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	elif B <= -2.1e-192:
    		tmp = t_0
    	elif B <= -5.9e-288:
    		tmp = t_1
    	elif B <= -2e-296:
    		tmp = t_0
    	elif B <= 4.3e-248:
    		tmp = 180.0 * (math.atan((C / B)) / math.pi)
    	elif B <= 1.3e-111:
    		tmp = t_1
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi))
    	t_1 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi))
    	tmp = 0.0
    	if (B <= -2.36e-63)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -3.5e-138)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi));
    	elseif (B <= -2.05e-184)
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
    	elseif (B <= -2.1e-192)
    		tmp = t_0;
    	elseif (B <= -5.9e-288)
    		tmp = t_1;
    	elseif (B <= -2e-296)
    		tmp = t_0;
    	elseif (B <= 4.3e-248)
    		tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi));
    	elseif (B <= 1.3e-111)
    		tmp = t_1;
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((A / -B)) / pi);
    	t_1 = 180.0 * (atan((0.0 / B)) / pi);
    	tmp = 0.0;
    	if (B <= -2.36e-63)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -3.5e-138)
    		tmp = 180.0 * (atan(((C / B) * 2.0)) / pi);
    	elseif (B <= -2.05e-184)
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	elseif (B <= -2.1e-192)
    		tmp = t_0;
    	elseif (B <= -5.9e-288)
    		tmp = t_1;
    	elseif (B <= -2e-296)
    		tmp = t_0;
    	elseif (B <= 4.3e-248)
    		tmp = 180.0 * (atan((C / B)) / pi);
    	elseif (B <= 1.3e-111)
    		tmp = t_1;
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.36e-63], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.5e-138], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.05e-184], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.1e-192], t$95$0, If[LessEqual[B, -5.9e-288], t$95$1, If[LessEqual[B, -2e-296], t$95$0, If[LessEqual[B, 4.3e-248], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e-111], t$95$1, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
    t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -2.36 \cdot 10^{-63}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -3.5 \cdot 10^{-138}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -2.05 \cdot 10^{-184}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -2.1 \cdot 10^{-192}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq -5.9 \cdot 10^{-288}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq -2 \cdot 10^{-296}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 4.3 \cdot 10^{-248}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.3 \cdot 10^{-111}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 7 regimes
    2. if B < -2.35999999999999998e-63

      1. Initial program 45.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 60.1%

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

      if -2.35999999999999998e-63 < B < -3.4999999999999999e-138

      1. Initial program 79.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 62.1%

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

      if -3.4999999999999999e-138 < B < -2.05e-184

      1. Initial program 42.2%

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

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

      if -2.05e-184 < B < -2.09999999999999993e-192 or -5.90000000000000014e-288 < B < -2e-296

      1. Initial program 85.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 B around inf 83.8%

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

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

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

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

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

      if -2.09999999999999993e-192 < B < -5.90000000000000014e-288 or 4.3000000000000004e-248 < B < 1.29999999999999991e-111

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

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

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

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

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

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

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

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

      if -2e-296 < B < 4.3000000000000004e-248

      1. Initial program 85.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 B around inf 74.5%

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

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

      if 1.29999999999999991e-111 < 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 60.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.36 \cdot 10^{-63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.5 \cdot 10^{-138}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-184}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.1 \cdot 10^{-192}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -5.9 \cdot 10^{-288}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2 \cdot 10^{-296}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{-248}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-111}:\\ \;\;\;\;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 7: 50.0% accurate, 2.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.1 \cdot 10^{-141}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-184}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -4.5 \cdot 10^{-194}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -8.2 \cdot 10^{-292}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq -7.5 \cdot 10^{-296}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-248}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{-88}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI)))
            (t_1 (* 180.0 (/ (atan (/ A (- B))) PI))))
       (if (<= B -1.1e-141)
         (* 180.0 (/ (atan (+ (/ C B) 1.0)) PI))
         (if (<= B -2.05e-184)
           (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
           (if (<= B -4.5e-194)
             t_1
             (if (<= B -8.2e-292)
               t_0
               (if (<= B -7.5e-296)
                 t_1
                 (if (<= B 3.8e-248)
                   (* 180.0 (/ (atan (/ C B)) PI))
                   (if (<= B 2.4e-88) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	double t_1 = 180.0 * (atan((A / -B)) / ((double) M_PI));
    	double tmp;
    	if (B <= -1.1e-141) {
    		tmp = 180.0 * (atan(((C / B) + 1.0)) / ((double) M_PI));
    	} else if (B <= -2.05e-184) {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	} else if (B <= -4.5e-194) {
    		tmp = t_1;
    	} else if (B <= -8.2e-292) {
    		tmp = t_0;
    	} else if (B <= -7.5e-296) {
    		tmp = t_1;
    	} else if (B <= 3.8e-248) {
    		tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
    	} else if (B <= 2.4e-88) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	double t_1 = 180.0 * (Math.atan((A / -B)) / Math.PI);
    	double tmp;
    	if (B <= -1.1e-141) {
    		tmp = 180.0 * (Math.atan(((C / B) + 1.0)) / Math.PI);
    	} else if (B <= -2.05e-184) {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	} else if (B <= -4.5e-194) {
    		tmp = t_1;
    	} else if (B <= -8.2e-292) {
    		tmp = t_0;
    	} else if (B <= -7.5e-296) {
    		tmp = t_1;
    	} else if (B <= 3.8e-248) {
    		tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
    	} else if (B <= 2.4e-88) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	t_1 = 180.0 * (math.atan((A / -B)) / math.pi)
    	tmp = 0
    	if B <= -1.1e-141:
    		tmp = 180.0 * (math.atan(((C / B) + 1.0)) / math.pi)
    	elif B <= -2.05e-184:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	elif B <= -4.5e-194:
    		tmp = t_1
    	elif B <= -8.2e-292:
    		tmp = t_0
    	elif B <= -7.5e-296:
    		tmp = t_1
    	elif B <= 3.8e-248:
    		tmp = 180.0 * (math.atan((C / B)) / math.pi)
    	elif B <= 2.4e-88:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi))
    	t_1 = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi))
    	tmp = 0.0
    	if (B <= -1.1e-141)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + 1.0)) / pi));
    	elseif (B <= -2.05e-184)
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
    	elseif (B <= -4.5e-194)
    		tmp = t_1;
    	elseif (B <= -8.2e-292)
    		tmp = t_0;
    	elseif (B <= -7.5e-296)
    		tmp = t_1;
    	elseif (B <= 3.8e-248)
    		tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi));
    	elseif (B <= 2.4e-88)
    		tmp = t_0;
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((0.0 / B)) / pi);
    	t_1 = 180.0 * (atan((A / -B)) / pi);
    	tmp = 0.0;
    	if (B <= -1.1e-141)
    		tmp = 180.0 * (atan(((C / B) + 1.0)) / pi);
    	elseif (B <= -2.05e-184)
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	elseif (B <= -4.5e-194)
    		tmp = t_1;
    	elseif (B <= -8.2e-292)
    		tmp = t_0;
    	elseif (B <= -7.5e-296)
    		tmp = t_1;
    	elseif (B <= 3.8e-248)
    		tmp = 180.0 * (atan((C / B)) / pi);
    	elseif (B <= 2.4e-88)
    		tmp = t_0;
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.1e-141], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.05e-184], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.5e-194], t$95$1, If[LessEqual[B, -8.2e-292], t$95$0, If[LessEqual[B, -7.5e-296], t$95$1, If[LessEqual[B, 3.8e-248], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-88], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -1.1 \cdot 10^{-141}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -2.05 \cdot 10^{-184}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -4.5 \cdot 10^{-194}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq -8.2 \cdot 10^{-292}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq -7.5 \cdot 10^{-296}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq 3.8 \cdot 10^{-248}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 2.4 \cdot 10^{-88}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 6 regimes
    2. if B < -1.10000000000000005e-141

      1. Initial program 52.3%

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

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

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

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

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

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

      if -1.10000000000000005e-141 < B < -2.05e-184

      1. Initial program 42.2%

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

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

      if -2.05e-184 < B < -4.4999999999999999e-194 or -8.20000000000000087e-292 < B < -7.49999999999999991e-296

      1. Initial program 85.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 B around inf 83.8%

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

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

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

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

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

      if -4.4999999999999999e-194 < B < -8.20000000000000087e-292 or 3.7999999999999999e-248 < B < 2.4e-88

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

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

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

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

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

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

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

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

      if -7.49999999999999991e-296 < B < 3.7999999999999999e-248

      1. Initial program 85.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 B around inf 74.5%

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

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

      if 2.4e-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 60.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.1 \cdot 10^{-141}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-184}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -4.5 \cdot 10^{-194}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -8.2 \cdot 10^{-292}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -7.5 \cdot 10^{-296}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-248}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.4 \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 8: 46.0% accurate, 3.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -9.2 \cdot 10^{-71}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.6 \cdot 10^{-190}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-262}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{-247}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.45 \cdot 10^{-103}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI)))
            (t_1 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
       (if (<= B -9.2e-71)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -2.6e-190)
           t_0
           (if (<= B -1.6e-262)
             t_1
             (if (<= B 5.5e-247)
               t_0
               (if (<= B 1.45e-103) t_1 (* 180.0 (/ (atan -1.0) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
    	double t_1 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	double tmp;
    	if (B <= -9.2e-71) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -2.6e-190) {
    		tmp = t_0;
    	} else if (B <= -1.6e-262) {
    		tmp = t_1;
    	} else if (B <= 5.5e-247) {
    		tmp = t_0;
    	} else if (B <= 1.45e-103) {
    		tmp = t_1;
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
    	double t_1 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	double tmp;
    	if (B <= -9.2e-71) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -2.6e-190) {
    		tmp = t_0;
    	} else if (B <= -1.6e-262) {
    		tmp = t_1;
    	} else if (B <= 5.5e-247) {
    		tmp = t_0;
    	} else if (B <= 1.45e-103) {
    		tmp = t_1;
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((C / B)) / math.pi)
    	t_1 = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	tmp = 0
    	if B <= -9.2e-71:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -2.6e-190:
    		tmp = t_0
    	elif B <= -1.6e-262:
    		tmp = t_1
    	elif B <= 5.5e-247:
    		tmp = t_0
    	elif B <= 1.45e-103:
    		tmp = t_1
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi))
    	t_1 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi))
    	tmp = 0.0
    	if (B <= -9.2e-71)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -2.6e-190)
    		tmp = t_0;
    	elseif (B <= -1.6e-262)
    		tmp = t_1;
    	elseif (B <= 5.5e-247)
    		tmp = t_0;
    	elseif (B <= 1.45e-103)
    		tmp = t_1;
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((C / B)) / pi);
    	t_1 = 180.0 * (atan((0.0 / B)) / pi);
    	tmp = 0.0;
    	if (B <= -9.2e-71)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -2.6e-190)
    		tmp = t_0;
    	elseif (B <= -1.6e-262)
    		tmp = t_1;
    	elseif (B <= 5.5e-247)
    		tmp = t_0;
    	elseif (B <= 1.45e-103)
    		tmp = t_1;
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9.2e-71], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.6e-190], t$95$0, If[LessEqual[B, -1.6e-262], t$95$1, If[LessEqual[B, 5.5e-247], t$95$0, If[LessEqual[B, 1.45e-103], t$95$1, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -9.2 \cdot 10^{-71}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -2.6 \cdot 10^{-190}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq -1.6 \cdot 10^{-262}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq 5.5 \cdot 10^{-247}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.45 \cdot 10^{-103}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if B < -9.1999999999999994e-71

      1. Initial program 45.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 60.1%

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

      if -9.1999999999999994e-71 < B < -2.5999999999999998e-190 or -1.6e-262 < B < 5.49999999999999995e-247

      1. Initial program 76.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 69.2%

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

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

      if -2.5999999999999998e-190 < B < -1.6e-262 or 5.49999999999999995e-247 < B < 1.4499999999999999e-103

      1. Initial program 43.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 59.3%

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

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

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

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

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

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

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

      if 1.4499999999999999e-103 < 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 60.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -9.2 \cdot 10^{-71}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.6 \cdot 10^{-190}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-262}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{-247}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.45 \cdot 10^{-103}:\\ \;\;\;\;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 9: 59.2% accurate, 3.2× speedup?

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

      1. Initial program 73.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 A around 0 70.1%

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

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

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

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

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

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

      if -5.00000000000000015e-54 < C < -1.75e-188 or -2.29999999999999991e-203 < C < 4.8000000000000003e-90

      1. Initial program 61.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 0 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.75e-188 < C < -2.29999999999999991e-203

      1. Initial program 43.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 70.1%

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

      if 4.8000000000000003e-90 < C

      1. Initial program 27.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 61.5%

        \[\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 61.5%

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

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

    Alternative 10: 59.3% accurate, 3.2× speedup?

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

      1. Initial program 73.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 A around 0 70.1%

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

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

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

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

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

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

      if -1.55000000000000002e-54 < C < -1.75e-188 or -2.29999999999999991e-203 < C < 5.9999999999999999e-89

      1. Initial program 61.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 0 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.75e-188 < C < -2.29999999999999991e-203

      1. Initial program 43.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 70.1%

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

      if 5.9999999999999999e-89 < C

      1. Initial program 27.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 61.5%

        \[\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 61.5%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.55 \cdot 10^{-54}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\ \mathbf{elif}\;C \leq -1.75 \cdot 10^{-188}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -2.3 \cdot 10^{-203}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq 6 \cdot 10^{-89}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 59.5% accurate, 3.2× speedup?

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

      1. Initial program 73.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 A around 0 70.1%

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

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

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

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

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

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

      if -1.7999999999999999e-53 < C < 1.69999999999999996e-284 or 1.55e-244 < C < 5.79999999999999984e-89

      1. Initial program 58.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 C around 0 57.4%

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{A + \color{blue}{\mathsf{hypot}\left(B, A\right)}}{-B}\right)}{\pi} \]
      5. Simplified89.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 B around -inf 61.6%

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

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

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

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

      if 1.69999999999999996e-284 < C < 1.55e-244

      1. Initial program 74.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 90.3%

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

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

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

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

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

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

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

      if 5.79999999999999984e-89 < C

      1. Initial program 27.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 61.5%

        \[\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 61.5%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.8 \cdot 10^{-53}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.7 \cdot 10^{-284}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.55 \cdot 10^{-244}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 5.8 \cdot 10^{-89}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 61.7% accurate, 3.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\ \mathbf{if}\;B \leq -8 \cdot 10^{-195}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-262}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-24}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (+ (/ (- C A) B) 1.0)) PI))))
       (if (<= B -8e-195)
         t_0
         (if (<= B -6.2e-262)
           (* 180.0 (/ (atan (/ 0.0 B)) PI))
           (if (<= B 2.5e-24) t_0 (/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((((C - A) / B) + 1.0)) / ((double) M_PI));
    	double tmp;
    	if (B <= -8e-195) {
    		tmp = t_0;
    	} else if (B <= -6.2e-262) {
    		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	} else if (B <= 2.5e-24) {
    		tmp = t_0;
    	} else {
    		tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((((C - A) / B) + 1.0)) / Math.PI);
    	double tmp;
    	if (B <= -8e-195) {
    		tmp = t_0;
    	} else if (B <= -6.2e-262) {
    		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	} else if (B <= 2.5e-24) {
    		tmp = t_0;
    	} else {
    		tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((((C - A) / B) + 1.0)) / math.pi)
    	tmp = 0
    	if B <= -8e-195:
    		tmp = t_0
    	elif B <= -6.2e-262:
    		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	elif B <= 2.5e-24:
    		tmp = t_0
    	else:
    		tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + 1.0)) / pi))
    	tmp = 0.0
    	if (B <= -8e-195)
    		tmp = t_0;
    	elseif (B <= -6.2e-262)
    		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
    	elseif (B <= 2.5e-24)
    		tmp = t_0;
    	else
    		tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi);
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((((C - A) / B) + 1.0)) / pi);
    	tmp = 0.0;
    	if (B <= -8e-195)
    		tmp = t_0;
    	elseif (B <= -6.2e-262)
    		tmp = 180.0 * (atan((0.0 / B)) / pi);
    	elseif (B <= 2.5e-24)
    		tmp = t_0;
    	else
    		tmp = (180.0 * atan((-1.0 - (A / B)))) / pi;
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8e-195], t$95$0, If[LessEqual[B, -6.2e-262], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.5e-24], t$95$0, N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
    \mathbf{if}\;B \leq -8 \cdot 10^{-195}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq -6.2 \cdot 10^{-262}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 2.5 \cdot 10^{-24}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if B < -8.0000000000000007e-195 or -6.1999999999999997e-262 < B < 2.4999999999999999e-24

      1. Initial program 57.0%

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

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

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

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

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

      if -8.0000000000000007e-195 < B < -6.1999999999999997e-262

      1. Initial program 38.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 C around inf 73.7%

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

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

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

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

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

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

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

      if 2.4999999999999999e-24 < B

      1. Initial program 48.0%

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8 \cdot 10^{-195}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-262}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-24}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 61.7% accurate, 3.3× speedup?

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

      1. Initial program 52.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. Step-by-step derivation
        1. associate-*r/52.6%

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

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

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

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

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

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

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

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

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

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

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

      if -8.0000000000000007e-195 < B < -4.49999999999999998e-262

      1. Initial program 38.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 C around inf 73.7%

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

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

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

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

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

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

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

      if -4.49999999999999998e-262 < B < 1.94999999999999993e-26

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

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

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

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

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

      if 1.94999999999999993e-26 < B

      1. Initial program 48.0%

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8 \cdot 10^{-195}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\ \mathbf{elif}\;B \leq -4.5 \cdot 10^{-262}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.95 \cdot 10^{-26}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 14: 65.3% accurate, 3.5× speedup?

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

      1. Initial program 52.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. Step-by-step derivation
        1. associate-*r/52.6%

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

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

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

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

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

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

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

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

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

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

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

      if -8.0000000000000007e-195 < B < -6.00000000000000036e-262

      1. Initial program 38.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 C around inf 73.7%

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

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

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

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

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

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

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

      if -6.00000000000000036e-262 < B

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

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

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

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

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

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

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

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

    Alternative 15: 65.2% accurate, 3.5× speedup?

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

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

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

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

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

      if -8.0000000000000007e-195 < B < -1.44999999999999998e-262

      1. Initial program 38.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 C around inf 73.7%

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

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

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

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

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

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

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

      if -1.44999999999999998e-262 < B

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

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

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

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

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

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

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

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

    Alternative 16: 45.1% accurate, 3.6× speedup?

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

      1. Initial program 50.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 B around -inf 53.5%

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

      if -1.80000000000000012e-128 < B < 9.49999999999999958e-114

      1. Initial program 61.3%

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

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

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

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

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

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

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

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

      if 9.49999999999999958e-114 < 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 60.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.8 \cdot 10^{-128}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{-114}:\\ \;\;\;\;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: 40.1% accurate, 3.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -5 \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 -5e-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 <= -5e-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 <= -5e-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 <= -5e-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 <= -5e-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 <= -5e-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, -5e-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 -5 \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 < -4.999999999999985e-310

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

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

      if -4.999999999999985e-310 < B

      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 43.2%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5 \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: 20.9% 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.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 20.4%

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

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

    Reproduce

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