ABCF->ab-angle angle

Percentage Accurate: 53.5% → 80.9%
Time: 17.9s
Alternatives: 21
Speedup: 3.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 80.9% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 66.0%

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

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

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

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

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

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

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

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

    if 1.0000000000000001e69 < C

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

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

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

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

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

      \[\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} \]
    8. Step-by-step derivation
      1. metadata-eval76.1%

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

        \[\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} \]
      3. distribute-rgt1-in76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.9% accurate, 1.9× speedup?

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

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

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

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


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

    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}} \]
    4. Applied egg-rr56.9%

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

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

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

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

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

    if -2.5999999999999999e92 < A < 7.0000000000000001e-67

    1. Initial program 51.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/51.4%

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

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

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

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

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

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

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

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

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

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

    if 7.0000000000000001e-67 < A

    1. Initial program 81.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 0 81.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. Simplified96.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 81.5%

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

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

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

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

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

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

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

Alternative 3: 78.0% accurate, 1.9× speedup?

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

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

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

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


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

    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}} \]
    4. Applied egg-rr56.9%

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

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

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

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

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

    if -2.6999999999999999e92 < A < 4.99999999999999971e-68

    1. Initial program 51.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/51.4%

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

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

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

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

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

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

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

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

    if 4.99999999999999971e-68 < A

    1. Initial program 81.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 0 81.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. Simplified96.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 81.5%

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

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

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

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

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

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

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

Alternative 4: 78.0% accurate, 1.9× speedup?

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

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

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

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


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

    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}} \]
    4. Applied egg-rr56.9%

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

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

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

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

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

    if -3.1000000000000002e92 < A < 7.7999999999999997e-67

    1. Initial program 51.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/51.4%

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

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

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

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

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

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

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

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

    if 7.7999999999999997e-67 < A

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 78.0% accurate, 1.9× speedup?

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

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

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

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


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

    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}} \]
    4. Applied egg-rr56.9%

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

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

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

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

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

    if -2.6999999999999999e92 < A < 5.1999999999999996e-68

    1. Initial program 51.4%

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

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

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

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

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

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

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

    if 5.1999999999999996e-68 < A

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 75.3% accurate, 1.9× speedup?

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

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

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

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


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

    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}} \]
    4. Applied egg-rr56.9%

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

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

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

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

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

    if -3.00000000000000013e92 < A < 6.6000000000000002e-22

    1. Initial program 51.4%

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

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

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

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

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

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

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

    if 6.6000000000000002e-22 < A

    1. Initial program 85.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/85.4%

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

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

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

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

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

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

Alternative 7: 80.9% accurate, 1.9× speedup?

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

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


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

    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}} \]
    4. Applied egg-rr56.9%

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

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

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

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

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

    if -2.6999999999999999e92 < A

    1. Initial program 63.8%

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

        \[\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. Add Preprocessing

    Alternative 8: 61.1% accurate, 3.4× speedup?

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

      1. Initial program 70.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/70.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}} \]
      4. Applied egg-rr90.5%

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

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

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

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

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

      if -1.05000000000000005e-174 < C < 5.3000000000000003e-219

      1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.3000000000000003e-219 < C < 2.9000000000000001e-78

      1. Initial program 73.1%

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

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

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

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

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

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

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

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

      if 2.9000000000000001e-78 < C

      1. Initial program 24.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/24.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}} \]
      4. Applied egg-rr57.4%

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

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

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

        \[\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} \]
      8. Step-by-step derivation
        1. metadata-eval64.3%

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

          \[\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} \]
        3. distribute-rgt1-in64.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 61.0% accurate, 3.4× speedup?

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

      1. Initial program 70.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 68.8%

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

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

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

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

      if -1.87999999999999999e-174 < C < 6.39999999999999995e-219

      1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.39999999999999995e-219 < C < 2.5999999999999999e-81

      1. Initial program 73.1%

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

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

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

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

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

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

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

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

      if 2.5999999999999999e-81 < C

      1. Initial program 24.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/24.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}} \]
      4. Applied egg-rr57.4%

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

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

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

        \[\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} \]
      8. Step-by-step derivation
        1. metadata-eval64.3%

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

          \[\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} \]
        3. distribute-rgt1-in64.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 10: 59.2% accurate, 3.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

      if -5.50000000000000054e-175 < C < 1.2e-218

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.2e-218 < C < 3.10000000000000016e-80

      1. Initial program 73.1%

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

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

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

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

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

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

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

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

      if 3.10000000000000016e-80 < C

      1. Initial program 24.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/24.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}} \]
      4. Applied egg-rr57.4%

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

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

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

        \[\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} \]
      8. Step-by-step derivation
        1. metadata-eval64.3%

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

          \[\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} \]
        3. distribute-rgt1-in64.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 11: 59.2% accurate, 3.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

      if -5.2e-175 < C < 8.0000000000000003e-219

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 8.0000000000000003e-219 < C < 2.9000000000000001e-78

      1. Initial program 73.1%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-\left(A + \mathsf{hypot}\left(A, B\right)\right)}{B}\right)}}{\pi} \]
      6. Taylor expanded in B around -inf 76.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-neg76.4%

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

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

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

      if 2.9000000000000001e-78 < C

      1. Initial program 24.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/24.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}} \]
      4. Applied egg-rr57.4%

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

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

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

        \[\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} \]
      8. Step-by-step derivation
        1. metadata-eval64.3%

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

          \[\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} \]
        3. distribute-rgt1-in64.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 56.7% accurate, 3.4× speedup?

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

      1. Initial program 76.7%

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

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

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

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

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

      if -2.1500000000000001e67 < C < 9.79999999999999981e-219

      1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 9.79999999999999981e-219 < C < 2.0499999999999999e-78

      1. Initial program 73.1%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-\left(A + \mathsf{hypot}\left(A, B\right)\right)}{B}\right)}}{\pi} \]
      6. Taylor expanded in B around -inf 76.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-neg76.4%

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

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

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

      if 2.0499999999999999e-78 < C

      1. Initial program 24.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/24.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}} \]
      4. Applied egg-rr57.4%

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

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

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

        \[\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} \]
      8. Step-by-step derivation
        1. metadata-eval64.3%

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

          \[\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} \]
        3. distribute-rgt1-in64.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 56.7% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;C \leq -1.26 \cdot 10^{+67}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.9 \cdot 10^{-219}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 3 \cdot 10^{-80}:\\ \;\;\;\;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 -1.26e+67)
       (* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
       (if (<= C 4.9e-219)
         (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
         (if (<= C 3e-80)
           (* 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 <= -1.26e+67) {
    		tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
    	} else if (C <= 4.9e-219) {
    		tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
    	} else if (C <= 3e-80) {
    		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 <= -1.26e+67) {
    		tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
    	} else if (C <= 4.9e-219) {
    		tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
    	} else if (C <= 3e-80) {
    		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 <= -1.26e+67:
    		tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi)
    	elif C <= 4.9e-219:
    		tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi)
    	elif C <= 3e-80:
    		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 <= -1.26e+67)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi));
    	elseif (C <= 4.9e-219)
    		tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi));
    	elseif (C <= 3e-80)
    		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 <= -1.26e+67)
    		tmp = 180.0 * (atan(((C * 2.0) / B)) / pi);
    	elseif (C <= 4.9e-219)
    		tmp = 180.0 * (atan((-1.0 - (A / B))) / pi);
    	elseif (C <= 3e-80)
    		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, -1.26e+67], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.9e-219], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3e-80], 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 -1.26 \cdot 10^{+67}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq 4.9 \cdot 10^{-219}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq 3 \cdot 10^{-80}:\\
    \;\;\;\;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 < -1.26e67

      1. Initial program 76.7%

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

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

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

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

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

      if -1.26e67 < C < 4.8999999999999999e-219

      1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.8999999999999999e-219 < C < 3.00000000000000007e-80

      1. Initial program 73.1%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-\left(A + \mathsf{hypot}\left(A, B\right)\right)}{B}\right)}}{\pi} \]
      6. Taylor expanded in B around -inf 76.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-neg76.4%

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

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

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

      if 3.00000000000000007e-80 < C

      1. Initial program 24.8%

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

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

        \[\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. Add Preprocessing

    Alternative 14: 56.5% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;C \leq -1.5 \cdot 10^{+68}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.2 \cdot 10^{-218}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.85 \cdot 10^{-78}:\\ \;\;\;\;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 -1.5e+68)
       (/ (* 180.0 (atan (/ C B))) PI)
       (if (<= C 1.2e-218)
         (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
         (if (<= C 1.85e-78)
           (* 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 <= -1.5e+68) {
    		tmp = (180.0 * atan((C / B))) / ((double) M_PI);
    	} else if (C <= 1.2e-218) {
    		tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
    	} else if (C <= 1.85e-78) {
    		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 <= -1.5e+68) {
    		tmp = (180.0 * Math.atan((C / B))) / Math.PI;
    	} else if (C <= 1.2e-218) {
    		tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
    	} else if (C <= 1.85e-78) {
    		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 <= -1.5e+68:
    		tmp = (180.0 * math.atan((C / B))) / math.pi
    	elif C <= 1.2e-218:
    		tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi)
    	elif C <= 1.85e-78:
    		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 <= -1.5e+68)
    		tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi);
    	elseif (C <= 1.2e-218)
    		tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi));
    	elseif (C <= 1.85e-78)
    		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 <= -1.5e+68)
    		tmp = (180.0 * atan((C / B))) / pi;
    	elseif (C <= 1.2e-218)
    		tmp = 180.0 * (atan((-1.0 - (A / B))) / pi);
    	elseif (C <= 1.85e-78)
    		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, -1.5e+68], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 1.2e-218], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.85e-78], 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 -1.5 \cdot 10^{+68}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq 1.2 \cdot 10^{-218}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq 1.85 \cdot 10^{-78}:\\
    \;\;\;\;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 < -1.5000000000000001e68

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

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

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

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

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

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

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

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

      if -1.5000000000000001e68 < C < 1.2e-218

      1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.2e-218 < C < 1.85000000000000003e-78

      1. Initial program 73.1%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-\left(A + \mathsf{hypot}\left(A, B\right)\right)}{B}\right)}}{\pi} \]
      6. Taylor expanded in B around -inf 76.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-neg76.4%

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

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

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

      if 1.85000000000000003e-78 < C

      1. Initial program 24.8%

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

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

        \[\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. Add Preprocessing

    Alternative 15: 46.3% accurate, 3.4× speedup?

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

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

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

      if -3.3e-102 < B < -1.06000000000000004e-220

      1. Initial program 33.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/33.6%

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\left(\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)\right) \cdot \frac{1}{B}\right)}}{\pi} \]
      7. 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}\right)}}{\pi} \]
      8. Step-by-step derivation
        1. distribute-rgt1-in44.2%

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

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

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

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

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

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

      if -1.06000000000000004e-220 < B < 1.32000000000000012e24

      1. Initial program 68.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/68.5%

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

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

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

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

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

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

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

      if 1.32000000000000012e24 < B

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

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

    Alternative 16: 56.4% accurate, 3.5× speedup?

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

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

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

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

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

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

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

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

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

      if -1.3999999999999999e67 < C < 3.40000000000000014e62

      1. Initial program 62.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.40000000000000014e62 < C

      1. Initial program 20.1%

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

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

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

    Alternative 17: 47.9% accurate, 3.5× speedup?

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

      1. Initial program 70.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/70.5%

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

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

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

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

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

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

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

      if -8.0000000000000002e-127 < C < 9.99999999999999961e-81

      1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

      if 9.99999999999999961e-81 < C

      1. Initial program 24.8%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -8 \cdot 10^{-127}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 10^{-80}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\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.7% accurate, 3.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -8.2 \cdot 10^{+29}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{+58}:\\ \;\;\;\;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 -8.2e+29)
       (* 180.0 (/ (atan 1.0) PI))
       (if (<= B 2.4e+58)
         (* 180.0 (/ (atan (/ A (- B))) PI))
         (* 180.0 (/ (atan -1.0) PI)))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (B <= -8.2e+29) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= 2.4e+58) {
    		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 <= -8.2e+29) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= 2.4e+58) {
    		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 <= -8.2e+29:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= 2.4e+58:
    		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 <= -8.2e+29)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= 2.4e+58)
    		tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-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 <= -8.2e+29)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= 2.4e+58)
    		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, -8.2e+29], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e+58], 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 -8.2 \cdot 10^{+29}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq 2.4 \cdot 10^{+58}:\\
    \;\;\;\;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 3 regimes
    2. if B < -8.2000000000000007e29

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

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

      if -8.2000000000000007e29 < B < 2.4e58

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.4e58 < B

      1. Initial program 43.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 3 regimes into one program.
    4. Final simplification50.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8.2 \cdot 10^{+29}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{+58}:\\ \;\;\;\;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 19: 45.2% accurate, 3.6× speedup?

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

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

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

      if -8.5999999999999995e-101 < B < 9.00000000000000016e-138

      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. Step-by-step derivation
        1. associate-*r/58.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}} \]
      4. Applied egg-rr83.9%

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

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

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

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

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

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

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

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

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

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

      if 9.00000000000000016e-138 < B

      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 B around inf 46.0%

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

    Alternative 20: 40.0% accurate, 3.8× speedup?

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

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

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

      if -4.999999999999985e-310 < B

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

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

    Alternative 21: 20.9% accurate, 4.0× speedup?

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

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

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

    Reproduce

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