ABCF->ab-angle angle

Percentage Accurate: 53.3% → 81.8%
Time: 7.0s
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.3% 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: 81.8% 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 -10:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{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 -10.0)
     t_1
     (if (<= t_0 0.0) (* 180.0 (/ (atan (* 0.5 (/ B 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 <= -10.0) {
		tmp = t_1;
	} else if (t_0 <= 0.0) {
		tmp = 180.0 * (atan((0.5 * (B / 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 <= -10.0) {
		tmp = t_1;
	} else if (t_0 <= 0.0) {
		tmp = 180.0 * (Math.atan((0.5 * (B / 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 <= -10.0:
		tmp = t_1
	elif t_0 <= 0.0:
		tmp = 180.0 * (math.atan((0.5 * (B / 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 <= -10.0)
		tmp = t_1;
	elseif (t_0 <= 0.0)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / 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 <= -10.0)
		tmp = t_1;
	elseif (t_0 <= 0.0)
		tmp = 180.0 * (atan((0.5 * (B / 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, -10.0], t$95$1, 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], 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 -10:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{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))) < -10 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 58.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 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}} \]

    if -10 < (*.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.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 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. lower-fma.f6418.2

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(A - C, A - C, 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
      2. flip--N/A

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\frac{C \cdot C - A \cdot A}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
      6. difference-of-squaresN/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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
      7. +-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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
      8. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
      9. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
      10. lower-*.f6416.8

        \[\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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
    5. Applied rewrites16.8%

      \[\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(A - C, A - C, 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(\color{blue}{\frac{\left(A + C\right) \cdot \left(C - A\right)}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
      2. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
      3. associate-/l*N/A

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(\color{blue}{\left(A + C\right)} \cdot \left(A - C\right)\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, 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(\left(A + C\right) \cdot \color{blue}{\left(A - C\right)}\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
      13. lower-*.f64N/A

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\frac{\left(\left(A + C\right) \cdot \left(A - C\right)\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)}} - \sqrt{\mathsf{fma}\left(A - C, A - C, 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-/.f6449.8

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

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

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

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

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


\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 60.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 rewrites87.4%

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

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

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

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

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

      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 18.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 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. lower-fma.f6418.2

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(A - C, A - C, 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
        2. flip--N/A

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\frac{C \cdot C - A \cdot A}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
        6. difference-of-squaresN/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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
        7. +-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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
        8. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
        9. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
        10. lower-*.f6416.8

          \[\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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
      5. Applied rewrites16.8%

        \[\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(A - C, A - C, 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(\color{blue}{\frac{\left(A + C\right) \cdot \left(C - A\right)}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
        2. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
        3. associate-/l*N/A

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

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(\color{blue}{\left(A + C\right)} \cdot \left(A - C\right)\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, 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(\left(A + C\right) \cdot \color{blue}{\left(A - C\right)}\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
        13. lower-*.f64N/A

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\frac{\left(\left(A + C\right) \cdot \left(A - C\right)\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)}} - \sqrt{\mathsf{fma}\left(A - C, A - C, 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-/.f6449.8

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{\color{blue}{A}}\right)}{\pi} \]
      10. Applied rewrites49.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 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 rewrites86.1%

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

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

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

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

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

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

    Alternative 3: 67.2% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\ \mathbf{if}\;t\_0 \leq -0.5:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\ \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} \left(\frac{C - -1 \cdot B}{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)
         (* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))
         (if (<= t_0 0.0)
           (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
           (/ (* (atan (/ (- C (* -1.0 B)) 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 = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
    	} else if (t_0 <= 0.0) {
    		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
    	} else {
    		tmp = (atan(((C - (-1.0 * B)) / 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 = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
    	} else if (t_0 <= 0.0) {
    		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
    	} else {
    		tmp = (Math.atan(((C - (-1.0 * B)) / 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 = (180.0 / math.pi) * math.atan(((C - (B + A)) / B))
    	elif t_0 <= 0.0:
    		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
    	else:
    		tmp = (math.atan(((C - (-1.0 * B)) / 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(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B)));
    	elseif (t_0 <= 0.0)
    		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
    	else
    		tmp = Float64(Float64(atan(Float64(Float64(C - Float64(-1.0 * B)) / 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 = (180.0 / pi) * atan(((C - (B + A)) / B));
    	elseif (t_0 <= 0.0)
    		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
    	else
    		tmp = (atan(((C - (-1.0 * B)) / 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[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $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[N[(N[(C - N[(-1.0 * B), $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{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
    
    \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} \left(\frac{C - -1 \cdot B}{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 60.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 rewrites87.4%

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

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

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

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

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

        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 18.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 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. lower-fma.f6418.2

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(A - C, A - C, 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
          2. flip--N/A

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\frac{C \cdot C - A \cdot A}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
          6. difference-of-squaresN/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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
          7. +-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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
          8. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
          9. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
          10. lower-*.f6416.8

            \[\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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
        5. Applied rewrites16.8%

          \[\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(A - C, A - C, 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(\color{blue}{\frac{\left(A + C\right) \cdot \left(C - A\right)}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
          2. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
          3. associate-/l*N/A

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

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

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(\color{blue}{\left(A + C\right)} \cdot \left(A - C\right)\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, 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(\left(A + C\right) \cdot \color{blue}{\left(A - C\right)}\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
          13. lower-*.f64N/A

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\frac{\left(\left(A + C\right) \cdot \left(A - C\right)\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)}} - \sqrt{\mathsf{fma}\left(A - C, A - C, 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-/.f6449.8

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

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

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

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

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

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

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

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

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

      Alternative 4: 79.0% accurate, 1.5× speedup?

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

        1. Initial program 9.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 rewrites54.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 rewrites18.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)} \cdot 180}{\pi} \]
        8. 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-/.f6485.6

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

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

        if -4.6000000000000002e195 < A

        1. Initial program 57.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 rewrites80.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 rewrites78.3%

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

      Alternative 5: 79.0% accurate, 1.5× speedup?

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

        1. Initial program 9.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 rewrites54.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 rewrites18.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)} \cdot 180}{\pi} \]
        8. 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-/.f6485.6

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

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

        if -4.6000000000000002e195 < A

        1. Initial program 57.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 rewrites80.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 rewrites78.3%

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

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

      Alternative 6: 76.3% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;C \leq 7 \cdot 10^{+91}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(\mathsf{hypot}\left(A, B\right) + A\right)}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B}, -0.5 \cdot \frac{B}{C}\right)\right)\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (if (<= C 7e+91)
         (* (/ 180.0 PI) (atan (/ (- C (+ (hypot A B) A)) B)))
         (* (/ 180.0 PI) (atan (fma -1.0 (/ (+ A (* -1.0 A)) B) (* -0.5 (/ B C)))))))
      double code(double A, double B, double C) {
      	double tmp;
      	if (C <= 7e+91) {
      		tmp = (180.0 / ((double) M_PI)) * atan(((C - (hypot(A, B) + A)) / B));
      	} else {
      		tmp = (180.0 / ((double) M_PI)) * atan(fma(-1.0, ((A + (-1.0 * A)) / B), (-0.5 * (B / C))));
      	}
      	return tmp;
      }
      
      function code(A, B, C)
      	tmp = 0.0
      	if (C <= 7e+91)
      		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(hypot(A, B) + A)) / B)));
      	else
      		tmp = Float64(Float64(180.0 / pi) * atan(fma(-1.0, Float64(Float64(A + Float64(-1.0 * A)) / B), Float64(-0.5 * Float64(B / C)))));
      	end
      	return tmp
      end
      
      code[A_, B_, C_] := If[LessEqual[C, 7e+91], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision] + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 * N[(N[(A + N[(-1.0 * A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;C \leq 7 \cdot 10^{+91}:\\
      \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(\mathsf{hypot}\left(A, B\right) + A\right)}{B}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B}, -0.5 \cdot \frac{B}{C}\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if C < 7.00000000000000001e91

        1. Initial program 60.8%

          \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
        2. Step-by-step derivation
          1. 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 rewrites77.5%

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

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

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

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

          if 7.00000000000000001e91 < C

          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 \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 rewrites53.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 rewrites50.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} \]
          5. Applied rewrites50.5%

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

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

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

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

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

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

              \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B}, \frac{-1}{2} \cdot \frac{B}{C}\right)\right) \]
            6. lower-/.f6476.0

              \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B}, -0.5 \cdot \frac{B}{C}\right)\right) \]
          8. Applied rewrites76.0%

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

        Alternative 7: 56.6% accurate, 2.5× speedup?

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

          1. Initial program 29.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 rewrites60.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 rewrites45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)} \cdot 180}{\pi} \]
          8. 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-/.f6458.1

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

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

          if -9.5000000000000005e-77 < A < 1.02e43

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

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

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

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

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

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

            if 1.02e43 < A

            1. Initial program 77.3%

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

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(A - C, A - C, 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              2. flip--N/A

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\frac{C \cdot C - A \cdot A}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              6. difference-of-squaresN/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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              7. +-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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              8. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              9. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              10. lower-*.f6476.7

                \[\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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
            5. Applied rewrites76.7%

              \[\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(A - C, A - C, 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(\color{blue}{\frac{\left(A + C\right) \cdot \left(C - A\right)}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              2. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              3. associate-/l*N/A

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

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

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

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(\color{blue}{\left(A + C\right)} \cdot \left(A - C\right)\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, 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(\left(A + C\right) \cdot \color{blue}{\left(A - C\right)}\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              13. lower-*.f64N/A

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

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

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

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

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

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

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

          Alternative 8: 56.6% accurate, 2.5× speedup?

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

            1. Initial program 29.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 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. lower-fma.f6429.6

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(A - C, A - C, 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              2. flip--N/A

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\frac{C \cdot C - A \cdot A}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              6. difference-of-squaresN/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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              7. +-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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              8. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              9. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              10. lower-*.f6426.6

                \[\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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
            5. Applied rewrites26.6%

              \[\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(A - C, A - C, 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(\color{blue}{\frac{\left(A + C\right) \cdot \left(C - A\right)}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              2. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              3. associate-/l*N/A

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

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

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

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(\color{blue}{\left(A + C\right)} \cdot \left(A - C\right)\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, 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(\left(A + C\right) \cdot \color{blue}{\left(A - C\right)}\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              13. lower-*.f64N/A

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\frac{\left(\left(A + C\right) \cdot \left(A - C\right)\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)}} - \sqrt{\mathsf{fma}\left(A - C, A - C, 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-/.f6458.1

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

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

            if -9.5000000000000005e-77 < A < 1.02e43

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

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

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

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

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

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

              if 1.02e43 < A

              1. Initial program 77.3%

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(A - C, A - C, 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                2. flip--N/A

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

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\frac{C \cdot C - A \cdot A}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                6. difference-of-squaresN/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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                7. +-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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                8. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                9. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                10. lower-*.f6476.7

                  \[\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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
              5. Applied rewrites76.7%

                \[\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(A - C, A - C, 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(\color{blue}{\frac{\left(A + C\right) \cdot \left(C - A\right)}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                2. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                3. associate-/l*N/A

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

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

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

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

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

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

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(\color{blue}{\left(A + C\right)} \cdot \left(A - C\right)\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, 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(\left(A + C\right) \cdot \color{blue}{\left(A - C\right)}\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                13. lower-*.f64N/A

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

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

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

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

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

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

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

            Alternative 9: 50.8% accurate, 2.5× speedup?

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

              1. Initial program 46.5%

                \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
              2. Step-by-step derivation
                1. 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.9%

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

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

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

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

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

                if -2.30000000000000014e-11 < B < 4.99999999999999989e-257

                1. Initial program 59.4%

                  \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
                2. 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. lower-fma.f6459.4

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

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

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\mathsf{fma}\left(A - C, A - C, 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                  2. flip--N/A

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

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\color{blue}{\frac{C \cdot C - A \cdot A}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                  6. difference-of-squaresN/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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                  7. +-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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                  8. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                  9. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                  10. lower-*.f6457.2

                    \[\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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                5. Applied rewrites57.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(A - C, A - C, 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(\color{blue}{\frac{\left(A + C\right) \cdot \left(C - A\right)}{A + C}} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                  2. 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(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                  3. associate-/l*N/A

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

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

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

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

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

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

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\frac{\left(\color{blue}{\left(A + C\right)} \cdot \left(A - C\right)\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, 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(\left(A + C\right) \cdot \color{blue}{\left(A - C\right)}\right) \cdot \left(C - A\right)}{\left(A - C\right) \cdot \left(A + C\right)} - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}\right)\right)}{\pi} \]
                  13. lower-*.f64N/A

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

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

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

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

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

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

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

                if 4.99999999999999989e-257 < B

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

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

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

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

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

                Alternative 10: 60.3% accurate, 2.5× speedup?

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

                  1. Initial program 46.5%

                    \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
                  2. Step-by-step derivation
                    1. 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.9%

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

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

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

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

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

                    if -5.00000000000000018e-11 < B

                    1. Initial program 55.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.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 rewrites70.9%

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

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

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

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

                    Alternative 11: 51.4% accurate, 2.6× speedup?

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

                      1. Initial program 49.5%

                        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
                      2. 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 rewrites75.4%

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

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

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

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

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

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

                        if -3.3999999999999999e-127 < 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 rewrites79.1%

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

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

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

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

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

                        Alternative 12: 39.9% accurate, 2.9× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -2.9 \cdot 10^{-305}:\\ \;\;\;\;\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 -2.9e-305)
                           (/ (* (atan 1.0) 180.0) PI)
                           (/ (* (atan -1.0) 180.0) PI)))
                        double code(double A, double B, double C) {
                        	double tmp;
                        	if (B <= -2.9e-305) {
                        		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 <= -2.9e-305) {
                        		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 <= -2.9e-305:
                        		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 <= -2.9e-305)
                        		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 <= -2.9e-305)
                        		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, -2.9e-305], 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 -2.9 \cdot 10^{-305}:\\
                        \;\;\;\;\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 < -2.89999999999999988e-305

                          1. Initial program 52.0%

                            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
                          2. 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.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 rewrites71.8%

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

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

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

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

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

                            if -2.89999999999999988e-305 < B

                            1. Initial program 54.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 rewrites78.6%

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

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

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

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

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

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

                            Alternative 13: 21.0% 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.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 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 rewrites72.7%

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

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

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

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

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

                              Reproduce

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