ABCF->ab-angle angle

Percentage Accurate: 53.7% → 80.7%
Time: 17.7s
Alternatives: 19
Speedup: 3.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 53.7% accurate, 1.0× speedup?

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

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

Alternative 1: 80.7% accurate, 1.9× speedup?

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

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

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


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

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

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

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

    if 3.4999999999999998e79 < C

    1. Initial program 23.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. Step-by-step derivation
      1. +-commutative23.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.3% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -1.9e13

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

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

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

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

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

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

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

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

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

    if -1.9e13 < C < 3.4999999999999998e79

    1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

    if 3.4999999999999998e79 < C

    1. Initial program 23.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. Step-by-step derivation
      1. +-commutative23.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 77.3% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -5.2e6

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

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

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

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

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

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

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

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

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

    if -5.2e6 < C < 3.40000000000000032e79

    1. Initial program 59.7%

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

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

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

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

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

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

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

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

    if 3.40000000000000032e79 < C

    1. Initial program 23.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. Step-by-step derivation
      1. +-commutative23.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 75.2% accurate, 1.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -7.8000000000000002e81

    1. Initial program 26.4%

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

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

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

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

    if -7.8000000000000002e81 < A < 2.2999999999999999e57

    1. Initial program 62.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 59.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. +-commutative59.0%

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

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

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

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

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

    if 2.2999999999999999e57 < A < 3.4000000000000001e91

    1. Initial program 32.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.4000000000000001e91 < A

    1. Initial program 85.7%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 80.7% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

    if 3.4999999999999998e79 < C

    1. Initial program 23.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. Step-by-step derivation
      1. +-commutative23.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 81.6% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 26.4%

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

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

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

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

    if -4.7000000000000002e81 < A

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

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

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

    Alternative 7: 46.6% accurate, 3.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -3.2 \cdot 10^{-55}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.3 \cdot 10^{-195}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.65 \cdot 10^{-228}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 2.45 \cdot 10^{-34}:\\ \;\;\;\;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 (/ C B)) PI))))
       (if (<= B -3.2e-55)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -1.3e-195)
           t_0
           (if (<= B 1.65e-228)
             (/ (* 180.0 (atan 0.0)) PI)
             (if (<= B 2.45e-34) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
    	double tmp;
    	if (B <= -3.2e-55) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -1.3e-195) {
    		tmp = t_0;
    	} else if (B <= 1.65e-228) {
    		tmp = (180.0 * atan(0.0)) / ((double) M_PI);
    	} else if (B <= 2.45e-34) {
    		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((C / B)) / Math.PI);
    	double tmp;
    	if (B <= -3.2e-55) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -1.3e-195) {
    		tmp = t_0;
    	} else if (B <= 1.65e-228) {
    		tmp = (180.0 * Math.atan(0.0)) / Math.PI;
    	} else if (B <= 2.45e-34) {
    		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((C / B)) / math.pi)
    	tmp = 0
    	if B <= -3.2e-55:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -1.3e-195:
    		tmp = t_0
    	elif B <= 1.65e-228:
    		tmp = (180.0 * math.atan(0.0)) / math.pi
    	elif B <= 2.45e-34:
    		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(C / B)) / pi))
    	tmp = 0.0
    	if (B <= -3.2e-55)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -1.3e-195)
    		tmp = t_0;
    	elseif (B <= 1.65e-228)
    		tmp = Float64(Float64(180.0 * atan(0.0)) / pi);
    	elseif (B <= 2.45e-34)
    		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((C / B)) / pi);
    	tmp = 0.0;
    	if (B <= -3.2e-55)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -1.3e-195)
    		tmp = t_0;
    	elseif (B <= 1.65e-228)
    		tmp = (180.0 * atan(0.0)) / pi;
    	elseif (B <= 2.45e-34)
    		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[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.2e-55], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.3e-195], t$95$0, If[LessEqual[B, 1.65e-228], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2.45e-34], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -3.2 \cdot 10^{-55}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -1.3 \cdot 10^{-195}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.65 \cdot 10^{-228}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
    
    \mathbf{elif}\;B \leq 2.45 \cdot 10^{-34}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if B < -3.2000000000000001e-55

      1. Initial program 50.3%

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

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

      if -3.2000000000000001e-55 < B < -1.3000000000000001e-195 or 1.65000000000000003e-228 < B < 2.44999999999999981e-34

      1. Initial program 64.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. Step-by-step derivation
        1. +-commutative64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.3000000000000001e-195 < B < 1.65000000000000003e-228

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

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

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{0}}{\pi} \]
      7. Simplified62.0%

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

      if 2.44999999999999981e-34 < B

      1. Initial program 61.3%

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

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

    Alternative 8: 63.6% accurate, 3.4× speedup?

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

      1. Initial program 53.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. Step-by-step derivation
        1. *-commutative53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.1500000000000001e-195 < B < 3.5999999999999998e-271

      1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.5999999999999998e-271 < B

      1. Initial program 62.0%

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

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

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

    Alternative 9: 63.6% accurate, 3.4× speedup?

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

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

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

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

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

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

      if -1.65e-195 < B < 2.30000000000000009e-271

      1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.30000000000000009e-271 < B

      1. Initial program 62.0%

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

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

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

    Alternative 10: 56.9% accurate, 3.4× speedup?

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

      1. Initial program 29.8%

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

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

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

      if -1.69999999999999998e38 < A < 3.0000000000000002e58

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

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

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

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

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

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

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

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

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

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

      if 3.0000000000000002e58 < A < 1.50000000000000003e91

      1. Initial program 25.3%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(B \cdot \left(-\frac{\color{blue}{0.5}}{C}\right)\right)}{\pi} \]
        9. distribute-neg-frac79.3%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(B \cdot \color{blue}{\frac{-0.5}{C}}\right)}{\pi} \]
        10. metadata-eval79.3%

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

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

      if 1.50000000000000003e91 < A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.7 \cdot 10^{+38}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3 \cdot 10^{+58}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.5 \cdot 10^{+91}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 51.0% accurate, 3.4× speedup?

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

      1. Initial program 50.3%

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

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

      if -2.0999999999999999e-57 < B < -2.80000000000000003e-195

      1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.80000000000000003e-195 < B < 4.59999999999999992e-229

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

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

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{0}}{\pi} \]
      7. Simplified62.0%

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

      if 4.59999999999999992e-229 < B

      1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 63.6% accurate, 3.4× speedup?

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

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

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

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

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

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

      if -1.1500000000000001e-195 < B < 2.6999999999999999e-271

      1. Initial program 51.6%

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

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

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{0}}{\pi} \]
      7. Simplified66.6%

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

      if 2.6999999999999999e-271 < B

      1. Initial program 62.0%

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

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

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

    Alternative 13: 63.9% accurate, 3.5× speedup?

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

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

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

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

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

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

      if -1.1500000000000001e-195 < B < 2.4000000000000002e-271

      1. Initial program 51.6%

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

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

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{0}}{\pi} \]
      7. Simplified66.6%

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

      if 2.4000000000000002e-271 < B

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

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

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

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

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

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

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

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

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

    Alternative 14: 57.1% accurate, 3.5× speedup?

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

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

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

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

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

      if -5.1e27 < A < 0.00176000000000000006

      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. Step-by-step derivation
        1. +-commutative61.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 0.00176000000000000006 < A

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 15: 48.0% accurate, 3.5× speedup?

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

      1. Initial program 71.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. Step-by-step derivation
        1. +-commutative71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.5e-52 < C < 3.09999999999999989e-86

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

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

      if 3.09999999999999989e-86 < C

      1. Initial program 30.4%

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

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

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

    Alternative 16: 61.8% accurate, 3.6× speedup?

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

      1. Initial program 29.8%

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

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

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

      if -1.25000000000000001e40 < A

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

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

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

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

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

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

    Alternative 17: 43.7% accurate, 3.6× speedup?

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

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

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

      if -2.4e-195 < B < 4.79999999999999998e-161

      1. Initial program 56.0%

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

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

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{0}}{\pi} \]
      7. Simplified51.7%

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

      if 4.79999999999999998e-161 < B

      1. Initial program 62.0%

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

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

    Alternative 18: 39.6% accurate, 3.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1.05 \cdot 10^{-290}:\\ \;\;\;\;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 -1.05e-290)
       (* 180.0 (/ (atan 1.0) PI))
       (* 180.0 (/ (atan -1.0) PI))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (B <= -1.05e-290) {
    		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 <= -1.05e-290) {
    		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 <= -1.05e-290:
    		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 <= -1.05e-290)
    		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 <= -1.05e-290)
    		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, -1.05e-290], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;B \leq -1.05 \cdot 10^{-290}:\\
    \;\;\;\;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 < -1.0500000000000001e-290

      1. Initial program 52.3%

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

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

      if -1.0500000000000001e-290 < B

      1. Initial program 62.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 37.7%

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

    Alternative 19: 20.8% 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 57.0%

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

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

    Reproduce

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