ABCF->ab-angle angle

Percentage Accurate: 53.6% → 88.4%
Time: 5.8s
Alternatives: 13
Speedup: 2.5×

Specification

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

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

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 13 alternatives:

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

Initial Program: 53.6% 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.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_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}\\
t_1 := \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right) \cdot 180}{\pi}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -9.99999999999999971e-29 or -0.0 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64)))

    1. Initial program 59.0%

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

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

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

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

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

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

    if -9.99999999999999971e-29 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -0.0

    1. Initial program 18.4%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{{\left(A - C\right)}^{2}} + {B}^{2}}\right)\right)}{\pi} \]
      3. 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)}{\pi} \]
      4. lift--.f64N/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)}{\pi} \]
      5. sub-negate2N/A

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(\mathsf{neg}\left(\left(C - A\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(C - A\right)}\right)\right) + {B}^{2}}\right)\right)}{\pi} \]
      10. sqr-neg-revN/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(C - A\right)} + {B}^{2}}\right)\right)}{\pi} \]
      11. lower-fma.f6418.4

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(C - A, C - A, {B}^{2}\right)}}\right)\right)}{\pi} \]
      12. lift-pow.f64N/A

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, \color{blue}{B \cdot B}\right)}\right)\right)}{\pi} \]
      14. lower-*.f6418.4

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\left(A - C\right)\right)\right)} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      3. lift--.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      4. lift--.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      5. flip--N/A

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      7. distribute-neg-fracN/A

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{C \cdot C - A \cdot A}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      9. difference-of-squares-revN/A

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      13. lift-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\left(A + C\right) \cdot \left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      14. lower-/.f6417.5

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      3. sub-negate2N/A

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      6. flip--N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{A \cdot A - C \cdot C}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      7. lift-+.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      8. distribute-neg-fracN/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(A \cdot A - C \cdot C\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      9. sub-negate2N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\color{blue}{C \cdot C - A \cdot A}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      10. difference-of-squares-revN/A

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      14. lift-*.f64N/A

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\frac{\left(A + C\right) \cdot \left(\left(A + C\right) \cdot \left(C - A\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
      16. lower-/.f64N/A

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

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

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

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

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

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

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

Alternative 2: 70.8% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;t\_2\\

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

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


\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 or 2 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 4.0000000000000001e297

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

      1. Initial program 19.0%

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{{\left(A - C\right)}^{2}} + {B}^{2}}\right)\right)}{\pi} \]
        3. 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)}{\pi} \]
        4. lift--.f64N/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)}{\pi} \]
        5. sub-negate2N/A

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(\mathsf{neg}\left(\left(C - A\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(C - A\right)}\right)\right) + {B}^{2}}\right)\right)}{\pi} \]
        10. sqr-neg-revN/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(C - A\right)} + {B}^{2}}\right)\right)}{\pi} \]
        11. lower-fma.f6419.0

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(C - A, C - A, {B}^{2}\right)}}\right)\right)}{\pi} \]
        12. lift-pow.f64N/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, \color{blue}{B \cdot B}\right)}\right)\right)}{\pi} \]
        14. lower-*.f6419.0

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, \color{blue}{B \cdot B}\right)}\right)\right)}{\pi} \]
      3. Applied rewrites19.0%

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\left(A - C\right)\right)\right)} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        3. lift--.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        4. lift--.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        5. flip--N/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        7. distribute-neg-fracN/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{C \cdot C - A \cdot A}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        9. difference-of-squares-revN/A

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        13. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\left(A + C\right) \cdot \left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        14. lower-/.f6418.0

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        3. sub-negate2N/A

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        6. flip--N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{A \cdot A - C \cdot C}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        7. lift-+.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        8. distribute-neg-fracN/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(A \cdot A - C \cdot C\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        9. sub-negate2N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\color{blue}{C \cdot C - A \cdot A}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        10. difference-of-squares-revN/A

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        14. lift-*.f64N/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\frac{\left(A + C\right) \cdot \left(\left(A + C\right) \cdot \left(C - A\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
        16. lower-/.f64N/A

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

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

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

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

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

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

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

      if 1.9999999999999999e-40 < (*.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)))))) < 2 or 4.0000000000000001e297 < (*.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 52.2%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\tan^{-1} \color{blue}{1} \cdot 180}{\pi} \]
      7. Step-by-step derivation
        1. Applied rewrites50.6%

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

      Alternative 3: 84.6% accurate, 0.4× speedup?

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

        1. Initial program 59.0%

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

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

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

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

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

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

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

        if -9.99999999999999971e-29 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -0.0

        1. Initial program 18.4%

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{{\left(A - C\right)}^{2}} + {B}^{2}}\right)\right)}{\pi} \]
          3. 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)}{\pi} \]
          4. lift--.f64N/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)}{\pi} \]
          5. sub-negate2N/A

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(\mathsf{neg}\left(\left(C - A\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(C - A\right)}\right)\right) + {B}^{2}}\right)\right)}{\pi} \]
          10. sqr-neg-revN/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(C - A\right)} + {B}^{2}}\right)\right)}{\pi} \]
          11. lower-fma.f6418.4

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(C - A, C - A, {B}^{2}\right)}}\right)\right)}{\pi} \]
          12. lift-pow.f64N/A

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, \color{blue}{B \cdot B}\right)}\right)\right)}{\pi} \]
          14. lower-*.f6418.4

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\left(A - C\right)\right)\right)} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          3. lift--.f64N/A

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          4. lift--.f64N/A

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          5. flip--N/A

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          7. distribute-neg-fracN/A

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{C \cdot C - A \cdot A}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          9. difference-of-squares-revN/A

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          13. lift-*.f64N/A

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\left(A + C\right) \cdot \left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          14. lower-/.f6417.5

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          3. sub-negate2N/A

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          6. flip--N/A

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{A \cdot A - C \cdot C}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          7. lift-+.f64N/A

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          8. distribute-neg-fracN/A

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(A \cdot A - C \cdot C\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          9. sub-negate2N/A

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\color{blue}{C \cdot C - A \cdot A}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          10. difference-of-squares-revN/A

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          14. lift-*.f64N/A

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\frac{\left(A + C\right) \cdot \left(\left(A + C\right) \cdot \left(C - A\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
          16. lower-/.f64N/A

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

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

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

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

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

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

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

      Alternative 4: 79.6% accurate, 0.4× speedup?

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

        1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

          if -9.99999999999999971e-29 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -0.0

          1. Initial program 18.4%

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{{\left(A - C\right)}^{2}} + {B}^{2}}\right)\right)}{\pi} \]
            3. 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)}{\pi} \]
            4. lift--.f64N/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)}{\pi} \]
            5. sub-negate2N/A

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(\mathsf{neg}\left(\left(C - A\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(C - A\right)}\right)\right) + {B}^{2}}\right)\right)}{\pi} \]
            10. sqr-neg-revN/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(C - A\right)} + {B}^{2}}\right)\right)}{\pi} \]
            11. lower-fma.f6418.4

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(C - A, C - A, {B}^{2}\right)}}\right)\right)}{\pi} \]
            12. lift-pow.f64N/A

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, \color{blue}{B \cdot B}\right)}\right)\right)}{\pi} \]
            14. lower-*.f6418.4

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\left(A - C\right)\right)\right)} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            3. lift--.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            4. lift--.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            5. flip--N/A

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            7. distribute-neg-fracN/A

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{C \cdot C - A \cdot A}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            9. difference-of-squares-revN/A

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            13. lift-*.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\left(A + C\right) \cdot \left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            14. lower-/.f6417.5

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            3. sub-negate2N/A

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            6. flip--N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{A \cdot A - C \cdot C}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            7. lift-+.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            8. distribute-neg-fracN/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(A \cdot A - C \cdot C\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            9. sub-negate2N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\color{blue}{C \cdot C - A \cdot A}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            10. difference-of-squares-revN/A

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            14. lift-*.f64N/A

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\frac{\left(A + C\right) \cdot \left(\left(A + C\right) \cdot \left(C - A\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
            16. lower-/.f64N/A

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

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

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

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

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

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

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

        Alternative 5: 71.5% accurate, 0.4× speedup?

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

          1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

            if -40 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < 9.9999999999999996e-24

            1. Initial program 19.0%

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{{\left(A - C\right)}^{2}} + {B}^{2}}\right)\right)}{\pi} \]
              3. 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)}{\pi} \]
              4. lift--.f64N/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)}{\pi} \]
              5. sub-negate2N/A

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(\mathsf{neg}\left(\left(C - A\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(C - A\right)}\right)\right) + {B}^{2}}\right)\right)}{\pi} \]
              10. sqr-neg-revN/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(C - A\right)} + {B}^{2}}\right)\right)}{\pi} \]
              11. lower-fma.f6419.0

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(C - A, C - A, {B}^{2}\right)}}\right)\right)}{\pi} \]
              12. lift-pow.f64N/A

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, \color{blue}{B \cdot B}\right)}\right)\right)}{\pi} \]
              14. lower-*.f6419.0

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, \color{blue}{B \cdot B}\right)}\right)\right)}{\pi} \]
            3. Applied rewrites19.0%

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\left(A - C\right)\right)\right)} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              3. lift--.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              4. lift--.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              5. flip--N/A

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              7. distribute-neg-fracN/A

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{C \cdot C - A \cdot A}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              9. difference-of-squares-revN/A

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              13. lift-*.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\left(A + C\right) \cdot \left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              14. lower-/.f6418.1

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              3. sub-negate2N/A

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              6. flip--N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{A \cdot A - C \cdot C}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              7. lift-+.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              8. distribute-neg-fracN/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(A \cdot A - C \cdot C\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              9. sub-negate2N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\color{blue}{C \cdot C - A \cdot A}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              10. difference-of-squares-revN/A

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              14. lift-*.f64N/A

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\frac{\left(A + C\right) \cdot \left(\left(A + C\right) \cdot \left(C - A\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
              16. lower-/.f64N/A

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

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

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

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

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

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

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

            if 9.9999999999999996e-24 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64)))

            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. Step-by-step derivation
              1. lift-+.f64N/A

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{{\left(A - C\right)}^{2}} + {B}^{2}}\right)\right)}{\pi} \]
              3. 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)}{\pi} \]
              4. lift--.f64N/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)}{\pi} \]
              5. sub-negate2N/A

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(\mathsf{neg}\left(\left(C - A\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(C - A\right)}\right)\right) + {B}^{2}}\right)\right)}{\pi} \]
              10. sqr-neg-revN/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(C - A\right)} + {B}^{2}}\right)\right)}{\pi} \]
              11. lower-fma.f6458.3

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(C - A, C - A, {B}^{2}\right)}}\right)\right)}{\pi} \]
              12. lift-pow.f64N/A

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, \color{blue}{B \cdot B}\right)}\right)\right)}{\pi} \]
              14. lower-*.f6458.3

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

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

          Alternative 6: 55.0% accurate, 0.4× speedup?

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

            1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

              if -40 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -0.0

              1. Initial program 19.1%

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

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

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

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

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

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

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

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

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

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

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

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

              if -0.0 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64)))

              1. Initial program 58.2%

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\tan^{-1} \color{blue}{1} \cdot 180}{\pi} \]
              7. Step-by-step derivation
                1. Applied rewrites45.9%

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

              Alternative 7: 55.0% accurate, 0.4× speedup?

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

                1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

                  if -40 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -0.0

                  1. Initial program 19.1%

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{{\left(A - C\right)}^{2}} + {B}^{2}}\right)\right)}{\pi} \]
                    3. 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)}{\pi} \]
                    4. lift--.f64N/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)}{\pi} \]
                    5. sub-negate2N/A

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

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

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(\mathsf{neg}\left(\left(C - A\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(C - A\right)}\right)\right) + {B}^{2}}\right)\right)}{\pi} \]
                    10. sqr-neg-revN/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(C - A\right)} + {B}^{2}}\right)\right)}{\pi} \]
                    11. lower-fma.f6419.1

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(C - A, C - A, {B}^{2}\right)}}\right)\right)}{\pi} \]
                    12. lift-pow.f64N/A

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, \color{blue}{B \cdot B}\right)}\right)\right)}{\pi} \]
                    14. lower-*.f6419.1

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

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\left(A - C\right)\right)\right)} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    3. lift--.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    4. lift--.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    5. flip--N/A

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    7. distribute-neg-fracN/A

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{C \cdot C - A \cdot A}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    9. difference-of-squares-revN/A

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

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    13. lift-*.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\left(A + C\right) \cdot \left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    14. lower-/.f6418.2

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

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    3. sub-negate2N/A

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    6. flip--N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{A \cdot A - C \cdot C}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    7. lift-+.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    8. distribute-neg-fracN/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(A \cdot A - C \cdot C\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    9. sub-negate2N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\color{blue}{C \cdot C - A \cdot A}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    10. difference-of-squares-revN/A

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

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    14. lift-*.f64N/A

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\frac{\left(A + C\right) \cdot \left(\left(A + C\right) \cdot \left(C - A\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                    16. lower-/.f64N/A

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

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

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

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

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

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

                  if -0.0 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64)))

                  1. Initial program 58.2%

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\tan^{-1} \color{blue}{1} \cdot 180}{\pi} \]
                  7. Step-by-step derivation
                    1. Applied rewrites45.9%

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

                  Alternative 8: 77.1% 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{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right) \cdot 180}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right) \cdot 180}{\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)
                       (/ (* (atan (/ (- C (+ B A)) B)) 180.0) PI)
                       (if (<= t_0 0.0)
                         (* 180.0 (/ (atan (* -0.5 (/ B (- C A)))) PI))
                         (/ (* (atan (/ (- C (hypot B C)) B)) 180.0) 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 = (atan(((C - (B + A)) / B)) * 180.0) / ((double) M_PI);
                  	} else if (t_0 <= 0.0) {
                  		tmp = 180.0 * (atan((-0.5 * (B / (C - A)))) / ((double) M_PI));
                  	} else {
                  		tmp = (atan(((C - hypot(B, C)) / B)) * 180.0) / ((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 = (Math.atan(((C - (B + A)) / B)) * 180.0) / Math.PI;
                  	} else if (t_0 <= 0.0) {
                  		tmp = 180.0 * (Math.atan((-0.5 * (B / (C - A)))) / Math.PI);
                  	} else {
                  		tmp = (Math.atan(((C - Math.hypot(B, C)) / B)) * 180.0) / 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 = (math.atan(((C - (B + A)) / B)) * 180.0) / math.pi
                  	elif t_0 <= 0.0:
                  		tmp = 180.0 * (math.atan((-0.5 * (B / (C - A)))) / math.pi)
                  	else:
                  		tmp = (math.atan(((C - math.hypot(B, C)) / B)) * 180.0) / 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(atan(Float64(Float64(C - Float64(B + A)) / B)) * 180.0) / pi);
                  	elseif (t_0 <= 0.0)
                  		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / pi));
                  	else
                  		tmp = Float64(Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) * 180.0) / 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 = (atan(((C - (B + A)) / B)) * 180.0) / pi;
                  	elseif (t_0 <= 0.0)
                  		tmp = 180.0 * (atan((-0.5 * (B / (C - A)))) / pi);
                  	else
                  		tmp = (atan(((C - hypot(B, C)) / B)) * 180.0) / 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[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * 180.0), $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{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right) \cdot 180}{\pi}\\
                  
                  \mathbf{elif}\;t\_0 \leq 0:\\
                  \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right) \cdot 180}{\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 59.9%

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

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

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

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

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

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

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

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

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

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

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

                      1. Initial program 19.0%

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{{\left(A - C\right)}^{2}} + {B}^{2}}\right)\right)}{\pi} \]
                        3. 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)}{\pi} \]
                        4. lift--.f64N/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)}{\pi} \]
                        5. sub-negate2N/A

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

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(\mathsf{neg}\left(\left(C - A\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(C - A\right)}\right)\right) + {B}^{2}}\right)\right)}{\pi} \]
                        10. sqr-neg-revN/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(C - A\right)} + {B}^{2}}\right)\right)}{\pi} \]
                        11. lower-fma.f6419.0

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(C - A, C - A, {B}^{2}\right)}}\right)\right)}{\pi} \]
                        12. lift-pow.f64N/A

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, \color{blue}{B \cdot B}\right)}\right)\right)}{\pi} \]
                        14. lower-*.f6419.0

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, \color{blue}{B \cdot B}\right)}\right)\right)}{\pi} \]
                      3. Applied rewrites19.0%

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\left(A - C\right)\right)\right)} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        3. lift--.f64N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        4. lift--.f64N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        5. flip--N/A

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        7. distribute-neg-fracN/A

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{C \cdot C - A \cdot A}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        9. difference-of-squares-revN/A

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        13. lift-*.f64N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\left(A + C\right) \cdot \left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        14. lower-/.f6418.1

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        3. sub-negate2N/A

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        6. flip--N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{A \cdot A - C \cdot C}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        7. lift-+.f64N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        8. distribute-neg-fracN/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(A \cdot A - C \cdot C\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        9. sub-negate2N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\color{blue}{C \cdot C - A \cdot A}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        10. difference-of-squares-revN/A

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        14. lift-*.f64N/A

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\frac{\left(A + C\right) \cdot \left(\left(A + C\right) \cdot \left(C - A\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        16. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 9: 56.6% accurate, 2.5× speedup?

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

                      1. Initial program 23.7%

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{{\left(A - C\right)}^{2}} + {B}^{2}}\right)\right)}{\pi} \]
                        3. 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)}{\pi} \]
                        4. lift--.f64N/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)}{\pi} \]
                        5. sub-negate2N/A

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

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(\mathsf{neg}\left(\left(C - A\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(C - A\right)}\right)\right) + {B}^{2}}\right)\right)}{\pi} \]
                        10. sqr-neg-revN/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(C - A\right)} + {B}^{2}}\right)\right)}{\pi} \]
                        11. lower-fma.f6423.7

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(C - A, C - A, {B}^{2}\right)}}\right)\right)}{\pi} \]
                        12. lift-pow.f64N/A

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, \color{blue}{B \cdot B}\right)}\right)\right)}{\pi} \]
                      3. Applied rewrites23.7%

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\left(A - C\right)\right)\right)} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        3. lift--.f64N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        4. lift--.f64N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        5. flip--N/A

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right) - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        7. distribute-neg-fracN/A

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{C \cdot C - A \cdot A}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        9. difference-of-squares-revN/A

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        13. lift-*.f64N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\left(A + C\right) \cdot \left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        14. lower-/.f6419.9

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        3. sub-negate2N/A

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(A - C\right)}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        6. flip--N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{A \cdot A - C \cdot C}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        7. lift-+.f64N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \left(\mathsf{neg}\left(\frac{A \cdot A - C \cdot C}{\color{blue}{A + C}}\right)\right)}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        8. distribute-neg-fracN/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(A \cdot A - C \cdot C\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        9. sub-negate2N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\color{blue}{C \cdot C - A \cdot A}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        10. difference-of-squares-revN/A

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(A + C\right) \cdot \frac{\left(A + C\right) \cdot \color{blue}{\left(C - A\right)}}{A + C}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        14. lift-*.f64N/A

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\color{blue}{\frac{\left(A + C\right) \cdot \left(\left(A + C\right) \cdot \left(C - A\right)\right)}{A + C}}}{A + C} - \sqrt{\mathsf{fma}\left(C - A, C - A, B \cdot B\right)}\right)\right)}{\pi} \]
                        16. lower-/.f64N/A

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

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

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

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

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

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

                      if -9.50000000000000038e23 < A < 5.2999999999999999e44

                      1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

                        if 5.2999999999999999e44 < A

                        1. Initial program 77.4%

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{\tan^{-1} \left(\frac{\color{blue}{-2 \cdot A}}{B}\right) \cdot 180}{\pi} \]
                        7. Step-by-step derivation
                          1. lower-*.f6470.6

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

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

                      Alternative 10: 60.1% accurate, 2.5× speedup?

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

                        1. Initial program 47.3%

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{\tan^{-1} \color{blue}{1} \cdot 180}{\pi} \]
                        7. Step-by-step derivation
                          1. Applied rewrites66.5%

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

                          if -1.79999999999999998e40 < B

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

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

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

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

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

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

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

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

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

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

                          Alternative 11: 51.6% accurate, 2.6× speedup?

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\tan^{-1} \color{blue}{1} \cdot 180}{\pi} \]
                            7. Step-by-step derivation
                              1. Applied rewrites60.5%

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

                              if -2.40000000000000002e-27 < B

                              1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

                              Alternative 12: 40.8% accurate, 2.9× speedup?

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

                                1. Initial program 53.1%

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{\tan^{-1} \color{blue}{1} \cdot 180}{\pi} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites40.7%

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

                                  if -3.999999999999988e-310 < B

                                  1. Initial program 54.1%

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{\tan^{-1} \color{blue}{-1} \cdot 180}{\pi} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites40.9%

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

                                  Alternative 13: 21.5% accurate, 3.1× speedup?

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{\tan^{-1} \color{blue}{-1} \cdot 180}{\pi} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites21.5%

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

                                    Reproduce

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