ABCF->ab-angle angle

Percentage Accurate: 54.1% → 88.5%
Time: 14.2s
Alternatives: 18
Speedup: 2.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{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 -0.02:\\
\;\;\;\;t\_0\\

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

\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)))))) < -0.0200000000000000004 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 61.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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} \]
    5. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

    if -0.0200000000000000004 < (*.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 14.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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} \]
    5. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

Alternative 2: 68.7% accurate, 0.3× 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)\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+58}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq -0.5:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \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))))))
        (t_2 (* 180.0 (/ (atan (/ (- C B) B)) PI))))
   (if (<= t_1 (- INFINITY))
     t_2
     (if (<= t_1 -4e+58)
       t_0
       (if (<= t_1 -0.5)
         t_2
         (if (<= t_1 0.0) (* (/ 180.0 PI) (atan (/ (* B 0.5) A))) 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 t_2 = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 <= -4e+58) {
		tmp = t_0;
	} else if (t_1 <= -0.5) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
	} 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 t_2 = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else if (t_1 <= -4e+58) {
		tmp = t_0;
	} else if (t_1 <= -0.5) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
	} 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))))
	t_2 = 180.0 * (math.atan(((C - B) / B)) / math.pi)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = t_2
	elif t_1 <= -4e+58:
		tmp = t_0
	elif t_1 <= -0.5:
		tmp = t_2
	elif t_1 <= 0.0:
		tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A))
	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)))))
	t_2 = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_1 <= -4e+58)
		tmp = t_0;
	elseif (t_1 <= -0.5)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A)));
	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))));
	t_2 = 180.0 * (atan(((C - B) / B)) / pi);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = t_2;
	elseif (t_1 <= -4e+58)
		tmp = t_0;
	elseif (t_1 <= -0.5)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = (180.0 / pi) * atan(((B * 0.5) / A));
	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]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -4e+58], t$95$0, If[LessEqual[t$95$1, -0.5], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $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)\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+58}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_1 \leq -0.5:\\
\;\;\;\;t\_2\\

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

\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)))))) < -inf.0 or -3.99999999999999978e58 < (*.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 53.5%

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

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

      \[\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 B around inf

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

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

      if -inf.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)))))) < -3.99999999999999978e58 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 66.1%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \frac{C - A}{B}\right)}}{\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 16.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 62.0% accurate, 0.4× speedup?

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

      1. Initial program 60.7%

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

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

        \[\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 B around inf

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \color{blue}{B}}{B}\right)}{\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 16.7%

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

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

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

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

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

        if 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)))))) < 1e221

        1. Initial program 97.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 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-*.f6492.1

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

          \[\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 B around -inf

          \[\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-/.f6490.9

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

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

        if 1e221 < (*.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 43.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(C - A\right) \cdot \left(C - A\right) + \color{blue}{B \cdot B}}\right)\right)}{\mathsf{PI}\left(\right)} \]
        4. Applied egg-rr86.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} \]
        5. Step-by-step derivation
          1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 79.3% accurate, 0.5× speedup?

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

        1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\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} \]
        5. Step-by-step derivation
          1. associate-*r/N/A

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

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

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

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \color{blue}{B}}{B}\right)}{\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 16.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\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} \]
          5. Step-by-step derivation
            1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

          if 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 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\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} \]
          5. Taylor expanded in B around -inf

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

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

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

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

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

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

        Alternative 5: 79.0% accurate, 0.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\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} \]
          5. Step-by-step derivation
            1. associate-*r/N/A

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

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

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

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

              \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \color{blue}{B}}{B}\right)}{\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 16.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\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} \]
            5. Step-by-step derivation
              1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

            if 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 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\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} \]
            5. Step-by-step derivation
              1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

          Alternative 6: 72.5% accurate, 0.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\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} \]
            5. Step-by-step derivation
              1. associate-*r/N/A

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

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

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

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

                \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \color{blue}{B}}{B}\right)}{\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 16.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 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 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\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} \]
              5. Step-by-step derivation
                1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 72.5% accurate, 0.6× speedup?

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

              1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)}}{\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 16.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 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 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\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} \]
              5. Step-by-step derivation
                1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

            Alternative 8: 72.5% accurate, 0.6× speedup?

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

              1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} + -1\right)}}{\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 16.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 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 61.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--.f6479.8

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

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

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

            Alternative 9: 59.6% accurate, 2.5× speedup?

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

              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. 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-*.f6466.8

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

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

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

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

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

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

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

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

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

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

              if -6.20000000000000031e-53 < A < 7.50000000000000066e-117

              1. Initial program 63.7%

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

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

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

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

              if 7.50000000000000066e-117 < A

              1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(C - A\right) \cdot \left(C - A\right) + \color{blue}{B \cdot B}}\right)\right)}{\mathsf{PI}\left(\right)} \]
              4. Applied egg-rr95.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} \]
              5. Step-by-step derivation
                1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 10: 59.6% accurate, 2.5× speedup?

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

              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. 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-*.f6466.8

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

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

              if -2.20000000000000018e-53 < A < 1.1200000000000001e-113

              1. Initial program 63.7%

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

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

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

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

              if 1.1200000000000001e-113 < A

              1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(C - A\right) \cdot \left(C - A\right) + \color{blue}{B \cdot B}}\right)\right)}{\mathsf{PI}\left(\right)} \]
              4. Applied egg-rr95.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} \]
              5. Step-by-step derivation
                1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 11: 54.7% accurate, 2.5× speedup?

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

              1. Initial program 57.0%

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

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

                \[\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 B around -inf

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

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

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

              if 4.39999999999999992e-253 < B < 3.1e-82

              1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\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} \]
              5. Step-by-step derivation
                1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 3.1e-82 < B

              1. Initial program 50.8%

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

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

                \[\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 B around inf

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

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

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

              Alternative 12: 47.1% accurate, 2.5× speedup?

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

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

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

                  if -3.99999999999999998e-70 < B < 6.6e-72

                  1. Initial program 60.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(C - A\right) \cdot \left(C - A\right) + \color{blue}{B \cdot B}}\right)\right)}{\mathsf{PI}\left(\right)} \]
                  4. Applied egg-rr81.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} \]
                  5. Step-by-step derivation
                    1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 6.6e-72 < B

                  1. Initial program 49.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. Simplified57.3%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4 \cdot 10^{-70}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 6.6 \cdot 10^{-72}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 13: 47.5% accurate, 2.5× speedup?

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

                    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. Simplified66.7%

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

                      if -6.9999999999999995e-44 < B < 1.02000000000000009e-52

                      1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\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} \]
                      5. Step-by-step derivation
                        1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 1.02000000000000009e-52 < B

                      1. Initial program 48.1%

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

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

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

                      Alternative 14: 55.1% accurate, 2.6× speedup?

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

                        1. Initial program 58.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(C - A\right) \cdot \left(C - A\right) + \color{blue}{B \cdot B}}\right)\right)}{\mathsf{PI}\left(\right)} \]
                        4. Applied egg-rr82.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} \]
                        5. Step-by-step derivation
                          1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 2.2999999999999999e-114 < B

                        1. Initial program 49.1%

                          \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
                        2. 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-*.f6441.5

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

                          \[\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 B around inf

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

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

                        Alternative 15: 51.5% accurate, 2.6× speedup?

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

                          1. Initial program 58.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 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-*.f6447.5

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

                            \[\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 B around -inf

                            \[\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-/.f6454.9

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

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

                          if 1.08e-52 < B

                          1. Initial program 48.1%

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

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

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

                          Alternative 16: 44.6% accurate, 2.8× speedup?

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

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

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

                              if -4.7e-125 < B < 4.4999999999999998e-144

                              1. Initial program 56.7%

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

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

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

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

                              if 4.4999999999999998e-144 < B

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

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

                              Alternative 17: 28.6% accurate, 2.9× speedup?

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

                                1. Initial program 57.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 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-eval17.0

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

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

                                if 1.01999999999999995e-140 < B

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

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

                                Alternative 18: 20.5% 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.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}{-1}}{\mathsf{PI}\left(\right)} \]
                                4. Step-by-step derivation
                                  1. Simplified20.9%

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

                                  Reproduce

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