ABCF->ab-angle angle

Percentage Accurate: 53.7% → 81.9%
Time: 6.5s
Alternatives: 15
Speedup: 2.4×

Specification

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 53.7% 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.1× speedup?

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

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

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


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

    1. Initial program 15.5%

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999998e113 < A

    1. Initial program 61.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. lift-*.f64N/A

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

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

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

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

Alternative 2: 72.9% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64))))))) (PI.f64))) < -9.99999999999999908e-22

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 57.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}} \]
      5. 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)}}{\pi} \]
      6. Step-by-step derivation
        1. associate--l+N/A

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

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

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

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

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

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

    Alternative 3: 61.2% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 57.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}} \]
      5. 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)}}{\pi} \]
      6. Step-by-step derivation
        1. associate--l+N/A

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

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

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

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

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

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

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

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

      Alternative 4: 78.6% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

        if -1.85000000000000005e99 < A < 7.7999999999999999e-10

        1. Initial program 54.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 A around 0

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

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

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

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

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

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

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

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

        if 7.7999999999999999e-10 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 76.5% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

        if -1.85000000000000005e99 < A < 8.50000000000000035e61

        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 A around 0

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

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

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

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

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

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

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

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

        if 8.50000000000000035e61 < A

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

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

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

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

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

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

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

      Alternative 6: 58.0% accurate, 2.3× speedup?

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

        1. Initial program 26.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 A around -inf

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

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

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

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

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

        if -1.90000000000000004e-32 < A < -6.99999999999999964e-54

        1. Initial program 45.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)}}{\pi} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -6.99999999999999964e-54 < A < -9.0000000000000002e-261

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

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

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

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

          \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}} \]
        5. 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)}}{\pi} \]
        6. Step-by-step derivation
          1. associate--l+N/A

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

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

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

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

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

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

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

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

          if -9.0000000000000002e-261 < A < 8.50000000000000035e61

          1. Initial program 60.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 8.50000000000000035e61 < A

          1. Initial program 79.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 A around inf

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

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

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

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

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

        Alternative 7: 50.8% accurate, 2.3× speedup?

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

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

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

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

            if -2.5999999999999998e-37 < B < -2.8999999999999999e-208

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

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

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

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

              \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}} \]
            5. 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)}}{\pi} \]
            6. Step-by-step derivation
              1. associate--l+N/A

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

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

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

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

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

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

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

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

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

            if -2.8999999999999999e-208 < B < 1.04999999999999999e-268

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\tan^{-1} 0 \cdot 180}{\pi} \]
            9. Applied rewrites35.4%

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

            if 1.04999999999999999e-268 < B < 1.05000000000000001e-110

            1. Initial program 57.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. lift-*.f64N/A

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

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

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

              \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}} \]
            5. 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)}}{\pi} \]
            6. Step-by-step derivation
              1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.05000000000000001e-110 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 46.6% accurate, 2.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -2.6 \cdot 10^{-37}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.9 \cdot 10^{-208}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-268}:\\ \;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\ \mathbf{elif}\;B \leq 250000000000:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{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.6e-37)
             (* 180.0 (/ (atan 1.0) PI))
             (if (<= B -2.9e-208)
               (/ (* 180.0 (atan (/ C B))) PI)
               (if (<= B 1.05e-268)
                 (/ (* (atan 0.0) 180.0) PI)
                 (if (<= B 250000000000.0)
                   (/ (* 180.0 (atan (/ (- A) B))) PI)
                   (* 180.0 (/ (atan -1.0) PI)))))))
          double code(double A, double B, double C) {
          	double tmp;
          	if (B <= -2.6e-37) {
          		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
          	} else if (B <= -2.9e-208) {
          		tmp = (180.0 * atan((C / B))) / ((double) M_PI);
          	} else if (B <= 1.05e-268) {
          		tmp = (atan(0.0) * 180.0) / ((double) M_PI);
          	} else if (B <= 250000000000.0) {
          		tmp = (180.0 * atan((-A / 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.6e-37) {
          		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
          	} else if (B <= -2.9e-208) {
          		tmp = (180.0 * Math.atan((C / B))) / Math.PI;
          	} else if (B <= 1.05e-268) {
          		tmp = (Math.atan(0.0) * 180.0) / Math.PI;
          	} else if (B <= 250000000000.0) {
          		tmp = (180.0 * Math.atan((-A / 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.6e-37:
          		tmp = 180.0 * (math.atan(1.0) / math.pi)
          	elif B <= -2.9e-208:
          		tmp = (180.0 * math.atan((C / B))) / math.pi
          	elif B <= 1.05e-268:
          		tmp = (math.atan(0.0) * 180.0) / math.pi
          	elif B <= 250000000000.0:
          		tmp = (180.0 * math.atan((-A / 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.6e-37)
          		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
          	elseif (B <= -2.9e-208)
          		tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi);
          	elseif (B <= 1.05e-268)
          		tmp = Float64(Float64(atan(0.0) * 180.0) / pi);
          	elseif (B <= 250000000000.0)
          		tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / 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.6e-37)
          		tmp = 180.0 * (atan(1.0) / pi);
          	elseif (B <= -2.9e-208)
          		tmp = (180.0 * atan((C / B))) / pi;
          	elseif (B <= 1.05e-268)
          		tmp = (atan(0.0) * 180.0) / pi;
          	elseif (B <= 250000000000.0)
          		tmp = (180.0 * atan((-A / B))) / pi;
          	else
          		tmp = 180.0 * (atan(-1.0) / pi);
          	end
          	tmp_2 = tmp;
          end
          
          code[A_, B_, C_] := If[LessEqual[B, -2.6e-37], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.9e-208], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.05e-268], N[(N[(N[ArcTan[0.0], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 250000000000.0], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;B \leq -2.6 \cdot 10^{-37}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
          
          \mathbf{elif}\;B \leq -2.9 \cdot 10^{-208}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
          
          \mathbf{elif}\;B \leq 1.05 \cdot 10^{-268}:\\
          \;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\
          
          \mathbf{elif}\;B \leq 250000000000:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 5 regimes
          2. if B < -2.5999999999999998e-37

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

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

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

              if -2.5999999999999998e-37 < B < -2.8999999999999999e-208

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

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

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

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

                \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}} \]
              5. 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)}}{\pi} \]
              6. Step-by-step derivation
                1. associate--l+N/A

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

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

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

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

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

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

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

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

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

              if -2.8999999999999999e-208 < B < 1.04999999999999999e-268

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\tan^{-1} 0 \cdot 180}{\pi} \]
              9. Applied rewrites35.4%

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

              if 1.04999999999999999e-268 < B < 2.5e11

              1. Initial program 59.5%

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

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

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

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

                \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}} \]
              5. 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)}}{\pi} \]
              6. Step-by-step derivation
                1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

              if 2.5e11 < B

              1. Initial program 48.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}}{\pi} \]
              4. Step-by-step derivation
                1. Applied rewrites62.2%

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

              Alternative 9: 46.8% accurate, 2.3× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -2.6 \cdot 10^{-37}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.9 \cdot 10^{-208}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 3.3 \cdot 10^{-265}:\\ \;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\ \mathbf{elif}\;B \leq 7.8 \cdot 10^{-19}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
              (FPCore (A B C)
               :precision binary64
               (let* ((t_0 (/ (* 180.0 (atan (/ C B))) PI)))
                 (if (<= B -2.6e-37)
                   (* 180.0 (/ (atan 1.0) PI))
                   (if (<= B -2.9e-208)
                     t_0
                     (if (<= B 3.3e-265)
                       (/ (* (atan 0.0) 180.0) PI)
                       (if (<= B 7.8e-19) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
              double code(double A, double B, double C) {
              	double t_0 = (180.0 * atan((C / B))) / ((double) M_PI);
              	double tmp;
              	if (B <= -2.6e-37) {
              		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
              	} else if (B <= -2.9e-208) {
              		tmp = t_0;
              	} else if (B <= 3.3e-265) {
              		tmp = (atan(0.0) * 180.0) / ((double) M_PI);
              	} else if (B <= 7.8e-19) {
              		tmp = t_0;
              	} else {
              		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
              	}
              	return tmp;
              }
              
              public static double code(double A, double B, double C) {
              	double t_0 = (180.0 * Math.atan((C / B))) / Math.PI;
              	double tmp;
              	if (B <= -2.6e-37) {
              		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
              	} else if (B <= -2.9e-208) {
              		tmp = t_0;
              	} else if (B <= 3.3e-265) {
              		tmp = (Math.atan(0.0) * 180.0) / Math.PI;
              	} else if (B <= 7.8e-19) {
              		tmp = t_0;
              	} else {
              		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
              	}
              	return tmp;
              }
              
              def code(A, B, C):
              	t_0 = (180.0 * math.atan((C / B))) / math.pi
              	tmp = 0
              	if B <= -2.6e-37:
              		tmp = 180.0 * (math.atan(1.0) / math.pi)
              	elif B <= -2.9e-208:
              		tmp = t_0
              	elif B <= 3.3e-265:
              		tmp = (math.atan(0.0) * 180.0) / math.pi
              	elif B <= 7.8e-19:
              		tmp = t_0
              	else:
              		tmp = 180.0 * (math.atan(-1.0) / math.pi)
              	return tmp
              
              function code(A, B, C)
              	t_0 = Float64(Float64(180.0 * atan(Float64(C / B))) / pi)
              	tmp = 0.0
              	if (B <= -2.6e-37)
              		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
              	elseif (B <= -2.9e-208)
              		tmp = t_0;
              	elseif (B <= 3.3e-265)
              		tmp = Float64(Float64(atan(0.0) * 180.0) / pi);
              	elseif (B <= 7.8e-19)
              		tmp = t_0;
              	else
              		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
              	end
              	return tmp
              end
              
              function tmp_2 = code(A, B, C)
              	t_0 = (180.0 * atan((C / B))) / pi;
              	tmp = 0.0;
              	if (B <= -2.6e-37)
              		tmp = 180.0 * (atan(1.0) / pi);
              	elseif (B <= -2.9e-208)
              		tmp = t_0;
              	elseif (B <= 3.3e-265)
              		tmp = (atan(0.0) * 180.0) / pi;
              	elseif (B <= 7.8e-19)
              		tmp = t_0;
              	else
              		tmp = 180.0 * (atan(-1.0) / pi);
              	end
              	tmp_2 = tmp;
              end
              
              code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -2.6e-37], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.9e-208], t$95$0, If[LessEqual[B, 3.3e-265], N[(N[(N[ArcTan[0.0], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 7.8e-19], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
              \mathbf{if}\;B \leq -2.6 \cdot 10^{-37}:\\
              \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
              
              \mathbf{elif}\;B \leq -2.9 \cdot 10^{-208}:\\
              \;\;\;\;t\_0\\
              
              \mathbf{elif}\;B \leq 3.3 \cdot 10^{-265}:\\
              \;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\
              
              \mathbf{elif}\;B \leq 7.8 \cdot 10^{-19}:\\
              \;\;\;\;t\_0\\
              
              \mathbf{else}:\\
              \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 4 regimes
              2. if B < -2.5999999999999998e-37

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

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

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

                  if -2.5999999999999998e-37 < B < -2.8999999999999999e-208 or 3.30000000000000002e-265 < B < 7.7999999999999999e-19

                  1. Initial program 57.9%

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

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

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

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

                    \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}} \]
                  5. 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)}}{\pi} \]
                  6. Step-by-step derivation
                    1. associate--l+N/A

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

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

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

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

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

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

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

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

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

                  if -2.8999999999999999e-208 < B < 3.30000000000000002e-265

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\tan^{-1} 0 \cdot 180}{\pi} \]
                  9. Applied rewrites35.1%

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

                  if 7.7999999999999999e-19 < B

                  1. Initial program 49.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}}{\pi} \]
                  4. Step-by-step derivation
                    1. Applied rewrites59.5%

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

                  Alternative 10: 60.1% accurate, 2.4× speedup?

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

                    1. Initial program 26.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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                    if -1.90000000000000004e-32 < A < -6.99999999999999964e-54

                    1. Initial program 45.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)}}{\pi} \]
                    4. Step-by-step derivation
                      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -6.99999999999999964e-54 < A < 5.7999999999999995e-178

                    1. Initial program 56.0%

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

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

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

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

                      \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}} \]
                    5. 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)}}{\pi} \]
                    6. Step-by-step derivation
                      1. associate--l+N/A

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

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

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

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

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

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

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

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

                      if 5.7999999999999995e-178 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 11: 60.1% accurate, 2.4× speedup?

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

                        1. Initial program 26.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 A around -inf

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

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

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

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

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

                        if -1.90000000000000004e-32 < A < -6.99999999999999964e-54

                        1. Initial program 45.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)}}{\pi} \]
                        4. Step-by-step derivation
                          1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -6.99999999999999964e-54 < A < 5.7999999999999995e-178

                        1. Initial program 56.0%

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

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

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

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

                          \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}} \]
                        5. 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)}}{\pi} \]
                        6. Step-by-step derivation
                          1. associate--l+N/A

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

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

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

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

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

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

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

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

                          if 5.7999999999999995e-178 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 12: 54.7% accurate, 2.4× speedup?

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

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

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

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

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

                              \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}} \]
                            5. 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)}}{\pi} \]
                            6. Step-by-step derivation
                              1. associate--l+N/A

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

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

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

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

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

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

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

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

                              if -2.24999999999999984e-220 < B < 1.04999999999999999e-268

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{\tan^{-1} 0 \cdot 180}{\pi} \]
                              9. Applied rewrites35.8%

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

                              if 1.04999999999999999e-268 < B < 1.05000000000000001e-110

                              1. Initial program 57.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. lift-*.f64N/A

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

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

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

                                \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}} \]
                              5. 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)}}{\pi} \]
                              6. Step-by-step derivation
                                1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

                              if 1.05000000000000001e-110 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 13: 45.0% accurate, 2.8× speedup?

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

                              1. Initial program 50.8%

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

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

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

                                if -3.30000000000000009e-133 < B < 2.4499999999999998e-186

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{\tan^{-1} 0 \cdot 180}{\pi} \]
                                9. Applied rewrites32.4%

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

                                if 2.4499999999999998e-186 < B

                                1. Initial program 53.3%

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

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

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

                                Alternative 14: 40.3% accurate, 2.9× speedup?

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

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

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

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

                                    if -9.999999999999969e-311 < B

                                    1. Initial program 54.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}}{\pi} \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites40.2%

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

                                    Alternative 15: 20.9% 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 53.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}}{\pi} \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites20.9%

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

                                      Reproduce

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