ABCF->ab-angle angle

Percentage Accurate: 54.1% → 81.8%
Time: 5.7s
Alternatives: 13
Speedup: 2.2×

Specification

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 54.1% accurate, 1.0× speedup?

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

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

Alternative 1: 81.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;C \leq 6.6 \cdot 10^{+51}:\\
\;\;\;\;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}:\\
\;\;\;\;\left(\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, -0.5, 0\right)\right) \cdot 180\right) \cdot \frac{1}{\pi}\\


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

    1. Initial program 62.8%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Step-by-step derivation
      1. lift-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-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} \]
      4. 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)}^{2} + \color{blue}{{B}^{2}}}\right)\right)}{\pi} \]
      5. lower-+.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} \]
      6. 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} \]
      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--.f6484.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 rewrites84.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} \]

    if 6.5999999999999994e51 < C

    1. Initial program 21.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. 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} \]
    3. 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. mul-1-negN/A

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, -\frac{\left(-1 + 1\right) \cdot A}{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 \cdot A}{B}\right)\right)}{\pi} \]
      10. lower-*.f6470.6

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

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

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

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0}{B}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
      2. lift-/.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)}} \]
      3. mult-flipN/A

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

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

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

Alternative 2: 81.1% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 62.8%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Step-by-step derivation
      1. lift-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-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} \]
      4. 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)}^{2} + \color{blue}{{B}^{2}}}\right)\right)}{\pi} \]
      5. lower-+.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} \]
      6. 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} \]
      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--.f6484.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 rewrites84.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 A around inf

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

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

      if 6.5999999999999994e51 < C

      1. Initial program 21.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. 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} \]
      3. 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. mul-1-negN/A

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, -\frac{\left(-1 + 1\right) \cdot A}{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 \cdot A}{B}\right)\right)}{\pi} \]
        10. lower-*.f6470.6

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0}{B}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
        2. lift-/.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)}} \]
        3. mult-flipN/A

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

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

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

    Alternative 3: 79.5% accurate, 1.5× speedup?

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

      1. Initial program 78.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} \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} \]

        if -0.0027000000000000001 < C < 6.5999999999999994e51

        1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 6.5999999999999994e51 < C

        1. Initial program 21.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. 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} \]
        3. 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. mul-1-negN/A

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, -\frac{\left(-1 + 1\right) \cdot A}{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 \cdot A}{B}\right)\right)}{\pi} \]
          10. lower-*.f6470.6

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

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

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

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

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

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0}{B}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
          2. lift-/.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)}} \]
          3. mult-flipN/A

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

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

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

      Alternative 4: 76.8% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -92:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\ \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 -92.0)
         (* 180.0 (/ (atan (* (/ B A) 0.5)) PI))
         (* 180.0 (/ (atan (* (/ 1.0 B) (- C (hypot (- A C) B)))) PI))))
      double code(double A, double B, double C) {
      	double tmp;
      	if (A <= -92.0) {
      		tmp = 180.0 * (atan(((B / A) * 0.5)) / ((double) M_PI));
      	} 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 <= -92.0) {
      		tmp = 180.0 * (Math.atan(((B / A) * 0.5)) / Math.PI);
      	} 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 <= -92.0:
      		tmp = 180.0 * (math.atan(((B / A) * 0.5)) / math.pi)
      	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 <= -92.0)
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / A) * 0.5)) / pi));
      	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 <= -92.0)
      		tmp = 180.0 * (atan(((B / A) * 0.5)) / pi);
      	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, -92.0], N[(180.0 * N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $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 -92:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
      
      \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 < -92

        1. Initial program 26.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-/.f6464.8

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

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

        if -92 < A

        1. Initial program 63.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-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} \]
          4. 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)}^{2} + \color{blue}{{B}^{2}}}\right)\right)}{\pi} \]
          5. lower-+.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} \]
          6. 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} \]
          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--.f6485.3

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

          \[\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 rewrites84.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} \]
        6. Recombined 2 regimes into one program.
        7. Add Preprocessing

        Alternative 5: 61.7% accurate, 2.1× speedup?

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

          1. Initial program 62.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} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \color{blue}{B}\right)\right)}{\pi} \]
          3. Step-by-step derivation
            1. Applied rewrites59.5%

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

            if 3.8e48 < C

            1. Initial program 21.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 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} \]
            3. 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. mul-1-negN/A

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, -\frac{\left(-1 + 1\right) \cdot A}{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 \cdot A}{B}\right)\right)}{\pi} \]
              10. lower-*.f6470.1

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

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

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

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

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

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

                \[\leadsto \frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0}{B}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
              2. lift-/.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)}} \]
              3. mult-flipN/A

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

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

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

          Alternative 6: 57.3% accurate, 1.9× speedup?

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

            1. Initial program 84.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 C around -inf

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

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

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

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

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

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

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

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

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

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

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

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

            if -3.6000000000000003e122 < C < 6.5999999999999994e51

            1. Initial program 57.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 C around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1 \cdot A}{B} - 1\right)}{\pi} \]
              3. mul-1-negN/A

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\mathsf{neg}\left(A\right)}{B} - 1\right)}{\pi} \]
              5. lower-neg.f6447.2

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

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

            if 6.5999999999999994e51 < C

            1. Initial program 21.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. 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} \]
            3. 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. mul-1-negN/A

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, -\frac{\left(-1 + 1\right) \cdot A}{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 \cdot A}{B}\right)\right)}{\pi} \]
              10. lower-*.f6470.6

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

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

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

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

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

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

                \[\leadsto \frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0}{B}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
              2. lift-/.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)}} \]
              3. mult-flipN/A

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

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

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

          Alternative 7: 57.3% accurate, 2.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;C \leq -3.6 \cdot 10^{+122}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C + C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 6.6 \cdot 10^{+51}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B} - 1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\ \end{array} \end{array} \]
          (FPCore (A B C)
           :precision binary64
           (if (<= C -3.6e+122)
             (/ (* 180.0 (atan (/ (+ C C) B))) PI)
             (if (<= C 6.6e+51)
               (* 180.0 (/ (atan (- (/ (- A) B) 1.0)) PI))
               (/ (* 180.0 (atan (* (/ B C) -0.5))) PI))))
          double code(double A, double B, double C) {
          	double tmp;
          	if (C <= -3.6e+122) {
          		tmp = (180.0 * atan(((C + C) / B))) / ((double) M_PI);
          	} else if (C <= 6.6e+51) {
          		tmp = 180.0 * (atan(((-A / B) - 1.0)) / ((double) M_PI));
          	} 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.6e+122) {
          		tmp = (180.0 * Math.atan(((C + C) / B))) / Math.PI;
          	} else if (C <= 6.6e+51) {
          		tmp = 180.0 * (Math.atan(((-A / B) - 1.0)) / Math.PI);
          	} else {
          		tmp = (180.0 * Math.atan(((B / C) * -0.5))) / Math.PI;
          	}
          	return tmp;
          }
          
          def code(A, B, C):
          	tmp = 0
          	if C <= -3.6e+122:
          		tmp = (180.0 * math.atan(((C + C) / B))) / math.pi
          	elif C <= 6.6e+51:
          		tmp = 180.0 * (math.atan(((-A / B) - 1.0)) / math.pi)
          	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.6e+122)
          		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C + C) / B))) / pi);
          	elseif (C <= 6.6e+51)
          		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) / B) - 1.0)) / pi));
          	else
          		tmp = Float64(Float64(180.0 * 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.6e+122)
          		tmp = (180.0 * atan(((C + C) / B))) / pi;
          	elseif (C <= 6.6e+51)
          		tmp = 180.0 * (atan(((-A / B) - 1.0)) / pi);
          	else
          		tmp = (180.0 * atan(((B / C) * -0.5))) / pi;
          	end
          	tmp_2 = tmp;
          end
          
          code[A_, B_, C_] := If[LessEqual[C, -3.6e+122], N[(N[(180.0 * N[ArcTan[N[(N[(C + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 6.6e+51], N[(180.0 * N[(N[ArcTan[N[(N[((-A) / B), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;C \leq -3.6 \cdot 10^{+122}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C + C}{B}\right)}{\pi}\\
          
          \mathbf{elif}\;C \leq 6.6 \cdot 10^{+51}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B} - 1\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if C < -3.6000000000000003e122

            1. Initial program 84.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 C around -inf

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

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

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

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

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

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

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

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

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

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

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

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

            if -3.6000000000000003e122 < C < 6.5999999999999994e51

            1. Initial program 57.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 C around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1 \cdot A}{B} - 1\right)}{\pi} \]
              3. mul-1-negN/A

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\mathsf{neg}\left(A\right)}{B} - 1\right)}{\pi} \]
              5. lower-neg.f6447.2

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

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

            if 6.5999999999999994e51 < C

            1. Initial program 21.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. 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} \]
            3. 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. mul-1-negN/A

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, -\frac{\left(-1 + 1\right) \cdot A}{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 \cdot A}{B}\right)\right)}{\pi} \]
              10. lower-*.f6470.6

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 46.8% accurate, 2.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -1.5:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.5 \cdot 10^{-58}:\\ \;\;\;\;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 -1.5)
             (* 180.0 (/ (atan (* (/ B A) 0.5)) PI))
             (if (<= A 3.5e-58)
               (* 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 <= -1.5) {
          		tmp = 180.0 * (atan(((B / A) * 0.5)) / ((double) M_PI));
          	} else if (A <= 3.5e-58) {
          		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 <= -1.5) {
          		tmp = 180.0 * (Math.atan(((B / A) * 0.5)) / Math.PI);
          	} else if (A <= 3.5e-58) {
          		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 <= -1.5:
          		tmp = 180.0 * (math.atan(((B / A) * 0.5)) / math.pi)
          	elif A <= 3.5e-58:
          		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 <= -1.5)
          		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / A) * 0.5)) / pi));
          	elseif (A <= 3.5e-58)
          		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 <= -1.5)
          		tmp = 180.0 * (atan(((B / A) * 0.5)) / pi);
          	elseif (A <= 3.5e-58)
          		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, -1.5], N[(180.0 * N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.5e-58], 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 -1.5:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
          
          \mathbf{elif}\;A \leq 3.5 \cdot 10^{-58}:\\
          \;\;\;\;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 < -1.5

            1. Initial program 26.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-/.f6464.6

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

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

            if -1.5 < A < 3.4999999999999999e-58

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

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

              if 3.4999999999999999e-58 < A

              1. Initial program 73.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(-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-/.f6461.9

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

                \[\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-/.f64N/A

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

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

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

                \[\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 9: 44.9% accurate, 2.2× speedup?

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

              1. Initial program 84.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 C around -inf

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.99999999999999986e122 < C < 5.5000000000000002e-47

              1. Initial program 59.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 B around inf

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

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

                if 5.5000000000000002e-47 < C

                1. Initial program 27.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 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} \]
                3. 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 10: 36.0% accurate, 2.4× speedup?

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

                1. Initial program 6.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-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} \]
                  4. 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)}^{2} + \color{blue}{{B}^{2}}}\right)\right)}{\pi} \]
                  5. lower-+.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} \]
                  6. 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} \]
                  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.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 rewrites57.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}\right)}}{\pi} \]
                5. Step-by-step derivation
                  1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

                if -4.9999999999999996e260 < A < 3.4999999999999999e-58

                1. Initial program 47.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 rewrites23.4%

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

                  if 3.4999999999999999e-58 < A

                  1. Initial program 73.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} \color{blue}{\left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}}{\pi} \]
                  3. Step-by-step derivation
                    1. associate--l+N/A

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

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

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

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

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

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

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

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\mathsf{neg}\left(A\right)}{B}\right)}{\pi} \]
                    4. lower-neg.f6461.5

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

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

                Alternative 11: 34.3% accurate, 2.8× speedup?

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

                  1. Initial program 84.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}{\left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}}{\pi} \]
                  3. Step-by-step derivation
                    1. associate--l+N/A

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

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

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

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

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

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

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

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

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

                  if -2.99999999999999986e122 < C < 8.40000000000000027e220

                  1. Initial program 52.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 rewrites24.1%

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

                    if 8.40000000000000027e220 < C

                    1. Initial program 7.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-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} \]
                      4. 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)}^{2} + \color{blue}{{B}^{2}}}\right)\right)}{\pi} \]
                      5. lower-+.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} \]
                      6. 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} \]
                      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--.f6455.6

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

                      \[\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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 12: 24.3% accurate, 3.3× speedup?

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

                    1. Initial program 57.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 B around inf

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

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

                      if 8.40000000000000027e220 < C

                      1. Initial program 7.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-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} \]
                        4. 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)}^{2} + \color{blue}{{B}^{2}}}\right)\right)}{\pi} \]
                        5. lower-+.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} \]
                        6. 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} \]
                        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--.f6455.6

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

                        \[\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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 13: 21.4% 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 54.1%

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

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

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

                      Reproduce

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