ABCF->ab-angle angle

Percentage Accurate: 53.2% → 81.9%
Time: 12.8s
Alternatives: 16
Speedup: 2.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 53.2% 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.9% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 66.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.2e14 < C

      1. Initial program 20.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 79.1% accurate, 0.6× speedup?

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

        1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 27.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 57.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 3: 79.1% accurate, 0.6× speedup?

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

            1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 27.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              1. Initial program 57.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 4: 79.1% accurate, 0.6× speedup?

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

                1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 27.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  1. Initial program 57.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 5: 79.1% accurate, 0.6× speedup?

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

                    1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

                    1. Initial program 27.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      1. Initial program 57.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 6: 72.8% accurate, 0.6× speedup?

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

                        1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

                        1. Initial program 27.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        1. Initial program 57.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 7: 72.8% accurate, 0.6× speedup?

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

                          1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

                          1. Initial program 27.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          1. Initial program 57.3%

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

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

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

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

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

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

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

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

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

                        Alternative 8: 47.2% accurate, 2.5× speedup?

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

                          1. Initial program 75.4%

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

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

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

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

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

                          if -2.3e31 < C < 1.36000000000000005e-77

                          1. Initial program 60.1%

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

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

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

                            if 1.36000000000000005e-77 < C

                            1. Initial program 29.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{B \cdot \frac{-1}{2}}}{C}\right)}{\mathsf{PI}\left(\right)} \]
                              9. lower-PI.f6462.9

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

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

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

                          Alternative 9: 47.2% accurate, 2.5× speedup?

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

                            1. Initial program 75.4%

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

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

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

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

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

                            if -2.3e31 < C < 1.36000000000000005e-77

                            1. Initial program 60.1%

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

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

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

                              if 1.36000000000000005e-77 < C

                              1. Initial program 29.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{B \cdot \frac{-1}{2}}}{C}\right)}{\mathsf{PI}\left(\right)} \]
                                9. lower-PI.f6462.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -2.3 \cdot 10^{+31}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.36 \cdot 10^{-77}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C \cdot -2}\right)}{\pi}\\ \end{array} \]
                            7. Add Preprocessing

                            Alternative 10: 47.2% accurate, 2.5× speedup?

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

                              1. Initial program 75.4%

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

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

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

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

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

                              if -2.3e31 < C < 1.36000000000000005e-77

                              1. Initial program 60.1%

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

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

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

                                if 1.36000000000000005e-77 < C

                                1. Initial program 29.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{\frac{-1}{2}}{C} \cdot B\right)}}{\mathsf{PI}\left(\right)} \]
                                  4. lower-*.f6462.8

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

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -2.3 \cdot 10^{+31}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.36 \cdot 10^{-77}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ \end{array} \]
                              7. Add Preprocessing

                              Alternative 11: 47.3% accurate, 2.5× speedup?

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

                                1. Initial program 47.8%

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

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

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

                                  if -3.8000000000000002e-15 < B < 3.60000000000000008e-96

                                  1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 3.60000000000000008e-96 < B

                                  1. Initial program 57.0%

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

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

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

                                  Alternative 12: 46.7% accurate, 2.5× speedup?

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

                                    1. Initial program 47.2%

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

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

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

                                      if -2.0500000000000001e-57 < B < 0.57999999999999996

                                      1. Initial program 63.8%

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

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

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

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

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

                                      if 0.57999999999999996 < B

                                      1. Initial program 49.0%

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

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

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

                                      Alternative 13: 61.1% accurate, 2.5× speedup?

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

                                        1. Initial program 66.7%

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

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

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

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

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

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

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

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

                                        if 4.49999999999999978e-17 < C

                                        1. Initial program 23.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{B \cdot \frac{-1}{2}}}{C}\right)}{\mathsf{PI}\left(\right)} \]
                                          9. lower-PI.f6469.1

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

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

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

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

                                      Alternative 14: 45.6% accurate, 2.8× speedup?

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

                                        1. Initial program 51.9%

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

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

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

                                          if -5.8e-165 < B < 1.20000000000000007e-187

                                          1. Initial program 57.6%

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

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

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

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

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

                                              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{0}\right)}{\mathsf{PI}\left(\right)} \]
                                            5. metadata-eval37.2

                                              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
                                          5. Applied rewrites37.2%

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

                                          if 1.20000000000000007e-187 < B

                                          1. Initial program 55.8%

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

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

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

                                          Alternative 15: 28.9% accurate, 2.9× speedup?

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

                                            1. Initial program 54.0%

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

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

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

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

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

                                                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{0}\right)}{\mathsf{PI}\left(\right)} \]
                                              5. metadata-eval16.2

                                                \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
                                            5. Applied rewrites16.2%

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

                                            if 1.20000000000000007e-187 < B

                                            1. Initial program 55.8%

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

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

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

                                            Alternative 16: 20.8% accurate, 3.1× speedup?

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

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

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

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

                                              Reproduce

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