ABCF->ab-angle angle

Percentage Accurate: 53.6% → 79.9%
Time: 7.3s
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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 53.6% accurate, 1.0× speedup?

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

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

Alternative 1: 79.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -8.5 \cdot 10^{+24}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -8.5e+24)
   (/ (* 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 <= -8.5e+24) {
		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 <= -8.5e+24) {
		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 <= -8.5e+24:
		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 <= -8.5e+24)
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / A) * 0.5))) / pi);
	else
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) * (B ^ -1.0)))) / pi);
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (A <= -8.5e+24)
		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, -8.5e+24], N[(N[(180.0 * N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] * N[Power[B, -1.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 13.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 rewrites44.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 -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-/.f6474.2

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

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

    if -8.49999999999999959e24 < A

    1. Initial program 64.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 rewrites87.6%

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

Alternative 2: 72.4% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 54.9%

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

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

      if -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 18.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-/.f6450.3

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

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

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

      1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\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 18.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-/.f6450.3

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

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

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

        1. Initial program 62.3%

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

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

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

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

      Alternative 4: 62.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 -10:\\ \;\;\;\;\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}{C} \cdot -0.5\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (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 -10.0)
           (/ (* 180.0 (atan (/ (- C B) B))) PI)
           (if (<= t_0 0.0)
             (* 180.0 (/ (atan (* (/ B C) -0.5)) PI))
             (/ (* 180.0 (atan (+ (/ C B) 1.0))) 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 <= -10.0) {
      		tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
      	} else if (t_0 <= 0.0) {
      		tmp = 180.0 * (atan(((B / C) * -0.5)) / ((double) M_PI));
      	} else {
      		tmp = (180.0 * atan(((C / B) + 1.0))) / ((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 <= -10.0) {
      		tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
      	} else if (t_0 <= 0.0) {
      		tmp = 180.0 * (Math.atan(((B / C) * -0.5)) / Math.PI);
      	} else {
      		tmp = (180.0 * Math.atan(((C / B) + 1.0))) / 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 <= -10.0:
      		tmp = (180.0 * math.atan(((C - B) / B))) / math.pi
      	elif t_0 <= 0.0:
      		tmp = 180.0 * (math.atan(((B / C) * -0.5)) / math.pi)
      	else:
      		tmp = (180.0 * math.atan(((C / B) + 1.0))) / 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 <= -10.0)
      		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 / C) * -0.5)) / pi));
      	else
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + 1.0))) / pi);
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	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 <= -10.0)
      		tmp = (180.0 * atan(((C - B) / B))) / pi;
      	elseif (t_0 <= 0.0)
      		tmp = 180.0 * (atan(((B / C) * -0.5)) / pi);
      	else
      		tmp = (180.0 * atan(((C / B) + 1.0))) / 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, -10.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[(180.0 * N[(N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      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 -10:\\
      \;\;\;\;\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}{C} \cdot -0.5\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 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))) < -10

        1. Initial program 55.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 rewrites86.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. unpow2N/A

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

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

          \[\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 rewrites65.5%

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

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

          1. Initial program 16.4%

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

              \[\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 rewrites49.2%

            \[\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-/.f6449.2

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

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

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

          1. Initial program 62.3%

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

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

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

              \[\leadsto 180 \cdot \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)}} \]
          4. Applied rewrites86.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. unpow2N/A

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

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

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

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

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

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

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

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

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

        Alternative 5: 76.0% accurate, 1.5× speedup?

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

          1. Initial program 13.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 rewrites44.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 -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-/.f6474.2

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

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

          if -2.21999999999999994e24 < A < 1.35000000000000009e63

          1. Initial program 55.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 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.f6480.9

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

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

          if 1.35000000000000009e63 < A

          1. Initial program 85.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 rewrites96.7%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.22 \cdot 10^{+24}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.35 \cdot 10^{+63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\mathsf{hypot}\left(B, A\right) + A}{-B}\right)}{\pi}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 6: 76.0% accurate, 1.5× speedup?

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

          1. Initial program 13.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 rewrites44.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 -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-/.f6474.2

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

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

          if -2.21999999999999994e24 < A < 1.35000000000000009e63

          1. Initial program 55.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 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.f6480.9

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

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

          if 1.35000000000000009e63 < A

          1. Initial program 85.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 0

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.22 \cdot 10^{+24}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.35 \cdot 10^{+63}:\\ \;\;\;\;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{\mathsf{hypot}\left(A, B\right) + A}{-B}\right)}{\pi}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 7: 74.6% accurate, 1.5× speedup?

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

          1. Initial program 13.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 rewrites44.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 -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-/.f6474.2

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

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

          if -2.21999999999999994e24 < A < 3.4000000000000001e58

          1. Initial program 55.0%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. Add Preprocessing
          3. Taylor expanded in A around 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.f6480.8

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

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

          if 3.4000000000000001e58 < A

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.22 \cdot 10^{+24}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.4 \cdot 10^{+58}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 8: 58.4% accurate, 2.5× speedup?

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

          1. Initial program 13.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 rewrites44.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 -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-/.f6474.2

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

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

          if -1.79999999999999992e24 < A < 6.00000000000000012e-179

          1. Initial program 55.8%

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

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

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

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

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

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

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

            \[\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 rewrites57.4%

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

            if 6.00000000000000012e-179 < A

            1. Initial program 72.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 rewrites91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\frac{B + A}{B}\right)}{\pi} \]
            10. Recombined 3 regimes into one program.
            11. Final simplification66.0%

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

            Alternative 9: 58.4% accurate, 2.5× speedup?

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

              1. Initial program 13.9%

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

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

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

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

              if -1.79999999999999992e24 < A < 6.00000000000000012e-179

              1. Initial program 55.8%

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

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

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

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

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

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

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

                \[\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 rewrites57.4%

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

                if 6.00000000000000012e-179 < A

                1. Initial program 72.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 rewrites91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\frac{B + A}{B}\right)}{\pi} \]
                10. Recombined 3 regimes into one program.
                11. Final simplification66.0%

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

                Alternative 10: 57.4% accurate, 2.5× speedup?

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

                  1. Initial program 13.9%

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

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

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

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

                  if -1.79999999999999992e24 < A < 5.4e62

                  1. Initial program 55.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 rewrites83.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. unpow2N/A

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

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

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

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

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

                    if 5.4e62 < A

                    1. Initial program 85.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 rewrites96.7%

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.8 \cdot 10^{+24}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\ \mathbf{elif}\;A \leq 5.4 \cdot 10^{+62}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
                  12. Add Preprocessing

                  Alternative 11: 55.3% accurate, 2.5× speedup?

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

                    1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 3.8e-233 < B < 1.60000000000000006e-152

                    1. Initial program 20.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 rewrites74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 1.60000000000000006e-152 < B

                    1. Initial program 50.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 rewrites75.5%

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

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

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

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

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

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

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

                      \[\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.6%

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

                    Alternative 12: 46.0% accurate, 2.5× speedup?

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

                      1. Initial program 43.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 rewrites57.7%

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

                        if -0.154999999999999999 < B < 3.8e-233

                        1. Initial program 70.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 rewrites82.3%

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

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

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

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

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

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

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

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

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

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

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

                        if 3.8e-233 < B < 1.3e-151

                        1. Initial program 20.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 rewrites74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.3e-151 < B

                        1. Initial program 50.9%

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

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -0.155:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-233}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-151}:\\ \;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
                        7. Add Preprocessing

                        Alternative 13: 50.6% accurate, 2.6× speedup?

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

                          1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 3.8e-233 < B < 1.3e-151

                          1. Initial program 20.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 rewrites74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 1.3e-151 < B

                          1. Initial program 50.9%

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

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

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.8 \cdot 10^{-233}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-151}:\\ \;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
                          7. Add Preprocessing

                          Alternative 14: 50.2% accurate, 2.6× speedup?

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

                            1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.7000000000000001e-233 < B < 1.3e-151

                            1. Initial program 20.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 rewrites74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.3e-151 < B

                            1. Initial program 50.9%

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

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.7 \cdot 10^{-233}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-151}:\\ \;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
                            7. Add Preprocessing

                            Alternative 15: 44.4% accurate, 2.8× speedup?

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

                              1. Initial program 54.8%

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

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

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

                                if -8.1999999999999998e-207 < B < 1.3e-151

                                1. Initial program 53.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 rewrites82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if 1.3e-151 < B

                                1. Initial program 50.9%

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

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

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8.2 \cdot 10^{-207}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-151}:\\ \;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
                                7. Add Preprocessing

                                Alternative 16: 39.8% accurate, 2.9× speedup?

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

                                  1. Initial program 56.2%

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

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

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

                                    if -1.44999999999999992e-301 < B

                                    1. Initial program 50.2%

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

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

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.45 \cdot 10^{-301}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
                                    7. 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 52.9%

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

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

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

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

                                      Reproduce

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