ABCF->ab-angle angle

Percentage Accurate: 54.6% → 78.7%
Time: 5.3s
Alternatives: 15
Speedup: 2.6×

Specification

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 54.6% 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: 78.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.25 \cdot 10^{-64}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot \mathsf{fma}\left(\frac{C}{A}, B, B\right)}{A}\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -1.25000000000000008e-64

    1. Initial program 29.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(-1 \cdot \frac{\frac{-1}{2} \cdot B + \frac{-1}{2} \cdot \frac{B \cdot C}{A}}{A}\right)}}{\pi} \]
    3. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\mathsf{neg}\left(\left(\frac{1}{2} \cdot \frac{B \cdot C}{A} - \frac{-1}{2} \cdot B\right)\right)}{\mathsf{neg}\left(A\right)}\right)}{\pi} \]
      2. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.25000000000000008e-64 < A

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

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

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

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

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

Alternative 2: 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{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;180 \cdot \frac{\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 (* (/ 1.0 B) (- (- C A) B))) PI))
     (if (<= t_0 0.0)
       (* 180.0 (/ (atan (* (/ B A) 0.5)) PI))
       (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
	double tmp;
	if (t_0 <= -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 / 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 / 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 / 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(180.0 * Float64(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(((1.0 / B) * ((C - A) - B))) / pi);
	elseif (t_0 <= 0.0)
		tmp = 180.0 * (atan(((B / A) * 0.5)) / pi);
	else
		tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -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[(180.0 * N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
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:\\
\;\;\;\;180 \cdot \frac{\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 60.2%

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

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

        \[\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 20.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-/.f6452.0

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

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

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

      1. Initial program 60.1%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. 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--.f6476.7

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

        \[\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 3: 67.9% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(-1 - \frac{\color{blue}{A}}{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 20.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-/.f6452.0

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

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

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

        1. Initial program 60.1%

          \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
        2. 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--.f6476.7

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

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

      Alternative 4: 73.2% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-59}:\\ \;\;\;\;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:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot \mathsf{fma}\left(\frac{C}{A}, B, B\right)}{A}\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
               (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
         (if (<= t_0 -1e-59)
           (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) B))) PI))
           (if (<= t_0 0.0)
             (* 180.0 (/ (atan (/ (* 0.5 (fma (/ C A) B B)) A)) PI))
             (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))))
      double code(double A, double B, double C) {
      	double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
      	double tmp;
      	if (t_0 <= -1e-59) {
      		tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - B))) / ((double) M_PI));
      	} else if (t_0 <= 0.0) {
      		tmp = 180.0 * (atan(((0.5 * fma((C / A), B, B)) / A)) / ((double) M_PI));
      	} else {
      		tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
      	}
      	return tmp;
      }
      
      function code(A, B, C)
      	t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))
      	tmp = 0.0
      	if (t_0 <= -1e-59)
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - B))) / pi));
      	elseif (t_0 <= 0.0)
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * fma(Float64(C / A), B, B)) / A)) / pi));
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi));
      	end
      	return tmp
      end
      
      code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-59], 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[(180.0 * N[(N[ArcTan[N[(N[(0.5 * N[(N[(C / A), $MachinePrecision] * B + B), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
      \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-59}:\\
      \;\;\;\;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:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot \mathsf{fma}\left(\frac{C}{A}, B, B\right)}{A}\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 (/.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)))))) < -1e-59

        1. Initial program 60.1%

          \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
        2. 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 rewrites76.4%

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

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

          1. Initial program 19.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\mathsf{neg}\left(\left(\frac{1}{2} \cdot \frac{B \cdot C}{A} - \frac{-1}{2} \cdot B\right)\right)}{\mathsf{neg}\left(A\right)}\right)}{\pi} \]
            2. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 60.1%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. 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--.f6476.7

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

            \[\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: 74.7% accurate, 1.5× speedup?

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

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

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

            if -1.6e-78 < C < 4.60000000000000002e76

            1. Initial program 54.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 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

            if 4.60000000000000002e76 < C

            1. Initial program 20.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 6: 49.8% accurate, 2.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{if}\;A \leq -1.9 \cdot 10^{+85}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{elif}\;A \leq -1.65 \cdot 10^{+29}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;A \leq 1.6 \cdot 10^{-259}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.65 \cdot 10^{-219}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
          (FPCore (A B C)
           :precision binary64
           (let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
             (if (<= A -1.9e+85)
               (/ (* 180.0 (atan 0.0)) PI)
               (if (<= A -1.65e+29)
                 t_0
                 (if (<= A 1.6e-259)
                   (/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
                   (if (<= A 2.65e-219) t_0 (/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)))))))
          double code(double A, double B, double C) {
          	double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
          	double tmp;
          	if (A <= -1.9e+85) {
          		tmp = (180.0 * atan(0.0)) / ((double) M_PI);
          	} else if (A <= -1.65e+29) {
          		tmp = t_0;
          	} else if (A <= 1.6e-259) {
          		tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
          	} else if (A <= 2.65e-219) {
          		tmp = t_0;
          	} else {
          		tmp = (180.0 * atan((1.0 - (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) / Math.PI);
          	double tmp;
          	if (A <= -1.9e+85) {
          		tmp = (180.0 * Math.atan(0.0)) / Math.PI;
          	} else if (A <= -1.65e+29) {
          		tmp = t_0;
          	} else if (A <= 1.6e-259) {
          		tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
          	} else if (A <= 2.65e-219) {
          		tmp = t_0;
          	} else {
          		tmp = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
          	}
          	return tmp;
          }
          
          def code(A, B, C):
          	t_0 = 180.0 * (math.atan(-1.0) / math.pi)
          	tmp = 0
          	if A <= -1.9e+85:
          		tmp = (180.0 * math.atan(0.0)) / math.pi
          	elif A <= -1.65e+29:
          		tmp = t_0
          	elif A <= 1.6e-259:
          		tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi
          	elif A <= 2.65e-219:
          		tmp = t_0
          	else:
          		tmp = (180.0 * math.atan((1.0 - (A / B)))) / math.pi
          	return tmp
          
          function code(A, B, C)
          	t_0 = Float64(180.0 * Float64(atan(-1.0) / pi))
          	tmp = 0.0
          	if (A <= -1.9e+85)
          		tmp = Float64(Float64(180.0 * atan(0.0)) / pi);
          	elseif (A <= -1.65e+29)
          		tmp = t_0;
          	elseif (A <= 1.6e-259)
          		tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi);
          	elseif (A <= 2.65e-219)
          		tmp = t_0;
          	else
          		tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi);
          	end
          	return tmp
          end
          
          function tmp_2 = code(A, B, C)
          	t_0 = 180.0 * (atan(-1.0) / pi);
          	tmp = 0.0;
          	if (A <= -1.9e+85)
          		tmp = (180.0 * atan(0.0)) / pi;
          	elseif (A <= -1.65e+29)
          		tmp = t_0;
          	elseif (A <= 1.6e-259)
          		tmp = (180.0 * atan((1.0 + (C / B)))) / pi;
          	elseif (A <= 2.65e-219)
          		tmp = t_0;
          	else
          		tmp = (180.0 * atan((1.0 - (A / B)))) / pi;
          	end
          	tmp_2 = tmp;
          end
          
          code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.9e+85], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -1.65e+29], t$95$0, If[LessEqual[A, 1.6e-259], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 2.65e-219], t$95$0, N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
          \mathbf{if}\;A \leq -1.9 \cdot 10^{+85}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
          
          \mathbf{elif}\;A \leq -1.65 \cdot 10^{+29}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;A \leq 1.6 \cdot 10^{-259}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
          
          \mathbf{elif}\;A \leq 2.65 \cdot 10^{-219}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if A < -1.89999999999999996e85

            1. Initial program 20.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{180 \cdot \tan^{-1} \left(\mathsf{neg}\left(0\right)\right)}{\pi} \]
              14. metadata-eval33.1

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

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

            if -1.89999999999999996e85 < A < -1.64999999999999992e29 or 1.59999999999999994e-259 < A < 2.6500000000000001e-219

            1. Initial program 49.7%

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

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

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

              if -1.64999999999999992e29 < A < 1.59999999999999994e-259

              1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 2.6500000000000001e-219 < A

                1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 7: 59.0% accurate, 2.4× speedup?

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

                1. Initial program 76.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -8.0000000000000006e-15 < C < 7.0000000000000005e-13

                  1. Initial program 58.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 7.0000000000000005e-13 < C < 4.60000000000000021e33

                    1. Initial program 44.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 4.60000000000000021e33 < C

                    1. Initial program 24.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 8: 57.3% accurate, 2.5× speedup?

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

                    1. Initial program 30.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-/.f6458.1

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

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

                    if -9.1999999999999997e-94 < A < 1.59999999999999994e-259

                    1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 1.59999999999999994e-259 < A

                      1. Initial program 70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 9: 47.3% accurate, 2.5× speedup?

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

                        1. Initial program 51.5%

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

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

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

                          if -5.1999999999999999e-20 < B < 4.50000000000000025e-43

                          1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 4.50000000000000025e-43 < B

                          1. Initial program 51.0%

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

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

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

                          Alternative 10: 47.1% accurate, 2.5× speedup?

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

                            1. Initial program 49.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 rewrites64.5%

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

                              if -4.8e19 < B < 1.55e-43

                              1. Initial program 59.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 1.55e-43 < B

                              1. Initial program 51.0%

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

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

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

                              Alternative 11: 56.0% accurate, 2.6× speedup?

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

                                1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -1.50000000000000008e-292 < B

                                  1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 12: 51.7% accurate, 2.6× speedup?

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

                                    1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 4.50000000000000025e-43 < B

                                    1. Initial program 51.0%

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

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

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

                                    Alternative 13: 45.3% accurate, 2.8× speedup?

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

                                      1. Initial program 53.3%

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

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

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

                                        if -8.5999999999999991e-180 < B < 4.0000000000000001e-100

                                        1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\mathsf{neg}\left(0\right)\right)}{\pi} \]
                                          14. metadata-eval30.9

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

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

                                        if 4.0000000000000001e-100 < B

                                        1. Initial program 52.2%

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

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

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

                                        Alternative 14: 40.5% accurate, 2.9× speedup?

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

                                          1. Initial program 54.7%

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

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

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

                                            if -4.999999999999985e-310 < B

                                            1. Initial program 54.5%

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

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

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

                                            Alternative 15: 20.9% accurate, 3.1× speedup?

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

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

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

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

                                              Reproduce

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