ABCF->ab-angle angle

Percentage Accurate: 53.9% → 81.4%
Time: 29.1s
Alternatives: 24
Speedup: 3.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 24 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.9% accurate, 1.0× speedup?

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

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

Alternative 1: 81.4% accurate, 1.9× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -1.44999999999999995e190 < A

    1. Initial program 56.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/56.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}} \]
      2. associate-*l/56.5%

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

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

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

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

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

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

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

Alternative 2: 77.6% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

    if -1.4e-147 < C < 2.7999999999999998e58

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

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

    if 2.7999999999999998e58 < C

    1. Initial program 16.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/16.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}} \]
      2. associate-*l/16.9%

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

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

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

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

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

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

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

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

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

Alternative 3: 77.7% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

    if -5.00000000000000013e-147 < C < 3.69999999999999997e59

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.69999999999999997e59 < C

    1. Initial program 16.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/16.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}} \]
      2. associate-*l/16.9%

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

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

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

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

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

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

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

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

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

Alternative 4: 77.6% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 67.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/67.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}} \]
      2. associate-*l/67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9000000000000001e-147 < C < 1.00000000000000001e55

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000001e55 < C

    1. Initial program 16.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/16.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}} \]
      2. associate-*l/16.9%

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

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

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

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

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

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

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

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

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

Alternative 5: 75.2% accurate, 1.9× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000002e188 < A < 1.0500000000000001e73

    1. Initial program 52.6%

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

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

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

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

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

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

    if 1.0500000000000001e73 < A

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

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

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

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

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

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

Alternative 6: 75.2% accurate, 1.9× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000002e188 < A < 1.21999999999999998e73

    1. Initial program 52.6%

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

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

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

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

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

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

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

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

    if 1.21999999999999998e73 < A

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

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

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

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

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

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

Alternative 7: 81.0% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 11.2%

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

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

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

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

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

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

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

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

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

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

    if -4.90000000000000018e128 < A

    1. Initial program 58.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. Simplified80.5%

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

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

    Alternative 8: 81.4% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.3000000000000001e190 < A

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}}{B}\right)}{\pi} \]
        6. hypot-define80.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. Simplified80.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
    3. Recombined 2 regimes into one program.
    4. Final simplification81.9%

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

    Alternative 9: 46.5% accurate, 2.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.26 \cdot 10^{+63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2 \cdot 10^{-33}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-290}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 4.1 \cdot 10^{-258}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{-235}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.75 \cdot 10^{-188}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 8 \cdot 10^{-37}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))
            (t_1 (* 180.0 (/ (atan (/ C B)) PI))))
       (if (<= B -1.26e+63)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -2e-33)
           t_0
           (if (<= B -1.6e-104)
             t_1
             (if (<= B -2.05e-290)
               t_0
               (if (<= B 4.1e-258)
                 t_1
                 (if (<= B 1.85e-235)
                   t_0
                   (if (<= B 1.75e-188)
                     (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
                     (if (<= B 8e-37) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	double t_1 = 180.0 * (atan((C / B)) / ((double) M_PI));
    	double tmp;
    	if (B <= -1.26e+63) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -2e-33) {
    		tmp = t_0;
    	} else if (B <= -1.6e-104) {
    		tmp = t_1;
    	} else if (B <= -2.05e-290) {
    		tmp = t_0;
    	} else if (B <= 4.1e-258) {
    		tmp = t_1;
    	} else if (B <= 1.85e-235) {
    		tmp = t_0;
    	} else if (B <= 1.75e-188) {
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	} else if (B <= 8e-37) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	double t_1 = 180.0 * (Math.atan((C / B)) / Math.PI);
    	double tmp;
    	if (B <= -1.26e+63) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -2e-33) {
    		tmp = t_0;
    	} else if (B <= -1.6e-104) {
    		tmp = t_1;
    	} else if (B <= -2.05e-290) {
    		tmp = t_0;
    	} else if (B <= 4.1e-258) {
    		tmp = t_1;
    	} else if (B <= 1.85e-235) {
    		tmp = t_0;
    	} else if (B <= 1.75e-188) {
    		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	} else if (B <= 8e-37) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	t_1 = 180.0 * (math.atan((C / B)) / math.pi)
    	tmp = 0
    	if B <= -1.26e+63:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -2e-33:
    		tmp = t_0
    	elif B <= -1.6e-104:
    		tmp = t_1
    	elif B <= -2.05e-290:
    		tmp = t_0
    	elif B <= 4.1e-258:
    		tmp = t_1
    	elif B <= 1.85e-235:
    		tmp = t_0
    	elif B <= 1.75e-188:
    		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	elif B <= 8e-37:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi))
    	t_1 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi))
    	tmp = 0.0
    	if (B <= -1.26e+63)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -2e-33)
    		tmp = t_0;
    	elseif (B <= -1.6e-104)
    		tmp = t_1;
    	elseif (B <= -2.05e-290)
    		tmp = t_0;
    	elseif (B <= 4.1e-258)
    		tmp = t_1;
    	elseif (B <= 1.85e-235)
    		tmp = t_0;
    	elseif (B <= 1.75e-188)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
    	elseif (B <= 8e-37)
    		tmp = t_0;
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	t_1 = 180.0 * (atan((C / B)) / pi);
    	tmp = 0.0;
    	if (B <= -1.26e+63)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -2e-33)
    		tmp = t_0;
    	elseif (B <= -1.6e-104)
    		tmp = t_1;
    	elseif (B <= -2.05e-290)
    		tmp = t_0;
    	elseif (B <= 4.1e-258)
    		tmp = t_1;
    	elseif (B <= 1.85e-235)
    		tmp = t_0;
    	elseif (B <= 1.75e-188)
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	elseif (B <= 8e-37)
    		tmp = t_0;
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.26e+63], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2e-33], t$95$0, If[LessEqual[B, -1.6e-104], t$95$1, If[LessEqual[B, -2.05e-290], t$95$0, If[LessEqual[B, 4.1e-258], t$95$1, If[LessEqual[B, 1.85e-235], t$95$0, If[LessEqual[B, 1.75e-188], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8e-37], 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(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -1.26 \cdot 10^{+63}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -2 \cdot 10^{-33}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq -1.6 \cdot 10^{-104}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq -2.05 \cdot 10^{-290}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 4.1 \cdot 10^{-258}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq 1.85 \cdot 10^{-235}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.75 \cdot 10^{-188}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 8 \cdot 10^{-37}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if B < -1.26e63

      1. Initial program 38.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 76.8%

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

      if -1.26e63 < B < -2.0000000000000001e-33 or -1.59999999999999994e-104 < B < -2.0500000000000001e-290 or 4.1000000000000001e-258 < B < 1.8500000000000001e-235 or 1.75e-188 < B < 8.00000000000000053e-37

      1. Initial program 44.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. associate-*r/44.8%

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

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

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

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

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

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

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

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

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

      if -2.0000000000000001e-33 < B < -1.59999999999999994e-104 or -2.0500000000000001e-290 < B < 4.1000000000000001e-258

      1. Initial program 78.7%

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

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

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

      if 1.8500000000000001e-235 < B < 1.75e-188

      1. Initial program 62.7%

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

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

      if 8.00000000000000053e-37 < B

      1. Initial program 52.3%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.26 \cdot 10^{+63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2 \cdot 10^{-33}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-104}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-290}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.1 \cdot 10^{-258}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{-235}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.75 \cdot 10^{-188}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 8 \cdot 10^{-37}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 46.6% accurate, 2.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.46 \cdot 10^{+63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-33}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq -3.7 \cdot 10^{-103}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;B \leq -7.4 \cdot 10^{-292}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{-259}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9.2 \cdot 10^{-236}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 6.9 \cdot 10^{-187}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{-33}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
       (if (<= B -1.46e+63)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -1.6e-33)
           t_0
           (if (<= B -3.7e-103)
             (* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
             (if (<= B -7.4e-292)
               t_0
               (if (<= B 4.3e-259)
                 (* 180.0 (/ (atan (/ C B)) PI))
                 (if (<= B 9.2e-236)
                   t_0
                   (if (<= B 6.9e-187)
                     (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
                     (if (<= B 1.4e-33) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	double tmp;
    	if (B <= -1.46e+63) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -1.6e-33) {
    		tmp = t_0;
    	} else if (B <= -3.7e-103) {
    		tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
    	} else if (B <= -7.4e-292) {
    		tmp = t_0;
    	} else if (B <= 4.3e-259) {
    		tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
    	} else if (B <= 9.2e-236) {
    		tmp = t_0;
    	} else if (B <= 6.9e-187) {
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	} else if (B <= 1.4e-33) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	double tmp;
    	if (B <= -1.46e+63) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -1.6e-33) {
    		tmp = t_0;
    	} else if (B <= -3.7e-103) {
    		tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
    	} else if (B <= -7.4e-292) {
    		tmp = t_0;
    	} else if (B <= 4.3e-259) {
    		tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
    	} else if (B <= 9.2e-236) {
    		tmp = t_0;
    	} else if (B <= 6.9e-187) {
    		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	} else if (B <= 1.4e-33) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	tmp = 0
    	if B <= -1.46e+63:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -1.6e-33:
    		tmp = t_0
    	elif B <= -3.7e-103:
    		tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi)
    	elif B <= -7.4e-292:
    		tmp = t_0
    	elif B <= 4.3e-259:
    		tmp = 180.0 * (math.atan((C / B)) / math.pi)
    	elif B <= 9.2e-236:
    		tmp = t_0
    	elif B <= 6.9e-187:
    		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	elif B <= 1.4e-33:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi))
    	tmp = 0.0
    	if (B <= -1.46e+63)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -1.6e-33)
    		tmp = t_0;
    	elseif (B <= -3.7e-103)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi));
    	elseif (B <= -7.4e-292)
    		tmp = t_0;
    	elseif (B <= 4.3e-259)
    		tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi));
    	elseif (B <= 9.2e-236)
    		tmp = t_0;
    	elseif (B <= 6.9e-187)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
    	elseif (B <= 1.4e-33)
    		tmp = t_0;
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	tmp = 0.0;
    	if (B <= -1.46e+63)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -1.6e-33)
    		tmp = t_0;
    	elseif (B <= -3.7e-103)
    		tmp = 180.0 * (atan(((C / B) * 2.0)) / pi);
    	elseif (B <= -7.4e-292)
    		tmp = t_0;
    	elseif (B <= 4.3e-259)
    		tmp = 180.0 * (atan((C / B)) / pi);
    	elseif (B <= 9.2e-236)
    		tmp = t_0;
    	elseif (B <= 6.9e-187)
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	elseif (B <= 1.4e-33)
    		tmp = t_0;
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.46e+63], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.6e-33], t$95$0, If[LessEqual[B, -3.7e-103], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7.4e-292], t$95$0, If[LessEqual[B, 4.3e-259], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.2e-236], t$95$0, If[LessEqual[B, 6.9e-187], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e-33], 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(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    \mathbf{if}\;B \leq -1.46 \cdot 10^{+63}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -1.6 \cdot 10^{-33}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq -3.7 \cdot 10^{-103}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -7.4 \cdot 10^{-292}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 4.3 \cdot 10^{-259}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 9.2 \cdot 10^{-236}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 6.9 \cdot 10^{-187}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.4 \cdot 10^{-33}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 6 regimes
    2. if B < -1.4599999999999999e63

      1. Initial program 38.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 76.8%

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

      if -1.4599999999999999e63 < B < -1.59999999999999988e-33 or -3.6999999999999999e-103 < B < -7.39999999999999993e-292 or 4.3000000000000001e-259 < B < 9.20000000000000024e-236 or 6.90000000000000045e-187 < B < 1.4e-33

      1. Initial program 44.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. associate-*r/44.8%

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

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

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

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

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

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

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

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

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

      if -1.59999999999999988e-33 < B < -3.6999999999999999e-103

      1. Initial program 83.0%

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

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

      if -7.39999999999999993e-292 < B < 4.3000000000000001e-259

      1. Initial program 71.4%

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

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

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

      if 9.20000000000000024e-236 < B < 6.90000000000000045e-187

      1. Initial program 62.7%

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

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

      if 1.4e-33 < B

      1. Initial program 52.3%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.46 \cdot 10^{+63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-33}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -3.7 \cdot 10^{-103}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;B \leq -7.4 \cdot 10^{-292}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{-259}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9.2 \cdot 10^{-236}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6.9 \cdot 10^{-187}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{-33}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 63.6% accurate, 3.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ t_1 := \frac{C - A}{B}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(1 + t\_1\right)}{\pi}\\ \mathbf{if}\;B \leq -1.42 \cdot 10^{+66}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;B \leq -7.2 \cdot 10^{+27}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -9.5 \cdot 10^{-193}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;B \leq -8.8 \cdot 10^{-222}:\\ \;\;\;\;180 \cdot \frac{t\_0}{\pi}\\ \mathbf{elif}\;B \leq -2 \cdot 10^{-269}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{-272}:\\ \;\;\;\;t\_0 \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_1 + -1\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (atan (/ (* B 0.5) A)))
            (t_1 (/ (- C A) B))
            (t_2 (* 180.0 (/ (atan (+ 1.0 t_1)) PI))))
       (if (<= B -1.42e+66)
         t_2
         (if (<= B -7.2e+27)
           (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
           (if (<= B -9.5e-193)
             t_2
             (if (<= B -8.8e-222)
               (* 180.0 (/ t_0 PI))
               (if (<= B -2e-269)
                 t_2
                 (if (<= B 2.6e-272)
                   (* t_0 (/ 180.0 PI))
                   (/ (* 180.0 (atan (+ t_1 -1.0))) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = atan(((B * 0.5) / A));
    	double t_1 = (C - A) / B;
    	double t_2 = 180.0 * (atan((1.0 + t_1)) / ((double) M_PI));
    	double tmp;
    	if (B <= -1.42e+66) {
    		tmp = t_2;
    	} else if (B <= -7.2e+27) {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	} else if (B <= -9.5e-193) {
    		tmp = t_2;
    	} else if (B <= -8.8e-222) {
    		tmp = 180.0 * (t_0 / ((double) M_PI));
    	} else if (B <= -2e-269) {
    		tmp = t_2;
    	} else if (B <= 2.6e-272) {
    		tmp = t_0 * (180.0 / ((double) M_PI));
    	} else {
    		tmp = (180.0 * atan((t_1 + -1.0))) / ((double) M_PI);
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = Math.atan(((B * 0.5) / A));
    	double t_1 = (C - A) / B;
    	double t_2 = 180.0 * (Math.atan((1.0 + t_1)) / Math.PI);
    	double tmp;
    	if (B <= -1.42e+66) {
    		tmp = t_2;
    	} else if (B <= -7.2e+27) {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	} else if (B <= -9.5e-193) {
    		tmp = t_2;
    	} else if (B <= -8.8e-222) {
    		tmp = 180.0 * (t_0 / Math.PI);
    	} else if (B <= -2e-269) {
    		tmp = t_2;
    	} else if (B <= 2.6e-272) {
    		tmp = t_0 * (180.0 / Math.PI);
    	} else {
    		tmp = (180.0 * Math.atan((t_1 + -1.0))) / Math.PI;
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = math.atan(((B * 0.5) / A))
    	t_1 = (C - A) / B
    	t_2 = 180.0 * (math.atan((1.0 + t_1)) / math.pi)
    	tmp = 0
    	if B <= -1.42e+66:
    		tmp = t_2
    	elif B <= -7.2e+27:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	elif B <= -9.5e-193:
    		tmp = t_2
    	elif B <= -8.8e-222:
    		tmp = 180.0 * (t_0 / math.pi)
    	elif B <= -2e-269:
    		tmp = t_2
    	elif B <= 2.6e-272:
    		tmp = t_0 * (180.0 / math.pi)
    	else:
    		tmp = (180.0 * math.atan((t_1 + -1.0))) / math.pi
    	return tmp
    
    function code(A, B, C)
    	t_0 = atan(Float64(Float64(B * 0.5) / A))
    	t_1 = Float64(Float64(C - A) / B)
    	t_2 = Float64(180.0 * Float64(atan(Float64(1.0 + t_1)) / pi))
    	tmp = 0.0
    	if (B <= -1.42e+66)
    		tmp = t_2;
    	elseif (B <= -7.2e+27)
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
    	elseif (B <= -9.5e-193)
    		tmp = t_2;
    	elseif (B <= -8.8e-222)
    		tmp = Float64(180.0 * Float64(t_0 / pi));
    	elseif (B <= -2e-269)
    		tmp = t_2;
    	elseif (B <= 2.6e-272)
    		tmp = Float64(t_0 * Float64(180.0 / pi));
    	else
    		tmp = Float64(Float64(180.0 * atan(Float64(t_1 + -1.0))) / pi);
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = atan(((B * 0.5) / A));
    	t_1 = (C - A) / B;
    	t_2 = 180.0 * (atan((1.0 + t_1)) / pi);
    	tmp = 0.0;
    	if (B <= -1.42e+66)
    		tmp = t_2;
    	elseif (B <= -7.2e+27)
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	elseif (B <= -9.5e-193)
    		tmp = t_2;
    	elseif (B <= -8.8e-222)
    		tmp = 180.0 * (t_0 / pi);
    	elseif (B <= -2e-269)
    		tmp = t_2;
    	elseif (B <= 2.6e-272)
    		tmp = t_0 * (180.0 / pi);
    	else
    		tmp = (180.0 * atan((t_1 + -1.0))) / pi;
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.42e+66], t$95$2, If[LessEqual[B, -7.2e+27], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.5e-193], t$95$2, If[LessEqual[B, -8.8e-222], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2e-269], t$95$2, If[LessEqual[B, 2.6e-272], N[(t$95$0 * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$1 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
    t_1 := \frac{C - A}{B}\\
    t_2 := 180 \cdot \frac{\tan^{-1} \left(1 + t\_1\right)}{\pi}\\
    \mathbf{if}\;B \leq -1.42 \cdot 10^{+66}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;B \leq -7.2 \cdot 10^{+27}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -9.5 \cdot 10^{-193}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;B \leq -8.8 \cdot 10^{-222}:\\
    \;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
    
    \mathbf{elif}\;B \leq -2 \cdot 10^{-269}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;B \leq 2.6 \cdot 10^{-272}:\\
    \;\;\;\;t\_0 \cdot \frac{180}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_1 + -1\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if B < -1.4200000000000001e66 or -7.19999999999999966e27 < B < -9.5000000000000003e-193 or -8.8000000000000001e-222 < B < -1.9999999999999999e-269

      1. Initial program 53.1%

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

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

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

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

      if -1.4200000000000001e66 < B < -7.19999999999999966e27

      1. Initial program 13.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/13.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}} \]
        2. associate-*l/13.7%

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

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

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

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

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

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

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

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

      if -9.5000000000000003e-193 < B < -8.8000000000000001e-222

      1. Initial program 5.7%

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

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

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

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

      if -1.9999999999999999e-269 < B < 2.59999999999999992e-272

      1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

      if 2.59999999999999992e-272 < B

      1. Initial program 53.5%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*r/53.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}} \]
        2. associate-*l/53.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.42 \cdot 10^{+66}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -7.2 \cdot 10^{+27}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -9.5 \cdot 10^{-193}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -8.8 \cdot 10^{-222}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2 \cdot 10^{-269}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{-272}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 63.7% accurate, 3.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ t_1 := \frac{C - A}{B}\\ t_2 := \tan^{-1} \left(1 + t\_1\right)\\ t_3 := 180 \cdot \frac{t\_2}{\pi}\\ \mathbf{if}\;B \leq -1.42 \cdot 10^{+66}:\\ \;\;\;\;\frac{180 \cdot t\_2}{\pi}\\ \mathbf{elif}\;B \leq -7.2 \cdot 10^{+27}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.7 \cdot 10^{-191}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;B \leq -8.8 \cdot 10^{-222}:\\ \;\;\;\;180 \cdot \frac{t\_0}{\pi}\\ \mathbf{elif}\;B \leq -1.02 \cdot 10^{-268}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;B \leq 9 \cdot 10^{-273}:\\ \;\;\;\;t\_0 \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_1 + -1\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (atan (/ (* B 0.5) A)))
            (t_1 (/ (- C A) B))
            (t_2 (atan (+ 1.0 t_1)))
            (t_3 (* 180.0 (/ t_2 PI))))
       (if (<= B -1.42e+66)
         (/ (* 180.0 t_2) PI)
         (if (<= B -7.2e+27)
           (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
           (if (<= B -2.7e-191)
             t_3
             (if (<= B -8.8e-222)
               (* 180.0 (/ t_0 PI))
               (if (<= B -1.02e-268)
                 t_3
                 (if (<= B 9e-273)
                   (* t_0 (/ 180.0 PI))
                   (/ (* 180.0 (atan (+ t_1 -1.0))) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = atan(((B * 0.5) / A));
    	double t_1 = (C - A) / B;
    	double t_2 = atan((1.0 + t_1));
    	double t_3 = 180.0 * (t_2 / ((double) M_PI));
    	double tmp;
    	if (B <= -1.42e+66) {
    		tmp = (180.0 * t_2) / ((double) M_PI);
    	} else if (B <= -7.2e+27) {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	} else if (B <= -2.7e-191) {
    		tmp = t_3;
    	} else if (B <= -8.8e-222) {
    		tmp = 180.0 * (t_0 / ((double) M_PI));
    	} else if (B <= -1.02e-268) {
    		tmp = t_3;
    	} else if (B <= 9e-273) {
    		tmp = t_0 * (180.0 / ((double) M_PI));
    	} else {
    		tmp = (180.0 * atan((t_1 + -1.0))) / ((double) M_PI);
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = Math.atan(((B * 0.5) / A));
    	double t_1 = (C - A) / B;
    	double t_2 = Math.atan((1.0 + t_1));
    	double t_3 = 180.0 * (t_2 / Math.PI);
    	double tmp;
    	if (B <= -1.42e+66) {
    		tmp = (180.0 * t_2) / Math.PI;
    	} else if (B <= -7.2e+27) {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	} else if (B <= -2.7e-191) {
    		tmp = t_3;
    	} else if (B <= -8.8e-222) {
    		tmp = 180.0 * (t_0 / Math.PI);
    	} else if (B <= -1.02e-268) {
    		tmp = t_3;
    	} else if (B <= 9e-273) {
    		tmp = t_0 * (180.0 / Math.PI);
    	} else {
    		tmp = (180.0 * Math.atan((t_1 + -1.0))) / Math.PI;
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = math.atan(((B * 0.5) / A))
    	t_1 = (C - A) / B
    	t_2 = math.atan((1.0 + t_1))
    	t_3 = 180.0 * (t_2 / math.pi)
    	tmp = 0
    	if B <= -1.42e+66:
    		tmp = (180.0 * t_2) / math.pi
    	elif B <= -7.2e+27:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	elif B <= -2.7e-191:
    		tmp = t_3
    	elif B <= -8.8e-222:
    		tmp = 180.0 * (t_0 / math.pi)
    	elif B <= -1.02e-268:
    		tmp = t_3
    	elif B <= 9e-273:
    		tmp = t_0 * (180.0 / math.pi)
    	else:
    		tmp = (180.0 * math.atan((t_1 + -1.0))) / math.pi
    	return tmp
    
    function code(A, B, C)
    	t_0 = atan(Float64(Float64(B * 0.5) / A))
    	t_1 = Float64(Float64(C - A) / B)
    	t_2 = atan(Float64(1.0 + t_1))
    	t_3 = Float64(180.0 * Float64(t_2 / pi))
    	tmp = 0.0
    	if (B <= -1.42e+66)
    		tmp = Float64(Float64(180.0 * t_2) / pi);
    	elseif (B <= -7.2e+27)
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
    	elseif (B <= -2.7e-191)
    		tmp = t_3;
    	elseif (B <= -8.8e-222)
    		tmp = Float64(180.0 * Float64(t_0 / pi));
    	elseif (B <= -1.02e-268)
    		tmp = t_3;
    	elseif (B <= 9e-273)
    		tmp = Float64(t_0 * Float64(180.0 / pi));
    	else
    		tmp = Float64(Float64(180.0 * atan(Float64(t_1 + -1.0))) / pi);
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = atan(((B * 0.5) / A));
    	t_1 = (C - A) / B;
    	t_2 = atan((1.0 + t_1));
    	t_3 = 180.0 * (t_2 / pi);
    	tmp = 0.0;
    	if (B <= -1.42e+66)
    		tmp = (180.0 * t_2) / pi;
    	elseif (B <= -7.2e+27)
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	elseif (B <= -2.7e-191)
    		tmp = t_3;
    	elseif (B <= -8.8e-222)
    		tmp = 180.0 * (t_0 / pi);
    	elseif (B <= -1.02e-268)
    		tmp = t_3;
    	elseif (B <= 9e-273)
    		tmp = t_0 * (180.0 / pi);
    	else
    		tmp = (180.0 * atan((t_1 + -1.0))) / pi;
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(180.0 * N[(t$95$2 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.42e+66], N[(N[(180.0 * t$95$2), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -7.2e+27], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.7e-191], t$95$3, If[LessEqual[B, -8.8e-222], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.02e-268], t$95$3, If[LessEqual[B, 9e-273], N[(t$95$0 * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$1 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
    t_1 := \frac{C - A}{B}\\
    t_2 := \tan^{-1} \left(1 + t\_1\right)\\
    t_3 := 180 \cdot \frac{t\_2}{\pi}\\
    \mathbf{if}\;B \leq -1.42 \cdot 10^{+66}:\\
    \;\;\;\;\frac{180 \cdot t\_2}{\pi}\\
    
    \mathbf{elif}\;B \leq -7.2 \cdot 10^{+27}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -2.7 \cdot 10^{-191}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;B \leq -8.8 \cdot 10^{-222}:\\
    \;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
    
    \mathbf{elif}\;B \leq -1.02 \cdot 10^{-268}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;B \leq 9 \cdot 10^{-273}:\\
    \;\;\;\;t\_0 \cdot \frac{180}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_1 + -1\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 6 regimes
    2. if B < -1.4200000000000001e66

      1. Initial program 39.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/39.6%

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

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

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

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

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

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

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

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

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

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

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

      if -1.4200000000000001e66 < B < -7.19999999999999966e27

      1. Initial program 13.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/13.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}} \]
        2. associate-*l/13.7%

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

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

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

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

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

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

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

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

      if -7.19999999999999966e27 < B < -2.69999999999999999e-191 or -8.8000000000000001e-222 < B < -1.0200000000000001e-268

      1. Initial program 65.2%

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

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

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

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

      if -2.69999999999999999e-191 < B < -8.8000000000000001e-222

      1. Initial program 5.7%

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

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

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

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

      if -1.0200000000000001e-268 < B < 8.99999999999999921e-273

      1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

      if 8.99999999999999921e-273 < B

      1. Initial program 53.5%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*r/53.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}} \]
        2. associate-*l/53.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.42 \cdot 10^{+66}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -7.2 \cdot 10^{+27}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.7 \cdot 10^{-191}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -8.8 \cdot 10^{-222}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.02 \cdot 10^{-268}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9 \cdot 10^{-273}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 63.9% accurate, 3.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{C - A}{B}\\ t_1 := \tan^{-1} \left(1 + t\_0\right)\\ t_2 := 180 \cdot \frac{t\_1}{\pi}\\ \mathbf{if}\;B \leq -1.42 \cdot 10^{+66}:\\ \;\;\;\;\frac{180 \cdot t\_1}{\pi}\\ \mathbf{elif}\;B \leq -7.2 \cdot 10^{+27}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -4.6 \cdot 10^{-189}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;B \leq -8.8 \cdot 10^{-222}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\pi}\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-267}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-272}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\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))
            (t_1 (atan (+ 1.0 t_0)))
            (t_2 (* 180.0 (/ t_1 PI))))
       (if (<= B -1.42e+66)
         (/ (* 180.0 t_1) PI)
         (if (<= B -7.2e+27)
           (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
           (if (<= B -4.6e-189)
             t_2
             (if (<= B -8.8e-222)
               (* 180.0 (/ (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- A))) PI))
               (if (<= B -6.2e-267)
                 t_2
                 (if (<= B 2.5e-272)
                   (* (atan (/ (* B 0.5) A)) (/ 180.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 t_1 = atan((1.0 + t_0));
    	double t_2 = 180.0 * (t_1 / ((double) M_PI));
    	double tmp;
    	if (B <= -1.42e+66) {
    		tmp = (180.0 * t_1) / ((double) M_PI);
    	} else if (B <= -7.2e+27) {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	} else if (B <= -4.6e-189) {
    		tmp = t_2;
    	} else if (B <= -8.8e-222) {
    		tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / ((double) M_PI));
    	} else if (B <= -6.2e-267) {
    		tmp = t_2;
    	} else if (B <= 2.5e-272) {
    		tmp = atan(((B * 0.5) / A)) * (180.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 t_1 = Math.atan((1.0 + t_0));
    	double t_2 = 180.0 * (t_1 / Math.PI);
    	double tmp;
    	if (B <= -1.42e+66) {
    		tmp = (180.0 * t_1) / Math.PI;
    	} else if (B <= -7.2e+27) {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	} else if (B <= -4.6e-189) {
    		tmp = t_2;
    	} else if (B <= -8.8e-222) {
    		tmp = 180.0 * (Math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / Math.PI);
    	} else if (B <= -6.2e-267) {
    		tmp = t_2;
    	} else if (B <= 2.5e-272) {
    		tmp = Math.atan(((B * 0.5) / A)) * (180.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
    	t_1 = math.atan((1.0 + t_0))
    	t_2 = 180.0 * (t_1 / math.pi)
    	tmp = 0
    	if B <= -1.42e+66:
    		tmp = (180.0 * t_1) / math.pi
    	elif B <= -7.2e+27:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	elif B <= -4.6e-189:
    		tmp = t_2
    	elif B <= -8.8e-222:
    		tmp = 180.0 * (math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / math.pi)
    	elif B <= -6.2e-267:
    		tmp = t_2
    	elif B <= 2.5e-272:
    		tmp = math.atan(((B * 0.5) / A)) * (180.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)
    	t_1 = atan(Float64(1.0 + t_0))
    	t_2 = Float64(180.0 * Float64(t_1 / pi))
    	tmp = 0.0
    	if (B <= -1.42e+66)
    		tmp = Float64(Float64(180.0 * t_1) / pi);
    	elseif (B <= -7.2e+27)
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
    	elseif (B <= -4.6e-189)
    		tmp = t_2;
    	elseif (B <= -8.8e-222)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-A))) / pi));
    	elseif (B <= -6.2e-267)
    		tmp = t_2;
    	elseif (B <= 2.5e-272)
    		tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) * Float64(180.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;
    	t_1 = atan((1.0 + t_0));
    	t_2 = 180.0 * (t_1 / pi);
    	tmp = 0.0;
    	if (B <= -1.42e+66)
    		tmp = (180.0 * t_1) / pi;
    	elseif (B <= -7.2e+27)
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	elseif (B <= -4.6e-189)
    		tmp = t_2;
    	elseif (B <= -8.8e-222)
    		tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / pi);
    	elseif (B <= -6.2e-267)
    		tmp = t_2;
    	elseif (B <= 2.5e-272)
    		tmp = atan(((B * 0.5) / A)) * (180.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]}, Block[{t$95$1 = N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.42e+66], N[(N[(180.0 * t$95$1), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -7.2e+27], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.6e-189], t$95$2, If[LessEqual[B, -8.8e-222], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.2e-267], t$95$2, If[LessEqual[B, 2.5e-272], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $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}\\
    t_1 := \tan^{-1} \left(1 + t\_0\right)\\
    t_2 := 180 \cdot \frac{t\_1}{\pi}\\
    \mathbf{if}\;B \leq -1.42 \cdot 10^{+66}:\\
    \;\;\;\;\frac{180 \cdot t\_1}{\pi}\\
    
    \mathbf{elif}\;B \leq -7.2 \cdot 10^{+27}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -4.6 \cdot 10^{-189}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;B \leq -8.8 \cdot 10^{-222}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -6.2 \cdot 10^{-267}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;B \leq 2.5 \cdot 10^{-272}:\\
    \;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 6 regimes
    2. if B < -1.4200000000000001e66

      1. Initial program 39.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/39.6%

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

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

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

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

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

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

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

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

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

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

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

      if -1.4200000000000001e66 < B < -7.19999999999999966e27

      1. Initial program 13.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/13.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}} \]
        2. associate-*l/13.7%

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

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

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

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

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

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

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

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

      if -7.19999999999999966e27 < B < -4.5999999999999996e-189 or -8.8000000000000001e-222 < B < -6.2000000000000002e-267

      1. Initial program 64.5%

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

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

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

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

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

      if -4.5999999999999996e-189 < B < -8.8000000000000001e-222

      1. Initial program 17.5%

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

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

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

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

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

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

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

      if -6.2000000000000002e-267 < B < 2.49999999999999991e-272

      1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

      if 2.49999999999999991e-272 < B

      1. Initial program 53.5%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*r/53.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}} \]
        2. associate-*l/53.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.42 \cdot 10^{+66}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -7.2 \cdot 10^{+27}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -4.6 \cdot 10^{-189}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -8.8 \cdot 10^{-222}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\pi}\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-267}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-272}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 14: 55.9% accurate, 3.2× speedup?

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

      1. Initial program 74.6%

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

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

      if -1.12000000000000007e32 < C < -9.49999999999999979e-206 or -7.00000000000000013e-282 < C < 4.10000000000000005e-5

      1. Initial program 58.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 51.9%

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

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

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

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

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

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

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

      if -9.49999999999999979e-206 < C < -7.00000000000000013e-282

      1. Initial program 18.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 46.1%

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

      if 4.10000000000000005e-5 < C

      1. Initial program 20.3%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 15: 55.8% accurate, 3.2× speedup?

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

      1. Initial program 73.6%

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

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

      if -2.5e19 < C < 3.4999999999999998e-140 or 3.3000000000000002e-67 < C < 2.4000000000000001e-5

      1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.4999999999999998e-140 < C < 3.3000000000000002e-67

      1. Initial program 38.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 49.1%

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

      if 2.4000000000000001e-5 < C

      1. Initial program 20.3%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 16: 57.9% accurate, 3.2× speedup?

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

      1. Initial program 67.4%

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

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

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

      if -4.8000000000000002e-148 < C < 1.64999999999999994e-140 or 6.3999999999999998e-65 < C < 3.19999999999999986e-5

      1. Initial program 56.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.64999999999999994e-140 < C < 6.3999999999999998e-65

      1. Initial program 38.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 49.1%

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

      if 3.19999999999999986e-5 < C

      1. Initial program 20.3%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 17: 58.0% accurate, 3.2× speedup?

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

      1. Initial program 67.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/67.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}} \]
        2. associate-*l/67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.5000000000000001e-147 < C < 3.54999999999999993e-140 or 3.79999999999999988e-67 < C < 3.4999999999999997e-5

      1. Initial program 56.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.54999999999999993e-140 < C < 3.79999999999999988e-67

      1. Initial program 38.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 49.1%

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

      if 3.4999999999999997e-5 < C

      1. Initial program 20.3%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 18: 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 -1.45 \cdot 10^{-58}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-258}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.9 \cdot 10^{-81}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{-13}:\\ \;\;\;\;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 -1.45e-58)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B 6e-258)
           t_0
           (if (<= B 1.9e-81)
             (/ (* 180.0 (atan 0.0)) PI)
             (if (<= B 1.85e-13) 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 <= -1.45e-58) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= 6e-258) {
    		tmp = t_0;
    	} else if (B <= 1.9e-81) {
    		tmp = (180.0 * atan(0.0)) / ((double) M_PI);
    	} else if (B <= 1.85e-13) {
    		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 <= -1.45e-58) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= 6e-258) {
    		tmp = t_0;
    	} else if (B <= 1.9e-81) {
    		tmp = (180.0 * Math.atan(0.0)) / Math.PI;
    	} else if (B <= 1.85e-13) {
    		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 <= -1.45e-58:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= 6e-258:
    		tmp = t_0
    	elif B <= 1.9e-81:
    		tmp = (180.0 * math.atan(0.0)) / math.pi
    	elif B <= 1.85e-13:
    		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 <= -1.45e-58)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= 6e-258)
    		tmp = t_0;
    	elseif (B <= 1.9e-81)
    		tmp = Float64(Float64(180.0 * atan(0.0)) / pi);
    	elseif (B <= 1.85e-13)
    		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 <= -1.45e-58)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= 6e-258)
    		tmp = t_0;
    	elseif (B <= 1.9e-81)
    		tmp = (180.0 * atan(0.0)) / pi;
    	elseif (B <= 1.85e-13)
    		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, -1.45e-58], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6e-258], t$95$0, If[LessEqual[B, 1.9e-81], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.85e-13], 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 -1.45 \cdot 10^{-58}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq 6 \cdot 10^{-258}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.9 \cdot 10^{-81}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
    
    \mathbf{elif}\;B \leq 1.85 \cdot 10^{-13}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if B < -1.44999999999999995e-58

      1. Initial program 40.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 57.7%

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

      if -1.44999999999999995e-58 < B < 6.00000000000000042e-258 or 1.8999999999999999e-81 < B < 1.84999999999999994e-13

      1. Initial program 62.5%

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

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

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

      if 6.00000000000000042e-258 < B < 1.8999999999999999e-81

      1. Initial program 50.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{0}}{\pi} \]
      9. Simplified29.5%

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

      if 1.84999999999999994e-13 < B

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.45 \cdot 10^{-58}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-258}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.9 \cdot 10^{-81}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{-13}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 19: 48.2% accurate, 3.4× speedup?

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

      1. Initial program 40.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 57.7%

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

      if -1e-59 < B < 1.1599999999999999e-263

      1. Initial program 59.9%

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

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

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

      if 1.1599999999999999e-263 < B < 3.80000000000000008e-32

      1. Initial program 52.3%

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

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

      if 3.80000000000000008e-32 < B

      1. Initial program 51.5%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1 \cdot 10^{-59}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.16 \cdot 10^{-263}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 20: 59.5% accurate, 3.4× speedup?

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

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

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

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

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

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

      if 2e-140 < C < 3.3000000000000002e-67

      1. Initial program 38.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 49.1%

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

      if 3.3000000000000002e-67 < C < 2.59999999999999984e-5

      1. Initial program 45.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.59999999999999984e-5 < C

      1. Initial program 20.3%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 21: 48.2% accurate, 3.4× speedup?

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

      1. Initial program 40.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 57.7%

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

      if -2.1999999999999999e-60 < B < 2.19999999999999994e-264

      1. Initial program 59.9%

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

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

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

      if 2.19999999999999994e-264 < B < 2.00000000000000011e-32

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

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

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

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

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

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

      if 2.00000000000000011e-32 < B

      1. Initial program 51.5%

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

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

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

    Alternative 22: 45.7% accurate, 3.6× speedup?

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

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

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

      if -7.19999999999999999e-101 < B < 7.99999999999999947e-88

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{0}}{\pi} \]
      9. Simplified31.8%

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

      if 7.99999999999999947e-88 < B

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

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

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

    Alternative 23: 40.7% accurate, 3.8× speedup?

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

      1. Initial program 48.2%

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

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

      if -2.2999999999999999e-308 < B

      1. Initial program 52.3%

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

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

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

    Alternative 24: 21.4% 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 50.2%

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

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

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

    Reproduce

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