ABCF->ab-angle angle

Percentage Accurate: 53.4% → 88.2%
Time: 5.8s
Alternatives: 17
Speedup: 2.2×

Specification

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


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

    1. Initial program 59.4%

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
    6. Step-by-step derivation
      1. lift--.f6486.8

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
    9. Step-by-step derivation
      1. lift--.f6486.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 78.7% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;A \leq 4.5 \cdot 10^{+121}:\\
\;\;\;\;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(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -5.0999999999999999e33

    1. Initial program 21.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0999999999999999e33 < A < 4.5000000000000003e121

    1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

        if 4.5000000000000003e121 < A

        1. Initial program 84.5%

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

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

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

        Alternative 3: 78.7% accurate, 0.4× speedup?

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

          1. Initial program 59.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 4: 78.7% accurate, 0.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}\\ \mathbf{if}\;t\_0 \leq -40:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C - A} \cdot -0.5\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
           (let* ((t_0
                   (*
                    180.0
                    (/
                     (atan
                      (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
                     PI))))
             (if (<= t_0 -40.0)
               (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) B))) PI))
               (if (<= t_0 0.0)
                 (/ (* 180.0 (atan (* (/ B (- C 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 <= -40.0) {
          		tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - B))) / ((double) M_PI));
          	} else if (t_0 <= 0.0) {
          		tmp = (180.0 * atan(((B / (C - 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 <= -40.0) {
          		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 / (C - 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 <= -40.0:
          		tmp = 180.0 * (math.atan(((1.0 / B) * ((C - A) - B))) / math.pi)
          	elif t_0 <= 0.0:
          		tmp = (180.0 * math.atan(((B / (C - 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 <= -40.0)
          		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 / Float64(C - A)) * -0.5))) / 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)
          	t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi);
          	tmp = 0.0;
          	if (t_0 <= -40.0)
          		tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - B))) / pi);
          	elseif (t_0 <= 0.0)
          		tmp = (180.0 * atan(((B / (C - 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, -40.0], 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 / N[(C - A), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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}
          t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}\\
          \mathbf{if}\;t\_0 \leq -40:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\pi}\\
          
          \mathbf{elif}\;t\_0 \leq 0:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C - A} \cdot -0.5\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 (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64))))))) (PI.f64))) < -40

            1. Initial program 59.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 5: 76.1% accurate, 0.4× speedup?

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

              1. Initial program 59.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 6: 73.3% accurate, 0.4× speedup?

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

                1. Initial program 59.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi} \]
                4. Applied rewrites75.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 7: 66.6% accurate, 0.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}\\ \mathbf{if}\;t\_0 \leq -40:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\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 -40.0)
                   (* 180.0 (/ (atan (/ (- (- A) B) 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 <= -40.0) {
              		tmp = 180.0 * (atan(((-A - B) / 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 <= -40.0) {
              		tmp = 180.0 * (Math.atan(((-A - B) / 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 <= -40.0:
              		tmp = 180.0 * (math.atan(((-A - B) / 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 <= -40.0)
              		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - B) / B)) / pi));
              	elseif (t_0 <= 0.0)
              		tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / A) * 0.5))) / 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)
              	t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi);
              	tmp = 0.0;
              	if (t_0 <= -40.0)
              		tmp = 180.0 * (atan(((-A - B) / 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, -40.0], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - B), $MachinePrecision] / B), $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[(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}
              t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}\\
              \mathbf{if}\;t\_0 \leq -40:\\
              \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\
              
              \mathbf{elif}\;t\_0 \leq 0:\\
              \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
              
              \mathbf{else}:\\
              \;\;\;\;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 (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64))))))) (PI.f64))) < -40

                1. Initial program 59.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 59.4%

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

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

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

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

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi} \]
                4. Applied rewrites75.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 8: 58.1% accurate, 1.9× speedup?

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

                1. Initial program 24.6%

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

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

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

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

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

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

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

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

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

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

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

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

                if -4.8000000000000001e-5 < A < -6.49999999999999959e-109

                1. Initial program 44.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -6.49999999999999959e-109 < A < 2.1e-182

                1. Initial program 56.8%

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

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

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

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
                6. Step-by-step derivation
                  1. lift--.f6479.7

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
                9. Step-by-step derivation
                  1. lift--.f6479.7

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

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

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

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

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

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

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

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

                      if 2.1e-182 < A

                      1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 9: 56.5% accurate, 2.0× speedup?

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

                      1. Initial program 24.6%

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

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

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

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

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

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

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

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

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

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

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

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

                      if -4.8000000000000001e-5 < A < -6.49999999999999959e-109

                      1. Initial program 44.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -6.49999999999999959e-109 < A < 1.3500000000000001e94

                      1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.3500000000000001e94 < A

                            1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 10: 56.2% accurate, 2.2× speedup?

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

                            1. Initial program 30.3%

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

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

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

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

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

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

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

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

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

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

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

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

                            if -7.99999999999999983e-113 < A < 1.3500000000000001e94

                            1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi} \]
                              3. Step-by-step derivation
                                1. Applied rewrites75.6%

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

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

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

                                  if 1.3500000000000001e94 < A

                                  1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 11: 56.2% accurate, 2.2× speedup?

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

                                  1. Initial program 30.3%

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -7.99999999999999983e-113 < A < 1.65000000000000004e93

                                  1. Initial program 59.9%

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

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

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

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

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

                                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
                                  6. Step-by-step derivation
                                    1. lift--.f6482.4

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

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

                                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
                                  9. Step-by-step derivation
                                    1. lift--.f6482.4

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

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

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

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

                                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites75.6%

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

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

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

                                        if 1.65000000000000004e93 < A

                                        1. Initial program 82.1%

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

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

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

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

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

                                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
                                        6. Step-by-step derivation
                                          1. lift--.f6496.4

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

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

                                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
                                        9. Step-by-step derivation
                                          1. lift--.f6496.4

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

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

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

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

                                            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites49.6%

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

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

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

                                            Alternative 12: 56.2% accurate, 2.2× speedup?

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

                                              1. Initial program 30.3%

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

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

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

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

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

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

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

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

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

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

                                              if -7.99999999999999983e-113 < A < 1.65000000000000004e93

                                              1. Initial program 59.9%

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

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

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

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

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

                                                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
                                              6. Step-by-step derivation
                                                1. lift--.f6482.4

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

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

                                                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
                                              9. Step-by-step derivation
                                                1. lift--.f6482.4

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

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

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

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

                                                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi} \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites75.6%

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

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

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

                                                    if 1.65000000000000004e93 < A

                                                    1. Initial program 82.1%

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

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

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

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

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

                                                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
                                                    6. Step-by-step derivation
                                                      1. lift--.f6496.4

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

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

                                                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
                                                    9. Step-by-step derivation
                                                      1. lift--.f6496.4

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

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

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

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

                                                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi} \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites49.6%

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

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

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

                                                        Alternative 13: 55.7% accurate, 2.2× speedup?

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

                                                          1. Initial program 49.3%

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

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

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

                                                            if -2.8999999999999998e-16 < B < 1.35000000000000009e-74

                                                            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. Taylor expanded in A around -inf

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

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

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

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

                                                              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
                                                            6. Step-by-step derivation
                                                              1. lift--.f6476.3

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

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

                                                              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
                                                            9. Step-by-step derivation
                                                              1. lift--.f6476.3

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

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

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

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

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

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

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

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

                                                                  if 1.35000000000000009e-74 < B

                                                                  1. Initial program 51.6%

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

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

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

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

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

                                                                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
                                                                  6. Step-by-step derivation
                                                                    1. lift--.f6477.0

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

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

                                                                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
                                                                  9. Step-by-step derivation
                                                                    1. lift--.f6477.0

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

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

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

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

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

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

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

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

                                                                      Alternative 14: 53.5% accurate, 2.2× speedup?

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

                                                                        1. Initial program 49.3%

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

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

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

                                                                          if -2.8999999999999998e-16 < B < 1.60000000000000004e-45

                                                                          1. Initial program 57.2%

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

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

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

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

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

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

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

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

                                                                            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
                                                                          9. Step-by-step derivation
                                                                            1. lift--.f6475.6

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

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

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

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

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

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

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

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

                                                                                if 1.60000000000000004e-45 < B

                                                                                1. Initial program 51.1%

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

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

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

                                                                                Alternative 15: 44.3% accurate, 2.8× speedup?

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

                                                                                  1. Initial program 52.1%

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

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

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

                                                                                    if -2.0000000000000001e-127 < B < 1.50000000000000005e-83

                                                                                    1. Initial program 56.3%

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

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

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

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

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

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

                                                                                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{0 \cdot A}{B}\right)}{\pi} \]
                                                                                      6. lower-*.f6428.6

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

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

                                                                                      \[\leadsto 180 \cdot \frac{\tan^{-1} 0}{\pi} \]
                                                                                    6. Step-by-step derivation
                                                                                      1. Applied rewrites28.6%

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

                                                                                      if 1.50000000000000005e-83 < B

                                                                                      1. Initial program 51.8%

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

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

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

                                                                                      Alternative 16: 39.6% accurate, 3.3× speedup?

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

                                                                                        1. Initial program 53.4%

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

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

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

                                                                                          if -5.60000000000000028e-305 < B

                                                                                          1. Initial program 53.4%

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

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

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

                                                                                          Alternative 17: 21.2% accurate, 4.1× speedup?

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

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

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

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

                                                                                            Reproduce

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