ABCF->ab-angle angle

Percentage Accurate: 53.9% → 80.7%
Time: 5.1s
Alternatives: 15
Speedup: 1.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 15 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.9% 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: 80.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;C \leq 6.5 \cdot 10^{+42}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right)\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, -0.5, 0\right)\right)}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 6.50000000000000052e42

    1. Initial program 62.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-sqrt.f64N/A

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

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

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

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

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

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

    if 6.50000000000000052e42 < C

    1. Initial program 23.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, -1 \cdot \frac{0 \cdot A}{B}\right)\right)}{\pi} \]
      7. associate-*r/N/A

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0 \cdot A}{B}\right)\right)}{\pi} \]
      12. mul0-lft69.7

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0}{B}\right)\right)}{\mathsf{PI}\left(\right)}} \]
    8. Applied rewrites69.7%

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

Alternative 2: 80.6% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(-A\right) + C\\ \mathbf{if}\;C \leq 6.5 \cdot 10^{+42}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{t\_0 - \mathsf{hypot}\left(t\_0, B\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, -0.5, 0\right)\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (+ (- A) C)))
   (if (<= C 6.5e+42)
     (* 180.0 (/ (atan (/ (- t_0 (hypot t_0 B)) B)) PI))
     (/ (* 180.0 (atan (fma (/ B C) -0.5 0.0))) PI))))
double code(double A, double B, double C) {
	double t_0 = -A + C;
	double tmp;
	if (C <= 6.5e+42) {
		tmp = 180.0 * (atan(((t_0 - hypot(t_0, B)) / B)) / ((double) M_PI));
	} else {
		tmp = (180.0 * atan(fma((B / C), -0.5, 0.0))) / ((double) M_PI);
	}
	return tmp;
}
function code(A, B, C)
	t_0 = Float64(Float64(-A) + C)
	tmp = 0.0
	if (C <= 6.5e+42)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(t_0 - hypot(t_0, B)) / B)) / pi));
	else
		tmp = Float64(Float64(180.0 * atan(fma(Float64(B / C), -0.5, 0.0))) / pi);
	end
	return tmp
end
code[A_, B_, C_] := Block[{t$95$0 = N[((-A) + C), $MachinePrecision]}, If[LessEqual[C, 6.5e+42], N[(180.0 * N[(N[ArcTan[N[(N[(t$95$0 - N[Sqrt[t$95$0 ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5 + 0.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, -0.5, 0\right)\right)}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 6.50000000000000052e42

    1. Initial program 62.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. Taylor expanded in A around -inf

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

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

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

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

    if 6.50000000000000052e42 < C

    1. Initial program 23.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, -1 \cdot \frac{0 \cdot A}{B}\right)\right)}{\pi} \]
      7. associate-*r/N/A

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0 \cdot A}{B}\right)\right)}{\pi} \]
      12. mul0-lft69.7

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0}{B}\right)\right)}{\mathsf{PI}\left(\right)}} \]
    8. Applied rewrites69.7%

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

Alternative 3: 79.1% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 12.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. Taylor expanded in A around -inf

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180 \]
      5. pow279.9

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

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

    if -5.4999999999999997e143 < A

    1. Initial program 59.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-sqrt.f64N/A

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

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

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

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

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

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

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

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

    Alternative 4: 75.2% accurate, 1.4× speedup?

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

      1. Initial program 12.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. Taylor expanded in A around -inf

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

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

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

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

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

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

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

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

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

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

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

      if -2.4000000000000002e146 < A < 1.1200000000000001e29

      1. Initial program 53.1%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \mathsf{hypot}\left(\mathsf{neg}\left(C\right), B\right)\right)\right)}{\pi} \]
          2. lower-neg.f6472.2

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

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

        if 1.1200000000000001e29 < A

        1. Initial program 78.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. Taylor expanded in B around inf

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

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

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

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

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

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

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

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

          1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

            1. Initial program 19.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. Taylor expanded in A around -inf

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 58.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right) \cdot 180}{\pi} \]
            12. Applied rewrites75.1%

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

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

            1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 19.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. Taylor expanded in A around -inf

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 58.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right) \cdot 180}{\pi} \]
                12. Applied rewrites75.1%

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

              Alternative 7: 63.3% accurate, 0.3× 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(1 + \frac{C - A}{B}\right) \cdot 180}{\pi}\\ \mathbf{if}\;t\_0 \leq -50:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq -40:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\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 (+ 1.0 (/ (- C A) B))) 180.0) PI)))
                 (if (<= t_0 -50.0)
                   t_1
                   (if (<= t_0 -40.0)
                     (* 180.0 (/ (atan -1.0) PI))
                     (if (<= t_0 0.0) (/ (* 180.0 (atan (* (/ B A) 0.5))) 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((1.0 + ((C - A) / B))) * 180.0) / ((double) M_PI);
              	double tmp;
              	if (t_0 <= -50.0) {
              		tmp = t_1;
              	} else if (t_0 <= -40.0) {
              		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
              	} else if (t_0 <= 0.0) {
              		tmp = (180.0 * atan(((B / A) * 0.5))) / ((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((1.0 + ((C - A) / B))) * 180.0) / Math.PI;
              	double tmp;
              	if (t_0 <= -50.0) {
              		tmp = t_1;
              	} else if (t_0 <= -40.0) {
              		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
              	} else if (t_0 <= 0.0) {
              		tmp = (180.0 * Math.atan(((B / A) * 0.5))) / 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((1.0 + ((C - A) / B))) * 180.0) / math.pi
              	tmp = 0
              	if t_0 <= -50.0:
              		tmp = t_1
              	elif t_0 <= -40.0:
              		tmp = 180.0 * (math.atan(-1.0) / math.pi)
              	elif t_0 <= 0.0:
              		tmp = (180.0 * math.atan(((B / A) * 0.5))) / 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(1.0 + Float64(Float64(C - A) / B))) * 180.0) / pi)
              	tmp = 0.0
              	if (t_0 <= -50.0)
              		tmp = t_1;
              	elseif (t_0 <= -40.0)
              		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
              	elseif (t_0 <= 0.0)
              		tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / A) * 0.5))) / 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((1.0 + ((C - A) / B))) * 180.0) / pi;
              	tmp = 0.0;
              	if (t_0 <= -50.0)
              		tmp = t_1;
              	elseif (t_0 <= -40.0)
              		tmp = 180.0 * (atan(-1.0) / pi);
              	elseif (t_0 <= 0.0)
              		tmp = (180.0 * atan(((B / A) * 0.5))) / 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[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[t$95$0, -50.0], t$95$1, If[LessEqual[t$95$0, -40.0], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(180.0 * N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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(1 + \frac{C - A}{B}\right) \cdot 180}{\pi}\\
              \mathbf{if}\;t\_0 \leq -50:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t\_0 \leq -40:\\
              \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
              
              \mathbf{elif}\;t\_0 \leq 0:\\
              \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \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))) < -50 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 56.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. Taylor expanded in A around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -50 < (*.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 99.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. Taylor expanded in B around inf

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

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

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

                  1. Initial program 19.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. Taylor expanded in A around -inf

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

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

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

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

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

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

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

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

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

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

                Alternative 8: 48.6% accurate, 1.8× speedup?

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

                  1. Initial program 72.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. Taylor expanded in A around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\tan^{-1} \left(\frac{C + C}{B}\right) \cdot 180}{\pi} \]
                    4. lower-+.f6458.4

                      \[\leadsto \frac{\tan^{-1} \left(\frac{C + C}{B}\right) \cdot 180}{\pi} \]
                  12. Applied rewrites58.4%

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

                  if -3.80000000000000002e-109 < C < -1.1999999999999999e-189

                  1. Initial program 63.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. Taylor expanded in B around -inf

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

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

                    if -1.1999999999999999e-189 < C < 2.44999999999999999e-109

                    1. Initial program 57.0%

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2.44999999999999999e-109 < C

                    1. Initial program 31.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-sqrt.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, -1 \cdot \frac{0 \cdot A}{B}\right)\right)}{\pi} \]
                      7. associate-*r/N/A

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

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

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

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

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0 \cdot A}{B}\right)\right)}{\pi} \]
                      12. mul0-lft58.1

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

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

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

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

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

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

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

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

                  Alternative 9: 48.6% accurate, 2.0× speedup?

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

                    1. Initial program 72.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. Taylor expanded in A around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\tan^{-1} \left(\frac{C + C}{B}\right) \cdot 180}{\pi} \]
                      4. lower-+.f6458.4

                        \[\leadsto \frac{\tan^{-1} \left(\frac{C + C}{B}\right) \cdot 180}{\pi} \]
                    12. Applied rewrites58.4%

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

                    if -3.80000000000000002e-109 < C < -1.1999999999999999e-189

                    1. Initial program 63.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. Taylor expanded in B around -inf

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

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

                      if -1.1999999999999999e-189 < C < 2.44999999999999999e-109

                      1. Initial program 57.0%

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

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

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

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

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

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

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

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

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

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

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

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

                      if 2.44999999999999999e-109 < C

                      1. Initial program 31.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-sqrt.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, -1 \cdot \frac{0 \cdot A}{B}\right)\right)}{\pi} \]
                        7. associate-*r/N/A

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

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0 \cdot A}{B}\right)\right)}{\pi} \]
                        12. mul0-lft58.1

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

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

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

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

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

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

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

                    Alternative 10: 48.6% accurate, 0.4× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{+44}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C + C}{B}\right) \cdot 180}{\pi}\\ \mathbf{elif}\;t\_0 \leq -0.5:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\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 -2e+44)
                         (/ (* (atan (/ (+ C C) B)) 180.0) PI)
                         (if (<= t_0 -0.5)
                           (* 180.0 (/ (atan -1.0) PI))
                           (if (<= t_0 0.0)
                             (* (/ (atan (* (/ B A) 0.5)) PI) 180.0)
                             (* 180.0 (/ (atan 1.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 <= -2e+44) {
                    		tmp = (atan(((C + C) / B)) * 180.0) / ((double) M_PI);
                    	} else if (t_0 <= -0.5) {
                    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
                    	} else if (t_0 <= 0.0) {
                    		tmp = (atan(((B / A) * 0.5)) / ((double) M_PI)) * 180.0;
                    	} else {
                    		tmp = 180.0 * (atan(1.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 <= -2e+44) {
                    		tmp = (Math.atan(((C + C) / B)) * 180.0) / Math.PI;
                    	} else if (t_0 <= -0.5) {
                    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
                    	} else if (t_0 <= 0.0) {
                    		tmp = (Math.atan(((B / A) * 0.5)) / Math.PI) * 180.0;
                    	} else {
                    		tmp = 180.0 * (Math.atan(1.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 <= -2e+44:
                    		tmp = (math.atan(((C + C) / B)) * 180.0) / math.pi
                    	elif t_0 <= -0.5:
                    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
                    	elif t_0 <= 0.0:
                    		tmp = (math.atan(((B / A) * 0.5)) / math.pi) * 180.0
                    	else:
                    		tmp = 180.0 * (math.atan(1.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 <= -2e+44)
                    		tmp = Float64(Float64(atan(Float64(Float64(C + C) / B)) * 180.0) / pi);
                    	elseif (t_0 <= -0.5)
                    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
                    	elseif (t_0 <= 0.0)
                    		tmp = Float64(Float64(atan(Float64(Float64(B / A) * 0.5)) / pi) * 180.0);
                    	else
                    		tmp = Float64(180.0 * Float64(atan(1.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 <= -2e+44)
                    		tmp = (atan(((C + C) / B)) * 180.0) / pi;
                    	elseif (t_0 <= -0.5)
                    		tmp = 180.0 * (atan(-1.0) / pi);
                    	elseif (t_0 <= 0.0)
                    		tmp = (atan(((B / A) * 0.5)) / pi) * 180.0;
                    	else
                    		tmp = 180.0 * (atan(1.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, -2e+44], N[(N[(N[ArcTan[N[(N[(C + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, -0.5], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
                    \mathbf{if}\;t\_0 \leq -2 \cdot 10^{+44}:\\
                    \;\;\;\;\frac{\tan^{-1} \left(\frac{C + C}{B}\right) \cdot 180}{\pi}\\
                    
                    \mathbf{elif}\;t\_0 \leq -0.5:\\
                    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
                    
                    \mathbf{elif}\;t\_0 \leq 0:\\
                    \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 4 regimes
                    2. if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -2.0000000000000002e44

                      1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{\tan^{-1} \left(\frac{C + C}{B}\right) \cdot 180}{\pi} \]
                        4. lower-+.f6430.0

                          \[\leadsto \frac{\tan^{-1} \left(\frac{C + C}{B}\right) \cdot 180}{\pi} \]
                      12. Applied rewrites30.0%

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

                      if -2.0000000000000002e44 < (*.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 97.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. Taylor expanded in B around inf

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

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

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

                        1. Initial program 19.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. Taylor expanded in A around -inf

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180 \]
                          5. pow250.7

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

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

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

                        1. Initial program 58.2%

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

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

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

                        Alternative 11: 46.9% accurate, 2.2× speedup?

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

                          1. Initial program 38.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. Taylor expanded in A around -inf

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180 \]
                            5. pow249.0

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

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

                          if -4.79999999999999987e-286 < A < 4.5999999999999998e-125

                          1. Initial program 58.2%

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

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

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

                            if 4.5999999999999998e-125 < A

                            1. Initial program 72.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. Taylor expanded in A around inf

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 12: 44.7% accurate, 2.2× speedup?

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

                            1. Initial program 48.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. Taylor expanded in B around -inf

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

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

                              if -1100 < B < 1.35999999999999999e-65

                              1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{\tan^{-1} \left(\frac{C + C}{B}\right) \cdot 180}{\pi} \]
                                4. lower-+.f6432.5

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

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

                              if 1.35999999999999999e-65 < B

                              1. Initial program 50.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. Taylor expanded in B around inf

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

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

                              Alternative 13: 43.7% accurate, 2.8× speedup?

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

                                1. Initial program 51.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. Taylor expanded in B around -inf

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

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

                                  if -1.25000000000000001e-126 < B < 7.50000000000000042e-189

                                  1. Initial program 60.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-sqrt.f64N/A

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

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

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

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

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

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

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

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

                                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \frac{0 \cdot A}{B}\right)}{\pi} \]
                                    3. associate-*r/N/A

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

                                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1 \cdot 0}{B}\right)}{\pi} \]
                                    5. metadata-evalN/A

                                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi} \]
                                    6. mul0-lftN/A

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

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

                                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi} \]
                                  6. Applied rewrites31.4%

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

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

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

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

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

                                      \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\mathsf{PI}\left(\right)}} \]
                                  8. Applied rewrites31.4%

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

                                  if 7.50000000000000042e-189 < B

                                  1. Initial program 52.2%

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

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

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

                                  Alternative 14: 40.0% accurate, 3.3× speedup?

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

                                    1. Initial program 53.2%

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

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

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

                                      if -4.999999999999985e-310 < B

                                      1. Initial program 54.5%

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

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

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

                                      Alternative 15: 21.0% accurate, 4.1× speedup?

                                      \[\begin{array}{l} \\ 180 \cdot \frac{\tan^{-1} -1}{\pi} \end{array} \]
                                      (FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
                                      double code(double A, double B, double C) {
                                      	return 180.0 * (atan(-1.0) / ((double) M_PI));
                                      }
                                      
                                      public static double code(double A, double B, double C) {
                                      	return 180.0 * (Math.atan(-1.0) / Math.PI);
                                      }
                                      
                                      def code(A, B, C):
                                      	return 180.0 * (math.atan(-1.0) / math.pi)
                                      
                                      function code(A, B, C)
                                      	return Float64(180.0 * Float64(atan(-1.0) / pi))
                                      end
                                      
                                      function tmp = code(A, B, C)
                                      	tmp = 180.0 * (atan(-1.0) / pi);
                                      end
                                      
                                      code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      180 \cdot \frac{\tan^{-1} -1}{\pi}
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 53.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. Taylor expanded in B around inf

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

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

                                        Reproduce

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