ABCF->ab-angle angle

Percentage Accurate: 54.0% → 80.4%
Time: 5.5s
Alternatives: 17
Speedup: 2.5×

Specification

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

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

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

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


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

    1. Initial program 11.7%

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

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

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

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

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

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

    if -7.499999999999999e176 < A

    1. Initial program 59.0%

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

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

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

        \[\leadsto 180 \cdot \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)}} \]
    4. Applied rewrites80.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}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 73.2% accurate, 0.4× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;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.7%

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

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

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

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

      1. Initial program 16.7%

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 59.2%

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

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

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

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

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

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

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

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

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

      1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 16.7%

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 59.2%

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

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

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

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

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

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

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

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

      Alternative 4: 62.0% accurate, 0.6× speedup?

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

        1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 16.7%

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

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

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

              \[\leadsto 180 \cdot \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)}} \]
          4. Applied rewrites18.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}} \]
          5. Taylor expanded in A around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 5: 62.0% accurate, 0.6× speedup?

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

            1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              1. Initial program 16.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 6: 61.4% accurate, 0.6× speedup?

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

                1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  1. Initial program 16.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 5.0000000000000001e-4 < (*.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 59.5%

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

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

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

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

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

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

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

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

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

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

                  Alternative 7: 75.4% accurate, 1.5× speedup?

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

                    1. Initial program 15.6%

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

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

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

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

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

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

                    if -5.89999999999999987e128 < A < 1.9e46

                    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

                    if 1.9e46 < A

                    1. Initial program 80.0%

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

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

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

                    Alternative 8: 75.4% accurate, 1.5× speedup?

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

                      1. Initial program 15.6%

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

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

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

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

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

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

                      if -5.89999999999999987e128 < A < 1.9e46

                      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

                      if 1.9e46 < A

                      1. Initial program 80.0%

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

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

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

                      Alternative 9: 45.7% accurate, 2.3× speedup?

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

                        1. Initial program 46.5%

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

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

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

                          if -1.3500000000000001e28 < B < 5.79999999999999985e-300 or 2.2499999999999999e-166 < B < 3.20000000000000029e26

                          1. Initial program 59.8%

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

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

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

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

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

                            \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}}{\pi} \]
                          6. 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.5

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

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

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

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

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

                          if 5.79999999999999985e-300 < B < 2.2499999999999999e-166

                          1. Initial program 57.0%

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

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

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

                              \[\leadsto 180 \cdot \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)}} \]
                          4. Applied rewrites80.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}} \]
                          5. Taylor expanded in C around inf

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

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

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

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

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

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

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

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

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

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

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

                          if 3.20000000000000029e26 < B

                          1. Initial program 48.7%

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

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

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

                          Alternative 10: 50.4% accurate, 2.4× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 5.8 \cdot 10^{-300}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.25 \cdot 10^{-166}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.2 \cdot 10^{+26}:\\ \;\;\;\;\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 5.8e-300)
                             (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
                             (if (<= B 2.25e-166)
                               (/ (* 180.0 (atan (/ 0.0 B))) PI)
                               (if (<= B 3.2e+26)
                                 (/ (* 180.0 (atan (/ C B))) PI)
                                 (* 180.0 (/ (atan -1.0) PI))))))
                          double code(double A, double B, double C) {
                          	double tmp;
                          	if (B <= 5.8e-300) {
                          		tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
                          	} else if (B <= 2.25e-166) {
                          		tmp = (180.0 * atan((0.0 / B))) / ((double) M_PI);
                          	} else if (B <= 3.2e+26) {
                          		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 <= 5.8e-300) {
                          		tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
                          	} else if (B <= 2.25e-166) {
                          		tmp = (180.0 * Math.atan((0.0 / B))) / Math.PI;
                          	} else if (B <= 3.2e+26) {
                          		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 <= 5.8e-300:
                          		tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi)
                          	elif B <= 2.25e-166:
                          		tmp = (180.0 * math.atan((0.0 / B))) / math.pi
                          	elif B <= 3.2e+26:
                          		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 <= 5.8e-300)
                          		tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi));
                          	elseif (B <= 2.25e-166)
                          		tmp = Float64(Float64(180.0 * atan(Float64(0.0 / B))) / pi);
                          	elseif (B <= 3.2e+26)
                          		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 <= 5.8e-300)
                          		tmp = 180.0 * (atan((1.0 + (C / B))) / pi);
                          	elseif (B <= 2.25e-166)
                          		tmp = (180.0 * atan((0.0 / B))) / pi;
                          	elseif (B <= 3.2e+26)
                          		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, 5.8e-300], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.25e-166], N[(N[(180.0 * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 3.2e+26], 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 5.8 \cdot 10^{-300}:\\
                          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
                          
                          \mathbf{elif}\;B \leq 2.25 \cdot 10^{-166}:\\
                          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
                          
                          \mathbf{elif}\;B \leq 3.2 \cdot 10^{+26}:\\
                          \;\;\;\;\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 4 regimes
                          2. if B < 5.79999999999999985e-300

                            1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

                              if 5.79999999999999985e-300 < B < 2.2499999999999999e-166

                              1. Initial program 57.0%

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

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

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

                                  \[\leadsto 180 \cdot \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)}} \]
                              4. Applied rewrites80.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}} \]
                              5. Taylor expanded in C around inf

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

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

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

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

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

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

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

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

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

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

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

                              if 2.2499999999999999e-166 < B < 3.20000000000000029e26

                              1. Initial program 60.6%

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

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

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

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

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

                                \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}}{\pi} \]
                              6. 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-/.f6458.5

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

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

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

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

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

                              if 3.20000000000000029e26 < B

                              1. Initial program 48.7%

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

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

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

                              Alternative 11: 50.9% accurate, 2.4× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 9.6 \cdot 10^{-299}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.25 \cdot 10^{-166}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.2 \cdot 10^{+26}:\\ \;\;\;\;\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 9.6e-299)
                                 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
                                 (if (<= B 2.25e-166)
                                   (/ (* 180.0 (atan (/ 0.0 B))) PI)
                                   (if (<= B 3.2e+26)
                                     (/ (* 180.0 (atan (/ C B))) PI)
                                     (* 180.0 (/ (atan -1.0) PI))))))
                              double code(double A, double B, double C) {
                              	double tmp;
                              	if (B <= 9.6e-299) {
                              		tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
                              	} else if (B <= 2.25e-166) {
                              		tmp = (180.0 * atan((0.0 / B))) / ((double) M_PI);
                              	} else if (B <= 3.2e+26) {
                              		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 <= 9.6e-299) {
                              		tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
                              	} else if (B <= 2.25e-166) {
                              		tmp = (180.0 * Math.atan((0.0 / B))) / Math.PI;
                              	} else if (B <= 3.2e+26) {
                              		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 <= 9.6e-299:
                              		tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi)
                              	elif B <= 2.25e-166:
                              		tmp = (180.0 * math.atan((0.0 / B))) / math.pi
                              	elif B <= 3.2e+26:
                              		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 <= 9.6e-299)
                              		tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi));
                              	elseif (B <= 2.25e-166)
                              		tmp = Float64(Float64(180.0 * atan(Float64(0.0 / B))) / pi);
                              	elseif (B <= 3.2e+26)
                              		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 <= 9.6e-299)
                              		tmp = 180.0 * (atan((1.0 - (A / B))) / pi);
                              	elseif (B <= 2.25e-166)
                              		tmp = (180.0 * atan((0.0 / B))) / pi;
                              	elseif (B <= 3.2e+26)
                              		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, 9.6e-299], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.25e-166], N[(N[(180.0 * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 3.2e+26], 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 9.6 \cdot 10^{-299}:\\
                              \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
                              
                              \mathbf{elif}\;B \leq 2.25 \cdot 10^{-166}:\\
                              \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
                              
                              \mathbf{elif}\;B \leq 3.2 \cdot 10^{+26}:\\
                              \;\;\;\;\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 4 regimes
                              2. if B < 9.60000000000000077e-299

                                1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                if 9.60000000000000077e-299 < B < 2.2499999999999999e-166

                                1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if 2.2499999999999999e-166 < B < 3.20000000000000029e26

                                1. Initial program 60.6%

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

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

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

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

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

                                  \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}}{\pi} \]
                                6. 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-/.f6458.5

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

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

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

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

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

                                if 3.20000000000000029e26 < B

                                1. Initial program 48.7%

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

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

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

                                Alternative 12: 54.7% accurate, 2.5× speedup?

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

                                  1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

                                    if 5.79999999999999985e-300 < B < 1.6e-166

                                    1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 1.6e-166 < B

                                    1. Initial program 53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 13: 54.7% accurate, 2.5× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 5.8 \cdot 10^{-300}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.1 \cdot 10^{-166}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{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 5.8e-300)
                                       (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
                                       (if (<= B 4.1e-166)
                                         (/ (* 180.0 (atan (/ 0.0 B))) PI)
                                         (/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))
                                    double code(double A, double B, double C) {
                                    	double tmp;
                                    	if (B <= 5.8e-300) {
                                    		tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
                                    	} else if (B <= 4.1e-166) {
                                    		tmp = (180.0 * atan((0.0 / 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 <= 5.8e-300) {
                                    		tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
                                    	} else if (B <= 4.1e-166) {
                                    		tmp = (180.0 * Math.atan((0.0 / 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 <= 5.8e-300:
                                    		tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi)
                                    	elif B <= 4.1e-166:
                                    		tmp = (180.0 * math.atan((0.0 / 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 <= 5.8e-300)
                                    		tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi));
                                    	elseif (B <= 4.1e-166)
                                    		tmp = Float64(Float64(180.0 * atan(Float64(0.0 / 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 <= 5.8e-300)
                                    		tmp = 180.0 * (atan((1.0 + (C / B))) / pi);
                                    	elseif (B <= 4.1e-166)
                                    		tmp = (180.0 * atan((0.0 / B))) / pi;
                                    	else
                                    		tmp = (180.0 * atan((-1.0 - (A / B)))) / pi;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[A_, B_, C_] := If[LessEqual[B, 5.8e-300], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.1e-166], N[(N[(180.0 * N[ArcTan[N[(0.0 / B), $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 5.8 \cdot 10^{-300}:\\
                                    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
                                    
                                    \mathbf{elif}\;B \leq 4.1 \cdot 10^{-166}:\\
                                    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{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 B < 5.79999999999999985e-300

                                      1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

                                        if 5.79999999999999985e-300 < B < 4.0999999999999997e-166

                                        1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if 4.0999999999999997e-166 < B

                                        1. Initial program 53.6%

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

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

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

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

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

                                          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}}{\pi} \]
                                        6. 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-/.f6471.2

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

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

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

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

                                        Alternative 14: 46.3% accurate, 2.5× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1.35 \cdot 10^{+28}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.2 \cdot 10^{+26}:\\ \;\;\;\;\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 -1.35e+28)
                                           (* 180.0 (/ (atan 1.0) PI))
                                           (if (<= B 3.2e+26)
                                             (/ (* 180.0 (atan (/ C B))) PI)
                                             (* 180.0 (/ (atan -1.0) PI)))))
                                        double code(double A, double B, double C) {
                                        	double tmp;
                                        	if (B <= -1.35e+28) {
                                        		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
                                        	} else if (B <= 3.2e+26) {
                                        		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 <= -1.35e+28) {
                                        		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
                                        	} else if (B <= 3.2e+26) {
                                        		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 <= -1.35e+28:
                                        		tmp = 180.0 * (math.atan(1.0) / math.pi)
                                        	elif B <= 3.2e+26:
                                        		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 <= -1.35e+28)
                                        		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
                                        	elseif (B <= 3.2e+26)
                                        		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 <= -1.35e+28)
                                        		tmp = 180.0 * (atan(1.0) / pi);
                                        	elseif (B <= 3.2e+26)
                                        		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, -1.35e+28], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.2e+26], 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 -1.35 \cdot 10^{+28}:\\
                                        \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
                                        
                                        \mathbf{elif}\;B \leq 3.2 \cdot 10^{+26}:\\
                                        \;\;\;\;\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 < -1.3500000000000001e28

                                          1. Initial program 46.5%

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

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

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

                                            if -1.3500000000000001e28 < B < 3.20000000000000029e26

                                            1. Initial program 59.3%

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

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

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

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

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

                                              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}}{\pi} \]
                                            6. 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.3

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

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

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

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

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

                                            if 3.20000000000000029e26 < B

                                            1. Initial program 48.7%

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

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

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

                                            Alternative 15: 46.3% accurate, 2.5× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1.35 \cdot 10^{+28}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.2 \cdot 10^{+26}:\\ \;\;\;\;180 \cdot \frac{\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 -1.35e+28)
                                               (* 180.0 (/ (atan 1.0) PI))
                                               (if (<= B 3.2e+26)
                                                 (* 180.0 (/ (atan (/ C B)) PI))
                                                 (* 180.0 (/ (atan -1.0) PI)))))
                                            double code(double A, double B, double C) {
                                            	double tmp;
                                            	if (B <= -1.35e+28) {
                                            		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
                                            	} else if (B <= 3.2e+26) {
                                            		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 <= -1.35e+28) {
                                            		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
                                            	} else if (B <= 3.2e+26) {
                                            		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 <= -1.35e+28:
                                            		tmp = 180.0 * (math.atan(1.0) / math.pi)
                                            	elif B <= 3.2e+26:
                                            		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 <= -1.35e+28)
                                            		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
                                            	elseif (B <= 3.2e+26)
                                            		tmp = Float64(180.0 * Float64(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 <= -1.35e+28)
                                            		tmp = 180.0 * (atan(1.0) / pi);
                                            	elseif (B <= 3.2e+26)
                                            		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, -1.35e+28], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.2e+26], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;B \leq -1.35 \cdot 10^{+28}:\\
                                            \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
                                            
                                            \mathbf{elif}\;B \leq 3.2 \cdot 10^{+26}:\\
                                            \;\;\;\;180 \cdot \frac{\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 < -1.3500000000000001e28

                                              1. Initial program 46.5%

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

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

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

                                                if -1.3500000000000001e28 < B < 3.20000000000000029e26

                                                1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

                                                if 3.20000000000000029e26 < B

                                                1. Initial program 48.7%

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

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

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

                                                Alternative 16: 39.9% accurate, 2.9× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -2 \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 -2e-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 <= -2e-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 <= -2e-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 <= -2e-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 <= -2e-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 <= -2e-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, -2e-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 -2 \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 < -1.999999999999994e-310

                                                  1. Initial program 53.6%

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

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

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

                                                    if -1.999999999999994e-310 < B

                                                    1. Initial program 54.4%

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

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

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

                                                    Alternative 17: 20.5% 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.0%

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

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

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

                                                      Reproduce

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