ABCF->ab-angle angle

Percentage Accurate: 54.1% → 81.4%
Time: 22.6s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 54.1% 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.4% accurate, 1.9× speedup?

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

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

\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 2 regimes
  2. if C < 2.39999999999999986e79

    1. Initial program 65.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. Applied egg-rr86.0%

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

    if 2.39999999999999986e79 < C

    1. Initial program 19.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 17.3%

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

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

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

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

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

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

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

Alternative 2: 78.0% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 78.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 74.9%

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

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

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

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

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

    if -2.44999999999999989e-116 < C < 2.10000000000000008e79

    1. Initial program 57.3%

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

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

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

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

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

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

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

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

    if 2.10000000000000008e79 < C

    1. Initial program 19.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 17.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -2.45 \cdot 10^{-116}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 2.1 \cdot 10^{+79}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{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 3: 78.0% accurate, 1.9× speedup?

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

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

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

\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 3 regimes
  2. if C < -3.19999999999999995e-117

    1. Initial program 78.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 74.9%

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

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

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

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

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

    if -3.19999999999999995e-117 < C < 1.70000000000000004e78

    1. Initial program 57.3%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Applied egg-rr84.4%

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

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

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

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

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

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

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

    if 1.70000000000000004e78 < C

    1. Initial program 19.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 17.3%

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

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

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

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

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

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

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

Alternative 4: 78.9% accurate, 1.9× speedup?

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

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

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

\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 3 regimes
  2. if C < -9.9999999999999999e-117

    1. Initial program 78.0%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Step-by-step derivation
      1. Simplified86.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. Taylor expanded in C around 0 77.2%

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

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

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

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

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

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

      if -9.9999999999999999e-117 < C < 1.7500000000000001e77

      1. Initial program 57.3%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Applied egg-rr84.4%

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

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

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

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

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

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

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

      if 1.7500000000000001e77 < C

      1. Initial program 19.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 17.3%

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

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

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

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

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

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

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

    Alternative 5: 77.0% accurate, 1.9× speedup?

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

      1. Initial program 20.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. Applied egg-rr57.0%

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

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

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

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

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

      if -3.50000000000000002e73 < A < 1.35000000000000006e32

      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 A around 0 51.6%

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

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

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

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

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

      if 1.35000000000000006e32 < A

      1. Initial program 82.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. Applied egg-rr94.1%

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

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

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

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

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

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

    Alternative 6: 82.1% accurate, 1.9× speedup?

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

      1. Initial program 20.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. Applied egg-rr57.0%

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

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

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

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

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

      if -1.9000000000000001e75 < A

      1. Initial program 61.9%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Step-by-step derivation
        1. Simplified83.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.9%

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

      Alternative 7: 47.8% accurate, 3.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -1320000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.95 \cdot 10^{-286}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.45 \cdot 10^{-237}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-90}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 0.00085:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 38:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
         (if (<= B -1320000.0)
           (* 180.0 (/ (atan 1.0) PI))
           (if (<= B 1.95e-286)
             t_0
             (if (<= B 1.45e-237)
               (* 180.0 (/ (atan (/ 0.0 B)) PI))
               (if (<= B 7.2e-90)
                 t_0
                 (if (<= B 0.00085)
                   (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
                   (if (<= B 38.0) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))
      double code(double A, double B, double C) {
      	double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
      	double tmp;
      	if (B <= -1320000.0) {
      		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
      	} else if (B <= 1.95e-286) {
      		tmp = t_0;
      	} else if (B <= 1.45e-237) {
      		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
      	} else if (B <= 7.2e-90) {
      		tmp = t_0;
      	} else if (B <= 0.00085) {
      		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
      	} else if (B <= 38.0) {
      		tmp = t_0;
      	} else {
      		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
      	}
      	return tmp;
      }
      
      public static double code(double A, double B, double C) {
      	double t_0 = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
      	double tmp;
      	if (B <= -1320000.0) {
      		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
      	} else if (B <= 1.95e-286) {
      		tmp = t_0;
      	} else if (B <= 1.45e-237) {
      		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
      	} else if (B <= 7.2e-90) {
      		tmp = t_0;
      	} else if (B <= 0.00085) {
      		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
      	} else if (B <= 38.0) {
      		tmp = t_0;
      	} else {
      		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
      	}
      	return tmp;
      }
      
      def code(A, B, C):
      	t_0 = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
      	tmp = 0
      	if B <= -1320000.0:
      		tmp = 180.0 * (math.atan(1.0) / math.pi)
      	elif B <= 1.95e-286:
      		tmp = t_0
      	elif B <= 1.45e-237:
      		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
      	elif B <= 7.2e-90:
      		tmp = t_0
      	elif B <= 0.00085:
      		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
      	elif B <= 38.0:
      		tmp = t_0
      	else:
      		tmp = 180.0 * (math.atan(-1.0) / math.pi)
      	return tmp
      
      function code(A, B, C)
      	t_0 = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi))
      	tmp = 0.0
      	if (B <= -1320000.0)
      		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
      	elseif (B <= 1.95e-286)
      		tmp = t_0;
      	elseif (B <= 1.45e-237)
      		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
      	elseif (B <= 7.2e-90)
      		tmp = t_0;
      	elseif (B <= 0.00085)
      		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
      	elseif (B <= 38.0)
      		tmp = t_0;
      	else
      		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	t_0 = 180.0 * (atan((-2.0 * (A / B))) / pi);
      	tmp = 0.0;
      	if (B <= -1320000.0)
      		tmp = 180.0 * (atan(1.0) / pi);
      	elseif (B <= 1.95e-286)
      		tmp = t_0;
      	elseif (B <= 1.45e-237)
      		tmp = 180.0 * (atan((0.0 / B)) / pi);
      	elseif (B <= 7.2e-90)
      		tmp = t_0;
      	elseif (B <= 0.00085)
      		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
      	elseif (B <= 38.0)
      		tmp = t_0;
      	else
      		tmp = 180.0 * (atan(-1.0) / pi);
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1320000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.95e-286], t$95$0, If[LessEqual[B, 1.45e-237], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.2e-90], t$95$0, If[LessEqual[B, 0.00085], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 38.0], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
      \mathbf{if}\;B \leq -1320000:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
      
      \mathbf{elif}\;B \leq 1.95 \cdot 10^{-286}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;B \leq 1.45 \cdot 10^{-237}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
      
      \mathbf{elif}\;B \leq 7.2 \cdot 10^{-90}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;B \leq 0.00085:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
      
      \mathbf{elif}\;B \leq 38:\\
      \;\;\;\;t_0\\
      
      \mathbf{else}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if B < -1.32e6

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

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

        if -1.32e6 < B < 1.94999999999999998e-286 or 1.45000000000000005e-237 < B < 7.19999999999999961e-90 or 8.49999999999999953e-4 < B < 38

        1. Initial program 67.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 A around inf 45.2%

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

        if 1.94999999999999998e-286 < B < 1.45000000000000005e-237

        1. Initial program 35.0%

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

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

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

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

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

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

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

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

        if 7.19999999999999961e-90 < B < 8.49999999999999953e-4

        1. Initial program 48.8%

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

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

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

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

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

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

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

        if 38 < B

        1. Initial program 53.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 63.3%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1320000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.95 \cdot 10^{-286}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.45 \cdot 10^{-237}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-90}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 0.00085:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 38:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 8: 48.0% accurate, 3.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{if}\;C \leq -1.1 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -1.42 \cdot 10^{-244}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 7.4 \cdot 10^{-260}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;C \leq 10^{-174}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;C \leq 4 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \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 (/ (* B 0.5) A)) PI)))
              (t_1 (* 180.0 (/ (atan 1.0) PI))))
         (if (<= C -1.1e-60)
           (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
           (if (<= C -1.42e-244)
             t_0
             (if (<= C 7.4e-260)
               t_1
               (if (<= C 1e-174)
                 t_0
                 (if (<= C 4e-77) t_1 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))))
      double code(double A, double B, double C) {
      	double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
      	double t_1 = 180.0 * (atan(1.0) / ((double) M_PI));
      	double tmp;
      	if (C <= -1.1e-60) {
      		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
      	} else if (C <= -1.42e-244) {
      		tmp = t_0;
      	} else if (C <= 7.4e-260) {
      		tmp = t_1;
      	} else if (C <= 1e-174) {
      		tmp = t_0;
      	} else if (C <= 4e-77) {
      		tmp = t_1;
      	} 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(((B * 0.5) / A)) / Math.PI);
      	double t_1 = 180.0 * (Math.atan(1.0) / Math.PI);
      	double tmp;
      	if (C <= -1.1e-60) {
      		tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
      	} else if (C <= -1.42e-244) {
      		tmp = t_0;
      	} else if (C <= 7.4e-260) {
      		tmp = t_1;
      	} else if (C <= 1e-174) {
      		tmp = t_0;
      	} else if (C <= 4e-77) {
      		tmp = t_1;
      	} 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(((B * 0.5) / A)) / math.pi)
      	t_1 = 180.0 * (math.atan(1.0) / math.pi)
      	tmp = 0
      	if C <= -1.1e-60:
      		tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
      	elif C <= -1.42e-244:
      		tmp = t_0
      	elif C <= 7.4e-260:
      		tmp = t_1
      	elif C <= 1e-174:
      		tmp = t_0
      	elif C <= 4e-77:
      		tmp = t_1
      	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(Float64(B * 0.5) / A)) / pi))
      	t_1 = Float64(180.0 * Float64(atan(1.0) / pi))
      	tmp = 0.0
      	if (C <= -1.1e-60)
      		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
      	elseif (C <= -1.42e-244)
      		tmp = t_0;
      	elseif (C <= 7.4e-260)
      		tmp = t_1;
      	elseif (C <= 1e-174)
      		tmp = t_0;
      	elseif (C <= 4e-77)
      		tmp = t_1;
      	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(((B * 0.5) / A)) / pi);
      	t_1 = 180.0 * (atan(1.0) / pi);
      	tmp = 0.0;
      	if (C <= -1.1e-60)
      		tmp = 180.0 * (atan((2.0 * (C / B))) / pi);
      	elseif (C <= -1.42e-244)
      		tmp = t_0;
      	elseif (C <= 7.4e-260)
      		tmp = t_1;
      	elseif (C <= 1e-174)
      		tmp = t_0;
      	elseif (C <= 4e-77)
      		tmp = t_1;
      	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[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.1e-60], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.42e-244], t$95$0, If[LessEqual[C, 7.4e-260], t$95$1, If[LessEqual[C, 1e-174], t$95$0, If[LessEqual[C, 4e-77], t$95$1, 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(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
      t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
      \mathbf{if}\;C \leq -1.1 \cdot 10^{-60}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
      
      \mathbf{elif}\;C \leq -1.42 \cdot 10^{-244}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;C \leq 7.4 \cdot 10^{-260}:\\
      \;\;\;\;t_1\\
      
      \mathbf{elif}\;C \leq 10^{-174}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;C \leq 4 \cdot 10^{-77}:\\
      \;\;\;\;t_1\\
      
      \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 < -1.0999999999999999e-60

        1. Initial program 82.7%

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

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

        if -1.0999999999999999e-60 < C < -1.42000000000000003e-244 or 7.4000000000000004e-260 < C < 1e-174

        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 A around -inf 41.4%

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

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

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

        if -1.42000000000000003e-244 < C < 7.4000000000000004e-260 or 1e-174 < C < 3.9999999999999997e-77

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

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

        if 3.9999999999999997e-77 < C

        1. Initial program 25.9%

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.1 \cdot 10^{-60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -1.42 \cdot 10^{-244}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq 7.4 \cdot 10^{-260}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 10^{-174}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq 4 \cdot 10^{-77}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 9: 56.2% accurate, 3.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{if}\;A \leq -5.5 \cdot 10^{+18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -1.9 \cdot 10^{-5}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -1 \cdot 10^{-109}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 8.2 \cdot 10^{-32}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.75 \cdot 10^{-5}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (let* ((t_0 (* 180.0 (/ (atan (/ (+ C B) B)) PI)))
              (t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
         (if (<= A -5.5e+18)
           t_1
           (if (<= A -1.9e-5)
             t_0
             (if (<= A -1e-109)
               t_1
               (if (<= A 8.2e-32)
                 t_0
                 (if (<= A 2.75e-5)
                   (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
                   (* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))))))
      double code(double A, double B, double C) {
      	double t_0 = 180.0 * (atan(((C + B) / B)) / ((double) M_PI));
      	double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
      	double tmp;
      	if (A <= -5.5e+18) {
      		tmp = t_1;
      	} else if (A <= -1.9e-5) {
      		tmp = t_0;
      	} else if (A <= -1e-109) {
      		tmp = t_1;
      	} else if (A <= 8.2e-32) {
      		tmp = t_0;
      	} else if (A <= 2.75e-5) {
      		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
      	} else {
      		tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
      	}
      	return tmp;
      }
      
      public static double code(double A, double B, double C) {
      	double t_0 = 180.0 * (Math.atan(((C + B) / B)) / Math.PI);
      	double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
      	double tmp;
      	if (A <= -5.5e+18) {
      		tmp = t_1;
      	} else if (A <= -1.9e-5) {
      		tmp = t_0;
      	} else if (A <= -1e-109) {
      		tmp = t_1;
      	} else if (A <= 8.2e-32) {
      		tmp = t_0;
      	} else if (A <= 2.75e-5) {
      		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
      	} else {
      		tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
      	}
      	return tmp;
      }
      
      def code(A, B, C):
      	t_0 = 180.0 * (math.atan(((C + B) / B)) / math.pi)
      	t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
      	tmp = 0
      	if A <= -5.5e+18:
      		tmp = t_1
      	elif A <= -1.9e-5:
      		tmp = t_0
      	elif A <= -1e-109:
      		tmp = t_1
      	elif A <= 8.2e-32:
      		tmp = t_0
      	elif A <= 2.75e-5:
      		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
      	else:
      		tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
      	return tmp
      
      function code(A, B, C)
      	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C + B) / B)) / pi))
      	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi))
      	tmp = 0.0
      	if (A <= -5.5e+18)
      		tmp = t_1;
      	elseif (A <= -1.9e-5)
      		tmp = t_0;
      	elseif (A <= -1e-109)
      		tmp = t_1;
      	elseif (A <= 8.2e-32)
      		tmp = t_0;
      	elseif (A <= 2.75e-5)
      		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi));
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	t_0 = 180.0 * (atan(((C + B) / B)) / pi);
      	t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi);
      	tmp = 0.0;
      	if (A <= -5.5e+18)
      		tmp = t_1;
      	elseif (A <= -1.9e-5)
      		tmp = t_0;
      	elseif (A <= -1e-109)
      		tmp = t_1;
      	elseif (A <= 8.2e-32)
      		tmp = t_0;
      	elseif (A <= 2.75e-5)
      		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
      	else
      		tmp = 180.0 * (atan((-2.0 * (A / B))) / pi);
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C + B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.5e+18], t$95$1, If[LessEqual[A, -1.9e-5], t$95$0, If[LessEqual[A, -1e-109], t$95$1, If[LessEqual[A, 8.2e-32], t$95$0, If[LessEqual[A, 2.75e-5], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\
      t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
      \mathbf{if}\;A \leq -5.5 \cdot 10^{+18}:\\
      \;\;\;\;t_1\\
      
      \mathbf{elif}\;A \leq -1.9 \cdot 10^{-5}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;A \leq -1 \cdot 10^{-109}:\\
      \;\;\;\;t_1\\
      
      \mathbf{elif}\;A \leq 8.2 \cdot 10^{-32}:\\
      \;\;\;\;t_0\\
      
      \mathbf{elif}\;A \leq 2.75 \cdot 10^{-5}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if A < -5.5e18 or -1.9000000000000001e-5 < A < -9.9999999999999999e-110

        1. Initial program 29.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 -inf 64.1%

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

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

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

        if -5.5e18 < A < -1.9000000000000001e-5 or -9.9999999999999999e-110 < A < 8.1999999999999995e-32

        1. Initial program 57.2%

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

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

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

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

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

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

        if 8.1999999999999995e-32 < A < 2.7500000000000001e-5

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

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

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

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

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

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

        if 2.7500000000000001e-5 < A

        1. Initial program 81.7%

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

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

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

      Alternative 10: 58.5% accurate, 3.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;C \leq -4.5 \cdot 10^{-118}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 6.5 \cdot 10^{-76} \lor \neg \left(C \leq 3.4 \cdot 10^{+23}\right) \land C \leq 3.2 \cdot 10^{+60}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (if (<= C -4.5e-118)
         (* 180.0 (/ (atan (/ (- C B) B)) PI))
         (if (or (<= C 6.5e-76) (and (not (<= C 3.4e+23)) (<= C 3.2e+60)))
           (/ 180.0 (/ PI (atan (- 1.0 (/ A B)))))
           (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
      double code(double A, double B, double C) {
      	double tmp;
      	if (C <= -4.5e-118) {
      		tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
      	} else if ((C <= 6.5e-76) || (!(C <= 3.4e+23) && (C <= 3.2e+60))) {
      		tmp = 180.0 / (((double) M_PI) / atan((1.0 - (A / B))));
      	} 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.5e-118) {
      		tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
      	} else if ((C <= 6.5e-76) || (!(C <= 3.4e+23) && (C <= 3.2e+60))) {
      		tmp = 180.0 / (Math.PI / Math.atan((1.0 - (A / B))));
      	} else {
      		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
      	}
      	return tmp;
      }
      
      def code(A, B, C):
      	tmp = 0
      	if C <= -4.5e-118:
      		tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi)
      	elif (C <= 6.5e-76) or (not (C <= 3.4e+23) and (C <= 3.2e+60)):
      		tmp = 180.0 / (math.pi / math.atan((1.0 - (A / B))))
      	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.5e-118)
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi));
      	elseif ((C <= 6.5e-76) || (!(C <= 3.4e+23) && (C <= 3.2e+60)))
      		tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 - Float64(A / B)))));
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	tmp = 0.0;
      	if (C <= -4.5e-118)
      		tmp = 180.0 * (atan(((C - B) / B)) / pi);
      	elseif ((C <= 6.5e-76) || (~((C <= 3.4e+23)) && (C <= 3.2e+60)))
      		tmp = 180.0 / (pi / atan((1.0 - (A / B))));
      	else
      		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := If[LessEqual[C, -4.5e-118], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 6.5e-76], And[N[Not[LessEqual[C, 3.4e+23]], $MachinePrecision], LessEqual[C, 3.2e+60]]], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;C \leq -4.5 \cdot 10^{-118}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
      
      \mathbf{elif}\;C \leq 6.5 \cdot 10^{-76} \lor \neg \left(C \leq 3.4 \cdot 10^{+23}\right) \land C \leq 3.2 \cdot 10^{+60}:\\
      \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A}{B}\right)}}\\
      
      \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 3 regimes
      2. if C < -4.5e-118

        1. Initial program 78.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 75.2%

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

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

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

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

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

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

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

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

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

        if -4.5e-118 < C < 6.5e-76 or 3.39999999999999992e23 < C < 3.19999999999999991e60

        1. Initial program 62.2%

          \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
        2. Add Preprocessing
        3. Applied egg-rr89.2%

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

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

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

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

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

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

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

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

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

        if 6.5e-76 < C < 3.39999999999999992e23 or 3.19999999999999991e60 < C

        1. Initial program 22.0%

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -4.5 \cdot 10^{-118}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 6.5 \cdot 10^{-76} \lor \neg \left(C \leq 3.4 \cdot 10^{+23}\right) \land C \leq 3.2 \cdot 10^{+60}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 11: 48.0% accurate, 3.2× speedup?

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

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

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

        if -4.4e5 < B < 1.69999999999999986e-288 or 7.8999999999999998e-237 < B < 14.5

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

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

        if 1.69999999999999986e-288 < B < 7.8999999999999998e-237

        1. Initial program 35.0%

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

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

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

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

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

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

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

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

        if 14.5 < B

        1. Initial program 53.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 63.3%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -440000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-288}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.9 \cdot 10^{-237}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 14.5:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 12: 63.0% accurate, 3.3× speedup?

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

        1. Initial program 58.5%

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

          \[\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+67.0%

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

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

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

        if 1.4499999999999999e-287 < B < 1.79999999999999998e-237

        1. Initial program 35.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. Applied egg-rr59.2%

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

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

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

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

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

        if 280 < B

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

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

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

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

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

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

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

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

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

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

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

      Alternative 13: 66.8% accurate, 3.5× speedup?

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

        1. Initial program 56.6%

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

          \[\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+70.4%

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

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

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

        if 3.49999999999999981e-290 < B < 1.79999999999999998e-237

        1. Initial program 35.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. Applied egg-rr59.2%

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

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

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

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

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

        if 1.79999999999999998e-237 < B

        1. Initial program 57.8%

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

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

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

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

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

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

        Alternative 14: 66.8% accurate, 3.5× speedup?

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

          1. Initial program 56.6%

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

            \[\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+70.4%

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

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

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

          if 5.5999999999999999e-291 < B < 1.39999999999999993e-236

          1. Initial program 35.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. Applied egg-rr59.2%

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

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

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

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

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

          if 1.39999999999999993e-236 < B

          1. Initial program 57.8%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. Add Preprocessing
          3. Applied egg-rr79.0%

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

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

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

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

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

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

        Alternative 15: 47.7% accurate, 3.5× speedup?

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

          1. Initial program 77.9%

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

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

          if -4.80000000000000029e-139 < C < 4.5000000000000001e-77

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

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

          if 4.5000000000000001e-77 < C

          1. Initial program 25.9%

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

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

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

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

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

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

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

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

        Alternative 16: 56.7% accurate, 3.5× speedup?

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

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

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

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

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

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

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

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

          if 2.54999999999999997e-288 < B < 2.29999999999999997e-148

          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 A around -inf 51.6%

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

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

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

          if 2.29999999999999997e-148 < B

          1. Initial program 56.2%

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \color{blue}{\mathsf{hypot}\left(B, C\right)}}{B}\right)}{\pi} \]
          5. Simplified66.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 C around 0 64.0%

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

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

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

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

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

        Alternative 17: 56.6% accurate, 3.5× speedup?

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

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

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

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

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

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

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

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

          if 8.99999999999999913e-292 < B < 7.0000000000000001e-148

          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. Applied egg-rr75.9%

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

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

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

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

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

          if 7.0000000000000001e-148 < B

          1. Initial program 56.2%

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \color{blue}{\mathsf{hypot}\left(B, C\right)}}{B}\right)}{\pi} \]
          5. Simplified66.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 C around 0 64.0%

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

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

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

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

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

        Alternative 18: 46.0% accurate, 3.6× speedup?

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

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

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

          if -4.30000000000000014e-92 < B < 8.4999999999999995e-123

          1. Initial program 54.9%

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

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

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

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

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

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

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

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

          if 8.4999999999999995e-123 < B

          1. Initial program 55.9%

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.3 \cdot 10^{-92}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-123}:\\ \;\;\;\;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 19: 40.6% accurate, 3.8× speedup?

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

          1. Initial program 56.3%

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

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

          if -3.00000000000000028e-303 < B

          1. Initial program 55.9%

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

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

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

        Alternative 20: 21.6% 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 56.1%

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

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

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

        Reproduce

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