ABCF->ab-angle angle

Percentage Accurate: 53.4% → 88.5%
Time: 13.2s
Alternatives: 16
Speedup: 2.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 53.4% 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: 88.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)\right)\right)}{\pi}\\
t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-39}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{1}{\pi} \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{0.005555555555555556}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -4.9999999999999998e-39 or -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64))))))

    1. Initial program 62.2%

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

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

      if -4.9999999999999998e-39 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0

      1. Initial program 19.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\left(A - C\right) \cdot 2}\right)} \]
        7. Step-by-step derivation
          1. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{1}{\pi} \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{\color{blue}{0.005555555555555556}} \]
        8. Applied egg-rr99.6%

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

      Alternative 2: 69.3% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+33}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq -0.5:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{1}{\pi} \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{0.005555555555555556}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))
              (t_1
               (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
         (if (<= t_1 -2e+33)
           t_0
           (if (<= t_1 -0.5)
             (* 180.0 (/ (atan -1.0) PI))
             (if (<= t_1 0.0)
               (* (/ 1.0 PI) (/ (atan (/ (* B 0.5) (- A C))) 0.005555555555555556))
               t_0)))))
      double code(double A, double B, double C) {
      	double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
      	double t_1 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
      	double tmp;
      	if (t_1 <= -2e+33) {
      		tmp = t_0;
      	} else if (t_1 <= -0.5) {
      		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
      	} else if (t_1 <= 0.0) {
      		tmp = (1.0 / ((double) M_PI)) * (atan(((B * 0.5) / (A - C))) / 0.005555555555555556);
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      public static double code(double A, double B, double C) {
      	double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
      	double t_1 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
      	double tmp;
      	if (t_1 <= -2e+33) {
      		tmp = t_0;
      	} else if (t_1 <= -0.5) {
      		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
      	} else if (t_1 <= 0.0) {
      		tmp = (1.0 / Math.PI) * (Math.atan(((B * 0.5) / (A - C))) / 0.005555555555555556);
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      def code(A, B, C):
      	t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi)
      	t_1 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0))))
      	tmp = 0
      	if t_1 <= -2e+33:
      		tmp = t_0
      	elif t_1 <= -0.5:
      		tmp = 180.0 * (math.atan(-1.0) / math.pi)
      	elif t_1 <= 0.0:
      		tmp = (1.0 / math.pi) * (math.atan(((B * 0.5) / (A - C))) / 0.005555555555555556)
      	else:
      		tmp = t_0
      	return tmp
      
      function code(A, B, C)
      	t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi))
      	t_1 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))
      	tmp = 0.0
      	if (t_1 <= -2e+33)
      		tmp = t_0;
      	elseif (t_1 <= -0.5)
      		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
      	elseif (t_1 <= 0.0)
      		tmp = Float64(Float64(1.0 / pi) * Float64(atan(Float64(Float64(B * 0.5) / Float64(A - C))) / 0.005555555555555556));
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
      	t_1 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0))));
      	tmp = 0.0;
      	if (t_1 <= -2e+33)
      		tmp = t_0;
      	elseif (t_1 <= -0.5)
      		tmp = 180.0 * (atan(-1.0) / pi);
      	elseif (t_1 <= 0.0)
      		tmp = (1.0 / pi) * (atan(((B * 0.5) / (A - C))) / 0.005555555555555556);
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -2e+33], t$95$0, If[LessEqual[t$95$1, -0.5], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(1.0 / Pi), $MachinePrecision] * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / 0.005555555555555556), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
      t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
      \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+33}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;t\_1 \leq -0.5:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
      
      \mathbf{elif}\;t\_1 \leq 0:\\
      \;\;\;\;\frac{1}{\pi} \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{0.005555555555555556}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -1.9999999999999999e33 or -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64))))))

        1. Initial program 60.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--.f6464.2

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

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

        if -1.9999999999999999e33 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.5

        1. Initial program 100.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}{-1}}{\mathsf{PI}\left(\right)} \]
        4. Step-by-step derivation
          1. Simplified100.0%

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

          if -0.5 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0

          1. Initial program 19.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. Applied egg-rr21.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\left(A - C\right) \cdot 2}\right)} \]
            7. Step-by-step derivation
              1. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 3: 69.2% accurate, 0.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+33}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq -0.5:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          (FPCore (A B C)
           :precision binary64
           (let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))
                  (t_1
                   (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
             (if (<= t_1 -2e+33)
               t_0
               (if (<= t_1 -0.5)
                 (* 180.0 (/ (atan -1.0) PI))
                 (if (<= t_1 0.0) (* 180.0 (/ (atan (* B (/ 0.5 (- A C)))) PI)) t_0)))))
          double code(double A, double B, double C) {
          	double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
          	double t_1 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
          	double tmp;
          	if (t_1 <= -2e+33) {
          		tmp = t_0;
          	} else if (t_1 <= -0.5) {
          		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
          	} else if (t_1 <= 0.0) {
          		tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / ((double) M_PI));
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          public static double code(double A, double B, double C) {
          	double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
          	double t_1 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
          	double tmp;
          	if (t_1 <= -2e+33) {
          		tmp = t_0;
          	} else if (t_1 <= -0.5) {
          		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
          	} else if (t_1 <= 0.0) {
          		tmp = 180.0 * (Math.atan((B * (0.5 / (A - C)))) / Math.PI);
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(A, B, C):
          	t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi)
          	t_1 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0))))
          	tmp = 0
          	if t_1 <= -2e+33:
          		tmp = t_0
          	elif t_1 <= -0.5:
          		tmp = 180.0 * (math.atan(-1.0) / math.pi)
          	elif t_1 <= 0.0:
          		tmp = 180.0 * (math.atan((B * (0.5 / (A - C)))) / math.pi)
          	else:
          		tmp = t_0
          	return tmp
          
          function code(A, B, C)
          	t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi))
          	t_1 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))
          	tmp = 0.0
          	if (t_1 <= -2e+33)
          		tmp = t_0;
          	elseif (t_1 <= -0.5)
          		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
          	elseif (t_1 <= 0.0)
          		tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) / pi));
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(A, B, C)
          	t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
          	t_1 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0))));
          	tmp = 0.0;
          	if (t_1 <= -2e+33)
          		tmp = t_0;
          	elseif (t_1 <= -0.5)
          		tmp = 180.0 * (atan(-1.0) / pi);
          	elseif (t_1 <= 0.0)
          		tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / pi);
          	else
          		tmp = t_0;
          	end
          	tmp_2 = tmp;
          end
          
          code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -2e+33], t$95$0, If[LessEqual[t$95$1, -0.5], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
          t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
          \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+33}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;t\_1 \leq -0.5:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
          
          \mathbf{elif}\;t\_1 \leq 0:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -1.9999999999999999e33 or -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64))))))

            1. Initial program 60.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--.f6464.2

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

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

            if -1.9999999999999999e33 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.5

            1. Initial program 100.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}{-1}}{\mathsf{PI}\left(\right)} \]
            4. Step-by-step derivation
              1. Simplified100.0%

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

              if -0.5 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0

              1. Initial program 19.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. Applied egg-rr21.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 4: 75.7% accurate, 1.5× speedup?

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

                1. Initial program 19.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\left(A - C\right) \cdot 2}\right)} \]
                  7. Step-by-step derivation
                    1. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{1}{\pi} \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{\color{blue}{0.005555555555555556}} \]
                  8. Applied egg-rr82.1%

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

                  if -5.20000000000000029e79 < A < 3.6999999999999997e-29

                  1. Initial program 53.2%

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

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

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

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

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

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(B, B, \color{blue}{C \cdot C}\right)}}{B}\right)}{\mathsf{PI}\left(\right)} \]
                    7. *-lowering-*.f6452.2

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

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

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

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

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

                  if 3.6999999999999997e-29 < A

                  1. Initial program 79.2%

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

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

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

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

                Alternative 5: 56.9% accurate, 2.5× speedup?

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

                  1. Initial program 19.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -6.2e78 < A < 4.1e9

                    1. Initial program 56.1%

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

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

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

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

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

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

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

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

                    if 4.1e9 < A

                    1. Initial program 77.0%

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

                      \[\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-*.f6471.7

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -6.2 \cdot 10^{+78}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A \cdot 2}\right)}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq 4100000000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]
                  6. Add Preprocessing

                  Alternative 6: 56.9% accurate, 2.5× speedup?

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

                    1. Initial program 19.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -1.94999999999999999e80 < A < 1.25e9

                      1. Initial program 56.1%

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

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

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

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

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

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

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

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

                      if 1.25e9 < A

                      1. Initial program 77.0%

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

                        \[\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-*.f6471.7

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

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

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

                    Alternative 7: 56.9% accurate, 2.5× speedup?

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

                      1. Initial program 19.3%

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

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

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

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

                      if -1.04000000000000006e80 < A < 2.3e9

                      1. Initial program 56.1%

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

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

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

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

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

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

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

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

                      if 2.3e9 < A

                      1. Initial program 77.0%

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

                        \[\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-*.f6471.7

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

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

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

                    Alternative 8: 56.9% accurate, 2.5× speedup?

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

                      1. Initial program 19.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -2.35000000000000011e79 < A < 2.4e9

                        1. Initial program 56.1%

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

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

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

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

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

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

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

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

                        if 2.4e9 < A

                        1. Initial program 77.0%

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

                          \[\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-*.f6471.7

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

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

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

                      Alternative 9: 56.8% accurate, 2.5× speedup?

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

                        1. Initial program 19.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -1.80000000000000007e82 < A < 4.2e9

                          1. Initial program 56.1%

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

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

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

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

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

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

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

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

                          if 4.2e9 < A

                          1. Initial program 77.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--.f6475.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 10: 49.3% accurate, 2.5× speedup?

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

                          1. Initial program 8.0%

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

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

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

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

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

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

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

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

                          if -9.79999999999999938e156 < A < 1.06e7

                          1. Initial program 54.9%

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

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

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

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

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

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

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

                          if 1.06e7 < A

                          1. Initial program 77.3%

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

                            \[\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--.f6474.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 11: 37.4% accurate, 2.5× speedup?

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

                          1. Initial program 73.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--.f6470.3

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

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

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

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

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

                          if -9.79999999999999955e-116 < C < -2.09999999999999987e-272

                          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. 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--.f6468.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -2.09999999999999987e-272 < C < 1.45000000000000005e105

                          1. Initial program 46.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}{1}}{\mathsf{PI}\left(\right)} \]
                          4. Step-by-step derivation
                            1. Simplified31.6%

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

                            if 1.45000000000000005e105 < C

                            1. Initial program 24.4%

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

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

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

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

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

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

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

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

                          Alternative 12: 46.9% accurate, 2.5× speedup?

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

                            1. Initial program 52.8%

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

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

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

                              if -1.1499999999999999e-19 < B < 5.19999999999999977e49

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 5.19999999999999977e49 < B

                              1. Initial program 49.2%

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

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

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

                              Alternative 13: 60.8% accurate, 2.5× speedup?

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

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

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

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

                                if 1.30000000000000005e56 < C

                                1. Initial program 25.5%

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

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

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

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

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

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

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

                                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(B, B, \color{blue}{C \cdot C}\right)}}{B}\right)}{\mathsf{PI}\left(\right)} \]
                                  7. *-lowering-*.f6423.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 14: 44.9% accurate, 2.8× speedup?

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

                                1. Initial program 58.5%

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

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

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

                                  if -2.80000000000000013e-102 < B < 3.8000000000000001e-122

                                  1. Initial program 54.5%

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

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

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

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

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

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

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

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

                                  if 3.8000000000000001e-122 < B

                                  1. Initial program 53.2%

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

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

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

                                  Alternative 15: 28.7% accurate, 2.9× speedup?

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

                                    1. Initial program 56.8%

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

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

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

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

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

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

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

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

                                    if 3.0000000000000002e-119 < B

                                    1. Initial program 53.2%

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

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

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

                                    Alternative 16: 20.8% accurate, 3.1× speedup?

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

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

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

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

                                      Reproduce

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