ABCF->ab-angle angle

Percentage Accurate: 55.5% → 82.1%
Time: 17.0s
Alternatives: 20
Speedup: 3.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

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

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

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

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


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

    1. Initial program 16.2%

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

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

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

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
      4. *-lowering-*.f64N/A

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

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

      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      2. *-commutativeN/A

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

        \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      4. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{C - A}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      5. distribute-neg-fracN/A

        \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      6. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2} \cdot 1}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      7. associate-*r/N/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \frac{1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      9. associate-*r/N/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{1}{2} \cdot 1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      10. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2}}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      11. distribute-neg-frac2N/A

        \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C - A\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      12. sub-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(C + \left(\mathsf{neg}\left(A\right)\right)\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      13. +-commutativeN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(A\right)\right) + C\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      14. distribute-neg-inN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(A\right)\right)\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      15. mul-1-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{-1 \cdot \left(\mathsf{neg}\left(A\right)\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{-1 \cdot \color{blue}{\left(-1 \cdot A\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      17. associate-*r*N/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(-1 \cdot -1\right) \cdot A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      18. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{1} \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      19. *-lft-identityN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      20. sub-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      21. /-lowering-/.f64N/A

        \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      22. --lowering--.f6484.1

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

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

    if -1.15000000000000004e103 < A

    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. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
      4. *-lowering-*.f64N/A

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

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

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

Alternative 2: 76.8% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 17.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. *-commutativeN/A

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

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

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
      4. *-lowering-*.f64N/A

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

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

      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      2. *-commutativeN/A

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

        \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      4. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{C - A}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      5. distribute-neg-fracN/A

        \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      6. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2} \cdot 1}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      7. associate-*r/N/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \frac{1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      9. associate-*r/N/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{1}{2} \cdot 1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      10. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2}}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      11. distribute-neg-frac2N/A

        \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C - A\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      12. sub-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(C + \left(\mathsf{neg}\left(A\right)\right)\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      13. +-commutativeN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(A\right)\right) + C\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      14. distribute-neg-inN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(A\right)\right)\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      15. mul-1-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{-1 \cdot \left(\mathsf{neg}\left(A\right)\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{-1 \cdot \color{blue}{\left(-1 \cdot A\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      17. associate-*r*N/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(-1 \cdot -1\right) \cdot A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      18. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{1} \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      19. *-lft-identityN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      20. sub-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      21. /-lowering-/.f64N/A

        \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      22. --lowering--.f6481.8

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

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

    if -3.10000000000000019e93 < A < 3.8e8

    1. Initial program 60.2%

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

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

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

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
      4. *-lowering-*.f64N/A

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

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

      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      2. --lowering--.f64N/A

        \[\leadsto \tan^{-1} \left(\frac{\color{blue}{C - \sqrt{{B}^{2} + {C}^{2}}}}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      3. unpow2N/A

        \[\leadsto \tan^{-1} \left(\frac{C - \sqrt{\color{blue}{B \cdot B} + {C}^{2}}}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      4. unpow2N/A

        \[\leadsto \tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      5. accelerator-lowering-hypot.f6475.8

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

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

    if 3.8e8 < A

    1. Initial program 80.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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \left(\frac{C}{B} - \frac{A}{B}\right)\right)}}{\mathsf{PI}\left(\right)} \]
      2. div-subN/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      3. +-lowering-+.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \frac{C - A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
      4. /-lowering-/.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. --lowering--.f6485.4

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

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

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

Alternative 3: 76.7% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 16.2%

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

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

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

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
      4. *-lowering-*.f64N/A

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

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

      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      2. *-commutativeN/A

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

        \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      4. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{C - A}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      5. distribute-neg-fracN/A

        \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      6. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2} \cdot 1}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      7. associate-*r/N/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \frac{1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      9. associate-*r/N/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{1}{2} \cdot 1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      10. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2}}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      11. distribute-neg-frac2N/A

        \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C - A\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      12. sub-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(C + \left(\mathsf{neg}\left(A\right)\right)\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      13. +-commutativeN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(A\right)\right) + C\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      14. distribute-neg-inN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(A\right)\right)\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      15. mul-1-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{-1 \cdot \left(\mathsf{neg}\left(A\right)\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{-1 \cdot \color{blue}{\left(-1 \cdot A\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      17. associate-*r*N/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(-1 \cdot -1\right) \cdot A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      18. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{1} \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      19. *-lft-identityN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      20. sub-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      21. /-lowering-/.f64N/A

        \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      22. --lowering--.f6484.1

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

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

    if -1.49999999999999984e104 < A

    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. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
      4. *-lowering-*.f64N/A

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

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

      \[\leadsto \tan^{-1} \left(\frac{C - \color{blue}{\left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \tan^{-1} \left(\frac{C - \color{blue}{\left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      2. +-commutativeN/A

        \[\leadsto \tan^{-1} \left(\frac{C - \left(A + \sqrt{\color{blue}{{B}^{2} + {A}^{2}}}\right)}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      3. unpow2N/A

        \[\leadsto \tan^{-1} \left(\frac{C - \left(A + \sqrt{\color{blue}{B \cdot B} + {A}^{2}}\right)}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      4. unpow2N/A

        \[\leadsto \tan^{-1} \left(\frac{C - \left(A + \sqrt{B \cdot B + \color{blue}{A \cdot A}}\right)}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      5. accelerator-lowering-hypot.f6479.8

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

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

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

Alternative 4: 68.2% accurate, 3.1× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{A - C}{B}\\
\mathbf{if}\;B \leq 9.8 \cdot 10^{-224}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < 9.7999999999999992e-224

    1. Initial program 63.0%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \left(\frac{C}{B} - \frac{A}{B}\right)\right)}}{\mathsf{PI}\left(\right)} \]
      2. div-subN/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      3. +-lowering-+.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \frac{C - A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
      4. /-lowering-/.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. --lowering--.f6473.1

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

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

    if 9.7999999999999992e-224 < B < 4.29999999999999998e-175

    1. Initial program 31.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. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
      4. *-lowering-*.f64N/A

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

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

      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      2. *-commutativeN/A

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

        \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      4. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{C - A}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      5. distribute-neg-fracN/A

        \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      6. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2} \cdot 1}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      7. associate-*r/N/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \frac{1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      9. associate-*r/N/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{1}{2} \cdot 1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      10. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2}}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      11. distribute-neg-frac2N/A

        \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C - A\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      12. sub-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(C + \left(\mathsf{neg}\left(A\right)\right)\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      13. +-commutativeN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(A\right)\right) + C\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      14. distribute-neg-inN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(A\right)\right)\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      15. mul-1-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{-1 \cdot \left(\mathsf{neg}\left(A\right)\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{-1 \cdot \color{blue}{\left(-1 \cdot A\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      17. associate-*r*N/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(-1 \cdot -1\right) \cdot A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      18. metadata-evalN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{1} \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      19. *-lft-identityN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      20. sub-negN/A

        \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      21. /-lowering-/.f64N/A

        \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      22. --lowering--.f6478.8

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

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

    if 4.29999999999999998e-175 < B

    1. Initial program 51.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. clear-numN/A

        \[\leadsto 180 \cdot \color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}} \]
      2. un-div-invN/A

        \[\leadsto \color{blue}{\frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \frac{180}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}} \]
      5. PI-lowering-PI.f64N/A

        \[\leadsto \frac{180}{\frac{\color{blue}{\mathsf{PI}\left(\right)}}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}} \]
      6. atan-lowering-atan.f64N/A

        \[\leadsto \frac{180}{\frac{\mathsf{PI}\left(\right)}{\color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}} \]
      7. *-commutativeN/A

        \[\leadsto \frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \color{blue}{\left(\left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \cdot \frac{1}{B}\right)}}} \]
      8. un-div-invN/A

        \[\leadsto \frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \color{blue}{\left(\frac{\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}{B}\right)}}} \]
      9. /-lowering-/.f64N/A

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

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

      \[\leadsto \frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \color{blue}{\left(\left(\frac{-1}{2} \cdot \frac{{\left(A - C\right)}^{2}}{{B}^{2}} + \frac{C}{B}\right) - \left(1 + \frac{A}{B}\right)\right)}}} \]
    6. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{{\left(A - C\right)}^{2}}{{B}^{2}} + \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\right)}}} \]
      2. +-lowering-+.f64N/A

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

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

Alternative 5: 47.0% accurate, 3.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.65 \cdot 10^{+49}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\

\mathbf{elif}\;B \leq -6.5 \cdot 10^{-199}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\

\mathbf{elif}\;B \leq 1.45 \cdot 10^{-307}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if B < -1.6499999999999999e49

    1. Initial program 54.4%

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

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

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

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
      4. *-lowering-*.f64N/A

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

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

      \[\leadsto \tan^{-1} \color{blue}{1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
    6. Step-by-step derivation
      1. Simplified74.9%

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

      if -1.6499999999999999e49 < B < -6.50000000000000017e-199

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-2 \cdot A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
        2. /-lowering-/.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-2 \cdot A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
        3. *-lowering-*.f6444.1

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

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

      if -6.50000000000000017e-199 < B < 1.45e-307

      1. Initial program 49.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/N/A

          \[\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)}{\mathsf{PI}\left(\right)}} \]
        2. /-lowering-/.f64N/A

          \[\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)}{\mathsf{PI}\left(\right)}} \]
      4. Applied egg-rr49.5%

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C - \color{blue}{\left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right)}}{B}\right)}{\mathsf{PI}\left(\right)} \]
        2. associate--r+N/A

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) - A}}{B}\right)}{\mathsf{PI}\left(\right)} \]
        3. div-subN/A

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B} - \frac{A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
        4. --lowering--.f64N/A

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B} - \frac{A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(\color{blue}{\frac{C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B}} - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \]
        6. --lowering--.f64N/A

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}}{B} - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \]
        7. accelerator-lowering-hypot.f64N/A

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C - \color{blue}{\mathsf{hypot}\left(B, A - C\right)}}{B} - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \]
        8. --lowering--.f64N/A

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, \color{blue}{A - C}\right)}{B} - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \]
        9. /-lowering-/.f6435.0

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(-1 \cdot \left(-1 \cdot \frac{A}{B} + \frac{A}{B}\right)\right)}}{\mathsf{PI}\left(\right)} \]
      8. Step-by-step derivation
        1. distribute-lft1-inN/A

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(-1 \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot \frac{A}{B}\right)}\right)}{\mathsf{PI}\left(\right)} \]
        2. metadata-evalN/A

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(-1 \cdot \left(\color{blue}{0} \cdot \frac{A}{B}\right)\right)}{\mathsf{PI}\left(\right)} \]
        3. mul0-lftN/A

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(-1 \cdot \color{blue}{0}\right)}{\mathsf{PI}\left(\right)} \]
        4. metadata-eval49.9

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

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

      if 1.45e-307 < B < 6.9999999999999995e-51

      1. Initial program 61.8%

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

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

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

          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
        4. *-lowering-*.f64N/A

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

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

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

          \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
        2. associate--r+N/A

          \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
        3. div-subN/A

          \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
        4. sub-negN/A

          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
        5. metadata-evalN/A

          \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
        6. +-lowering-+.f64N/A

          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
        7. /-lowering-/.f64N/A

          \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
        8. --lowering--.f6458.7

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

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

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      9. Step-by-step derivation
        1. /-lowering-/.f6443.5

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

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

      if 6.9999999999999995e-51 < B

      1. Initial program 48.4%

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

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

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

          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
        4. *-lowering-*.f64N/A

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

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

        \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
      6. Step-by-step derivation
        1. Simplified53.4%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.65 \cdot 10^{+49}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -6.5 \cdot 10^{-199}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.45 \cdot 10^{-307}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-51}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
      9. Add Preprocessing

      Alternative 6: 45.8% accurate, 3.4× speedup?

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

        1. Initial program 54.4%

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

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

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

            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
          4. *-lowering-*.f64N/A

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

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

          \[\leadsto \tan^{-1} \color{blue}{1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
        6. Step-by-step derivation
          1. Simplified74.9%

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

          if -1.5000000000000001e49 < B < -3.89999999999999994e-148

          1. Initial program 75.2%

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-2 \cdot A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
            2. /-lowering-/.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-2 \cdot A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
            3. *-lowering-*.f6444.8

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

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

          if -3.89999999999999994e-148 < B < 4.19999999999999955e-53

          1. Initial program 57.3%

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

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

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

              \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
            4. *-lowering-*.f64N/A

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

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

            \[\leadsto \tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
          6. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
            3. *-lowering-*.f6447.6

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

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

              \[\leadsto \tan^{-1} \left(\frac{\color{blue}{B \cdot \frac{1}{2}}}{A}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
            2. associate-/l*N/A

              \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{\frac{1}{2}}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{\frac{1}{2}}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
            4. /-lowering-/.f6447.7

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

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

          if 4.19999999999999955e-53 < B

          1. Initial program 49.1%

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

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

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

              \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
            4. *-lowering-*.f64N/A

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

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

            \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
          6. Step-by-step derivation
            1. Simplified52.9%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.5 \cdot 10^{+49}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -3.9 \cdot 10^{-148}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
          9. Add Preprocessing

          Alternative 7: 45.8% accurate, 3.4× speedup?

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

            1. Initial program 54.4%

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

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

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

                \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
              4. *-lowering-*.f64N/A

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

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

              \[\leadsto \tan^{-1} \color{blue}{1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
            6. Step-by-step derivation
              1. Simplified74.9%

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

              if -1.8999999999999999e49 < B < -1.30000000000000004e-148

              1. Initial program 75.2%

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-2 \cdot A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-2 \cdot A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
                3. *-lowering-*.f6444.8

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

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

              if -1.30000000000000004e-148 < B < 8.5e-54

              1. Initial program 57.3%

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)}}{\mathsf{PI}\left(\right)} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)}}{\mathsf{PI}\left(\right)} \]
                3. *-lowering-*.f6447.6

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

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

              if 8.5e-54 < B

              1. Initial program 49.1%

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

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

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

                  \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                4. *-lowering-*.f64N/A

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

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

                \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
              6. Step-by-step derivation
                1. Simplified52.9%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.9 \cdot 10^{+49}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -1.3 \cdot 10^{-148}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-54}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
              9. Add Preprocessing

              Alternative 8: 67.5% accurate, 3.5× speedup?

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

                1. Initial program 62.5%

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \left(\frac{C}{B} - \frac{A}{B}\right)\right)}}{\mathsf{PI}\left(\right)} \]
                  2. div-subN/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
                  3. +-lowering-+.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \frac{C - A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
                  4. /-lowering-/.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
                  5. --lowering--.f6477.0

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

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

                if -1.69999999999999996e-224 < B < 1.00000000000000003e-306

                1. Initial program 38.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. Step-by-step derivation
                  1. *-commutativeN/A

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

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

                    \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                  4. *-lowering-*.f64N/A

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

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

                  \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                6. Step-by-step derivation
                  1. associate-*r/N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  2. *-commutativeN/A

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

                    \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  4. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{C - A}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  5. distribute-neg-fracN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  6. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2} \cdot 1}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  7. associate-*r/N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \frac{1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  9. associate-*r/N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{1}{2} \cdot 1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  10. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2}}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  11. distribute-neg-frac2N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C - A\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  12. sub-negN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(C + \left(\mathsf{neg}\left(A\right)\right)\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  13. +-commutativeN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(A\right)\right) + C\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  14. distribute-neg-inN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(A\right)\right)\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  15. mul-1-negN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{-1 \cdot \left(\mathsf{neg}\left(A\right)\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  16. mul-1-negN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{-1 \cdot \color{blue}{\left(-1 \cdot A\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  17. associate-*r*N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(-1 \cdot -1\right) \cdot A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  18. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{1} \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  19. *-lft-identityN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  20. sub-negN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  21. /-lowering-/.f64N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  22. --lowering--.f6479.2

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

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

                if 1.00000000000000003e-306 < B

                1. Initial program 54.0%

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

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

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

                    \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                  4. *-lowering-*.f64N/A

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

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

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

                    \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  2. associate--r+N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  3. div-subN/A

                    \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  4. sub-negN/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  5. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  6. +-lowering-+.f64N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  7. /-lowering-/.f64N/A

                    \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  8. --lowering--.f6464.4

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

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

                  \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\left(-1 \cdot \frac{A}{B} + \frac{C}{B}\right) - 1\right)}{\mathsf{PI}\left(\right)}} \]
                9. Step-by-step derivation
                  1. associate-*r/N/A

                    \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(-1 \cdot \frac{A}{B} + \frac{C}{B}\right) - 1\right)}{\mathsf{PI}\left(\right)}} \]
                  2. /-lowering-/.f64N/A

                    \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(-1 \cdot \frac{A}{B} + \frac{C}{B}\right) - 1\right)}{\mathsf{PI}\left(\right)}} \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \frac{\color{blue}{180 \cdot \tan^{-1} \left(\left(-1 \cdot \frac{A}{B} + \frac{C}{B}\right) - 1\right)}}{\mathsf{PI}\left(\right)} \]
                  4. atan-lowering-atan.f64N/A

                    \[\leadsto \frac{180 \cdot \color{blue}{\tan^{-1} \left(\left(-1 \cdot \frac{A}{B} + \frac{C}{B}\right) - 1\right)}}{\mathsf{PI}\left(\right)} \]
                  5. sub-negN/A

                    \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\left(-1 \cdot \frac{A}{B} + \frac{C}{B}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)}}{\mathsf{PI}\left(\right)} \]
                  6. +-commutativeN/A

                    \[\leadsto \frac{180 \cdot \tan^{-1} \left(\color{blue}{\left(\frac{C}{B} + -1 \cdot \frac{A}{B}\right)} + \left(\mathsf{neg}\left(1\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  7. mul-1-negN/A

                    \[\leadsto \frac{180 \cdot \tan^{-1} \left(\left(\frac{C}{B} + \color{blue}{\left(\mathsf{neg}\left(\frac{A}{B}\right)\right)}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  8. sub-negN/A

                    \[\leadsto \frac{180 \cdot \tan^{-1} \left(\color{blue}{\left(\frac{C}{B} - \frac{A}{B}\right)} + \left(\mathsf{neg}\left(1\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  9. div-subN/A

                    \[\leadsto \frac{180 \cdot \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + \left(\mathsf{neg}\left(1\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  10. metadata-evalN/A

                    \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right)}{\mathsf{PI}\left(\right)} \]
                  11. +-lowering-+.f64N/A

                    \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)}}{\mathsf{PI}\left(\right)} \]
                  12. /-lowering-/.f64N/A

                    \[\leadsto \frac{180 \cdot \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right)}{\mathsf{PI}\left(\right)} \]
                  13. --lowering--.f64N/A

                    \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{C - A}}{B} + -1\right)}{\mathsf{PI}\left(\right)} \]
                  14. PI-lowering-PI.f6464.4

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

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

              Alternative 9: 67.6% accurate, 3.5× speedup?

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

                1. Initial program 62.5%

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \left(\frac{C}{B} - \frac{A}{B}\right)\right)}}{\mathsf{PI}\left(\right)} \]
                  2. div-subN/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
                  3. +-lowering-+.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \frac{C - A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
                  4. /-lowering-/.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
                  5. --lowering--.f6477.0

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

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

                if -5.6e-225 < B < 1.29999999999999998e-307

                1. Initial program 38.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. Step-by-step derivation
                  1. *-commutativeN/A

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

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

                    \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                  4. *-lowering-*.f64N/A

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

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

                  \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                6. Step-by-step derivation
                  1. associate-*r/N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  2. *-commutativeN/A

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

                    \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  4. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{C - A}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  5. distribute-neg-fracN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  6. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2} \cdot 1}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  7. associate-*r/N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \frac{1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  9. associate-*r/N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{1}{2} \cdot 1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  10. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2}}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  11. distribute-neg-frac2N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C - A\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  12. sub-negN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(C + \left(\mathsf{neg}\left(A\right)\right)\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  13. +-commutativeN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(A\right)\right) + C\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  14. distribute-neg-inN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(A\right)\right)\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  15. mul-1-negN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{-1 \cdot \left(\mathsf{neg}\left(A\right)\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  16. mul-1-negN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{-1 \cdot \color{blue}{\left(-1 \cdot A\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  17. associate-*r*N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(-1 \cdot -1\right) \cdot A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  18. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{1} \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  19. *-lft-identityN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  20. sub-negN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  21. /-lowering-/.f64N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  22. --lowering--.f6479.2

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

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

                if 1.29999999999999998e-307 < B

                1. Initial program 54.0%

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

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

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

                    \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                  4. *-lowering-*.f64N/A

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

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

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

                    \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  2. associate--r+N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  3. div-subN/A

                    \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  4. sub-negN/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  5. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  6. +-lowering-+.f64N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  7. /-lowering-/.f64N/A

                    \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  8. --lowering--.f6464.4

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

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

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

              Alternative 10: 64.0% accurate, 3.5× speedup?

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

                1. Initial program 63.0%

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \left(\frac{C}{B} - \frac{A}{B}\right)\right)}}{\mathsf{PI}\left(\right)} \]
                  2. div-subN/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
                  3. +-lowering-+.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \frac{C - A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
                  4. /-lowering-/.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
                  5. --lowering--.f6473.1

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

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

                if 2.2000000000000001e-224 < B < 2.50000000000000002e-36

                1. Initial program 48.4%

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

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

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

                    \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                  4. *-lowering-*.f64N/A

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

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

                  \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                6. Step-by-step derivation
                  1. associate-*r/N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  2. *-commutativeN/A

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

                    \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  4. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{C - A}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  5. distribute-neg-fracN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  6. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2} \cdot 1}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  7. associate-*r/N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \frac{1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  9. associate-*r/N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{1}{2} \cdot 1}{C - A}}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  10. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2}}}{C - A}\right)\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  11. distribute-neg-frac2N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C - A\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  12. sub-negN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(C + \left(\mathsf{neg}\left(A\right)\right)\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  13. +-commutativeN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(A\right)\right) + C\right)}\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  14. distribute-neg-inN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(A\right)\right)\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  15. mul-1-negN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{-1 \cdot \left(\mathsf{neg}\left(A\right)\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  16. mul-1-negN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{-1 \cdot \color{blue}{\left(-1 \cdot A\right)} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  17. associate-*r*N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{\left(-1 \cdot -1\right) \cdot A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  18. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{1} \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  19. *-lft-identityN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A} + \left(\mathsf{neg}\left(C\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  20. sub-negN/A

                    \[\leadsto \tan^{-1} \left(B \cdot \frac{\frac{1}{2}}{\color{blue}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  21. /-lowering-/.f64N/A

                    \[\leadsto \tan^{-1} \left(B \cdot \color{blue}{\frac{\frac{1}{2}}{A - C}}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  22. --lowering--.f6457.7

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

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

                if 2.50000000000000002e-36 < B

                1. Initial program 49.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. Step-by-step derivation
                  1. *-commutativeN/A

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

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

                    \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                  4. *-lowering-*.f64N/A

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

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

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

                    \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  2. associate--r+N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  3. div-subN/A

                    \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  4. sub-negN/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  5. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  6. +-lowering-+.f64N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  7. /-lowering-/.f64N/A

                    \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  8. --lowering--.f6470.8

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

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

                  \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                9. Step-by-step derivation
                  1. distribute-lft-inN/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  2. metadata-evalN/A

                    \[\leadsto \tan^{-1} \left(\color{blue}{-1} + -1 \cdot \frac{A}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  3. mul-1-negN/A

                    \[\leadsto \tan^{-1} \left(-1 + \color{blue}{\left(\mathsf{neg}\left(\frac{A}{B}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  4. unsub-negN/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  5. --lowering--.f64N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  6. /-lowering-/.f6466.4

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

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

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

              Alternative 11: 60.0% accurate, 3.5× speedup?

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

                1. Initial program 25.7%

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

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

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

                    \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                  4. *-lowering-*.f64N/A

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

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

                  \[\leadsto \tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                6. Step-by-step derivation
                  1. associate-*r/N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  2. /-lowering-/.f64N/A

                    \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  3. *-lowering-*.f6470.6

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

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

                if -4.00000000000000019e26 < A < 1.45e-45

                1. Initial program 60.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. clear-numN/A

                    \[\leadsto 180 \cdot \color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}} \]
                  2. un-div-invN/A

                    \[\leadsto \color{blue}{\frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}} \]
                  3. /-lowering-/.f64N/A

                    \[\leadsto \color{blue}{\frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}} \]
                  4. /-lowering-/.f64N/A

                    \[\leadsto \frac{180}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}} \]
                  5. PI-lowering-PI.f64N/A

                    \[\leadsto \frac{180}{\frac{\color{blue}{\mathsf{PI}\left(\right)}}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}} \]
                  6. atan-lowering-atan.f64N/A

                    \[\leadsto \frac{180}{\frac{\mathsf{PI}\left(\right)}{\color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}} \]
                  7. *-commutativeN/A

                    \[\leadsto \frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \color{blue}{\left(\left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \cdot \frac{1}{B}\right)}}} \]
                  8. un-div-invN/A

                    \[\leadsto \frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \color{blue}{\left(\frac{\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}{B}\right)}}} \]
                  9. /-lowering-/.f64N/A

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

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

                  \[\leadsto \frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{C - \color{blue}{B}}{B}\right)}} \]
                6. Step-by-step derivation
                  1. Simplified50.2%

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

                  if 1.45e-45 < A

                  1. Initial program 77.2%

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

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

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

                      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                    4. *-lowering-*.f64N/A

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

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

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

                      \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    2. associate--r+N/A

                      \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    3. div-subN/A

                      \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    4. sub-negN/A

                      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    5. metadata-evalN/A

                      \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    6. +-lowering-+.f64N/A

                      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    7. /-lowering-/.f64N/A

                      \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    8. --lowering--.f6475.3

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

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

                    \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  9. Step-by-step derivation
                    1. distribute-lft-inN/A

                      \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    2. metadata-evalN/A

                      \[\leadsto \tan^{-1} \left(\color{blue}{-1} + -1 \cdot \frac{A}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    3. mul-1-negN/A

                      \[\leadsto \tan^{-1} \left(-1 + \color{blue}{\left(\mathsf{neg}\left(\frac{A}{B}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    4. unsub-negN/A

                      \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    5. --lowering--.f64N/A

                      \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    6. /-lowering-/.f6474.3

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

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

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

                Alternative 12: 60.0% accurate, 3.5× speedup?

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

                  1. Initial program 25.7%

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

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

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

                      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                    4. *-lowering-*.f64N/A

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

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

                    \[\leadsto \tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                  6. Step-by-step derivation
                    1. associate-*r/N/A

                      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    2. /-lowering-/.f64N/A

                      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    3. *-lowering-*.f6470.6

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

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

                  if -1.4e26 < A < 4.1999999999999999e-45

                  1. Initial program 60.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. *-commutativeN/A

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

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

                      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                    4. *-lowering-*.f64N/A

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

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

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

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

                    if 4.1999999999999999e-45 < A

                    1. Initial program 77.2%

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

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

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

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                      4. *-lowering-*.f64N/A

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

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

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

                        \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. associate--r+N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. div-subN/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      4. sub-negN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      5. metadata-evalN/A

                        \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      6. +-lowering-+.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      7. /-lowering-/.f64N/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      8. --lowering--.f6475.3

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

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

                      \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    9. Step-by-step derivation
                      1. distribute-lft-inN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. metadata-evalN/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{-1} + -1 \cdot \frac{A}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. mul-1-negN/A

                        \[\leadsto \tan^{-1} \left(-1 + \color{blue}{\left(\mathsf{neg}\left(\frac{A}{B}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      4. unsub-negN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      5. --lowering--.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      6. /-lowering-/.f6474.3

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

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

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

                  Alternative 13: 53.3% accurate, 3.5× speedup?

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

                    1. Initial program 39.7%

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

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

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

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                      4. *-lowering-*.f64N/A

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

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

                      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    6. Step-by-step derivation
                      1. associate-*r/N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. /-lowering-/.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. *-lowering-*.f6451.3

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

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

                    if -2.50000000000000012e-231 < A < 1.52e-235

                    1. Initial program 67.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. *-commutativeN/A

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

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

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                      4. *-lowering-*.f64N/A

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

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

                      \[\leadsto \tan^{-1} \color{blue}{\left(2 \cdot \frac{C}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    6. Step-by-step derivation
                      1. associate-*r/N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{2 \cdot C}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. /-lowering-/.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{2 \cdot C}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. *-lowering-*.f6448.2

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

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

                    if 1.52e-235 < A

                    1. Initial program 72.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. *-commutativeN/A

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

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

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                      4. *-lowering-*.f64N/A

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

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

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

                        \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. associate--r+N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. div-subN/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      4. sub-negN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      5. metadata-evalN/A

                        \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      6. +-lowering-+.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      7. /-lowering-/.f64N/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      8. --lowering--.f6470.5

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

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

                      \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    9. Step-by-step derivation
                      1. distribute-lft-inN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. metadata-evalN/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{-1} + -1 \cdot \frac{A}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. mul-1-negN/A

                        \[\leadsto \tan^{-1} \left(-1 + \color{blue}{\left(\mathsf{neg}\left(\frac{A}{B}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      4. unsub-negN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      5. --lowering--.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      6. /-lowering-/.f6467.4

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

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

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

                  Alternative 14: 53.2% accurate, 3.5× speedup?

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

                    1. Initial program 39.7%

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

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

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

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                      4. *-lowering-*.f64N/A

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

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

                      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    6. Step-by-step derivation
                      1. associate-*r/N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. /-lowering-/.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. *-lowering-*.f6451.3

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

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

                    if -8.99999999999999933e-232 < A < 2.15000000000000012e-235

                    1. Initial program 67.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. *-commutativeN/A

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

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

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                      4. *-lowering-*.f64N/A

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

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

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

                        \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. associate--r+N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. div-subN/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      4. sub-negN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      5. metadata-evalN/A

                        \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      6. +-lowering-+.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      7. /-lowering-/.f64N/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      8. --lowering--.f6463.1

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

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

                      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    9. Step-by-step derivation
                      1. /-lowering-/.f6448.2

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

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

                    if 2.15000000000000012e-235 < A

                    1. Initial program 72.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. *-commutativeN/A

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

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

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                      4. *-lowering-*.f64N/A

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

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

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

                        \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. associate--r+N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. div-subN/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      4. sub-negN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      5. metadata-evalN/A

                        \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      6. +-lowering-+.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      7. /-lowering-/.f64N/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      8. --lowering--.f6470.5

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

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

                      \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    9. Step-by-step derivation
                      1. distribute-lft-inN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. metadata-evalN/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{-1} + -1 \cdot \frac{A}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. mul-1-negN/A

                        \[\leadsto \tan^{-1} \left(-1 + \color{blue}{\left(\mathsf{neg}\left(\frac{A}{B}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      4. unsub-negN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      5. --lowering--.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      6. /-lowering-/.f6467.4

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

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

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

                  Alternative 15: 53.2% accurate, 3.5× speedup?

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

                    1. Initial program 39.7%

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

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

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

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                      4. *-lowering-*.f64N/A

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

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

                      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    6. Step-by-step derivation
                      1. associate-*r/N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. /-lowering-/.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\frac{1}{2} \cdot B}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. *-lowering-*.f6451.3

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

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

                        \[\leadsto \tan^{-1} \left(\frac{\color{blue}{B \cdot \frac{1}{2}}}{A}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. associate-/l*N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{\frac{1}{2}}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{\frac{1}{2}}{A}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      4. /-lowering-/.f6451.3

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

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

                    if -6.99999999999999982e-233 < A < 5.4999999999999998e-235

                    1. Initial program 67.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. *-commutativeN/A

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

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

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                      4. *-lowering-*.f64N/A

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

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

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

                        \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. associate--r+N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. div-subN/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      4. sub-negN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      5. metadata-evalN/A

                        \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      6. +-lowering-+.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      7. /-lowering-/.f64N/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      8. --lowering--.f6463.1

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

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

                      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    9. Step-by-step derivation
                      1. /-lowering-/.f6448.2

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

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

                    if 5.4999999999999998e-235 < A

                    1. Initial program 72.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. *-commutativeN/A

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

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

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                      4. *-lowering-*.f64N/A

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

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

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

                        \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. associate--r+N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. div-subN/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      4. sub-negN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      5. metadata-evalN/A

                        \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      6. +-lowering-+.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      7. /-lowering-/.f64N/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      8. --lowering--.f6470.5

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

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

                      \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    9. Step-by-step derivation
                      1. distribute-lft-inN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      2. metadata-evalN/A

                        \[\leadsto \tan^{-1} \left(\color{blue}{-1} + -1 \cdot \frac{A}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      3. mul-1-negN/A

                        \[\leadsto \tan^{-1} \left(-1 + \color{blue}{\left(\mathsf{neg}\left(\frac{A}{B}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      4. unsub-negN/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      5. --lowering--.f64N/A

                        \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      6. /-lowering-/.f6467.4

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

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

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

                  Alternative 16: 47.7% accurate, 3.6× speedup?

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

                    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. Step-by-step derivation
                      1. *-commutativeN/A

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

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

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                      4. *-lowering-*.f64N/A

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

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

                      \[\leadsto \tan^{-1} \color{blue}{1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                    6. Step-by-step derivation
                      1. Simplified68.3%

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

                      if -7.50000000000000019e-6 < B < 8.8000000000000005e-48

                      1. Initial program 61.5%

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

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

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

                          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                        4. *-lowering-*.f64N/A

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

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

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

                          \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                        2. associate--r+N/A

                          \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                        3. div-subN/A

                          \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                        4. sub-negN/A

                          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                        5. metadata-evalN/A

                          \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                        6. +-lowering-+.f64N/A

                          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                        7. /-lowering-/.f64N/A

                          \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                        8. --lowering--.f6453.5

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

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

                        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      9. Step-by-step derivation
                        1. /-lowering-/.f6437.9

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

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

                      if 8.8000000000000005e-48 < B

                      1. Initial program 48.4%

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

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

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

                          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                        4. *-lowering-*.f64N/A

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

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

                        \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                      6. Step-by-step derivation
                        1. Simplified53.4%

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -7.5 \cdot 10^{-6}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 8.8 \cdot 10^{-48}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                      9. Add Preprocessing

                      Alternative 17: 64.3% accurate, 3.6× speedup?

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

                        1. Initial program 60.4%

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

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

                            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \left(\frac{C}{B} - \frac{A}{B}\right)\right)}}{\mathsf{PI}\left(\right)} \]
                          2. div-subN/A

                            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
                          3. +-lowering-+.f64N/A

                            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \frac{C - A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
                          4. /-lowering-/.f64N/A

                            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
                          5. --lowering--.f6466.5

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

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

                        if 8.4999999999999999e-47 < B

                        1. Initial program 48.4%

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

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

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

                            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                          4. *-lowering-*.f64N/A

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

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

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

                            \[\leadsto \tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          2. associate--r+N/A

                            \[\leadsto \tan^{-1} \color{blue}{\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          3. div-subN/A

                            \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} - 1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          4. sub-negN/A

                            \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          5. metadata-evalN/A

                            \[\leadsto \tan^{-1} \left(\frac{C - A}{B} + \color{blue}{-1}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          6. +-lowering-+.f64N/A

                            \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          7. /-lowering-/.f64N/A

                            \[\leadsto \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          8. --lowering--.f6468.4

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

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

                          \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                        9. Step-by-step derivation
                          1. distribute-lft-inN/A

                            \[\leadsto \tan^{-1} \color{blue}{\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          2. metadata-evalN/A

                            \[\leadsto \tan^{-1} \left(\color{blue}{-1} + -1 \cdot \frac{A}{B}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          3. mul-1-negN/A

                            \[\leadsto \tan^{-1} \left(-1 + \color{blue}{\left(\mathsf{neg}\left(\frac{A}{B}\right)\right)}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          4. unsub-negN/A

                            \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          5. --lowering--.f64N/A

                            \[\leadsto \tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          6. /-lowering-/.f6464.3

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

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

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

                      Alternative 18: 45.3% accurate, 3.6× speedup?

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

                        1. Initial program 61.5%

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

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

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

                            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                          4. *-lowering-*.f64N/A

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

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

                          \[\leadsto \tan^{-1} \color{blue}{1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                        6. Step-by-step derivation
                          1. Simplified61.7%

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

                          if -4.5000000000000003e-58 < B < 1.06e-92

                          1. Initial program 58.2%

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

                              \[\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)}{\mathsf{PI}\left(\right)}} \]
                            2. /-lowering-/.f64N/A

                              \[\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)}{\mathsf{PI}\left(\right)}} \]
                          4. Applied egg-rr60.2%

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

                              \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C - \color{blue}{\left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right)}}{B}\right)}{\mathsf{PI}\left(\right)} \]
                            2. associate--r+N/A

                              \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) - A}}{B}\right)}{\mathsf{PI}\left(\right)} \]
                            3. div-subN/A

                              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B} - \frac{A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
                            4. --lowering--.f64N/A

                              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B} - \frac{A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
                            5. /-lowering-/.f64N/A

                              \[\leadsto \frac{180 \cdot \tan^{-1} \left(\color{blue}{\frac{C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B}} - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \]
                            6. --lowering--.f64N/A

                              \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}}{B} - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \]
                            7. accelerator-lowering-hypot.f64N/A

                              \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C - \color{blue}{\mathsf{hypot}\left(B, A - C\right)}}{B} - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \]
                            8. --lowering--.f64N/A

                              \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, \color{blue}{A - C}\right)}{B} - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \]
                            9. /-lowering-/.f6452.0

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

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

                            \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(-1 \cdot \left(-1 \cdot \frac{A}{B} + \frac{A}{B}\right)\right)}}{\mathsf{PI}\left(\right)} \]
                          8. Step-by-step derivation
                            1. distribute-lft1-inN/A

                              \[\leadsto \frac{180 \cdot \tan^{-1} \left(-1 \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot \frac{A}{B}\right)}\right)}{\mathsf{PI}\left(\right)} \]
                            2. metadata-evalN/A

                              \[\leadsto \frac{180 \cdot \tan^{-1} \left(-1 \cdot \left(\color{blue}{0} \cdot \frac{A}{B}\right)\right)}{\mathsf{PI}\left(\right)} \]
                            3. mul0-lftN/A

                              \[\leadsto \frac{180 \cdot \tan^{-1} \left(-1 \cdot \color{blue}{0}\right)}{\mathsf{PI}\left(\right)} \]
                            4. metadata-eval32.3

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

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

                          if 1.06e-92 < B

                          1. Initial program 51.1%

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

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

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

                              \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                            4. *-lowering-*.f64N/A

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

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

                            \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                          6. Step-by-step derivation
                            1. Simplified49.7%

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.5 \cdot 10^{-58}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 1.06 \cdot 10^{-92}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                          9. Add Preprocessing

                          Alternative 19: 40.6% accurate, 3.8× speedup?

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

                            1. Initial program 60.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. *-commutativeN/A

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

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

                                \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                              4. *-lowering-*.f64N/A

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

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

                              \[\leadsto \tan^{-1} \color{blue}{1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                            6. Step-by-step derivation
                              1. Simplified45.0%

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

                              if -4.20000000000000007e-300 < B

                              1. Initial program 54.0%

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

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

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

                                  \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                                4. *-lowering-*.f64N/A

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

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

                                \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                              6. Step-by-step derivation
                                1. Simplified37.1%

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

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

                              Alternative 20: 21.6% accurate, 4.0× speedup?

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

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

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

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

                                  \[\leadsto \color{blue}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}} \]
                                4. *-lowering-*.f64N/A

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

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

                                \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\mathsf{PI}\left(\right)} \]
                              6. Step-by-step derivation
                                1. Simplified19.6%

                                  \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
                                2. Final simplification19.6%

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

                                Reproduce

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