ABCF->ab-angle angle

Percentage Accurate: 54.6% → 89.0%
Time: 20.1s
Alternatives: 21
Speedup: 3.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 21 alternatives:

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

Initial Program: 54.6% accurate, 1.0× speedup?

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

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

Alternative 1: 89.0% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 57.6%

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

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

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

    1. Initial program 15.8%

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

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. distribute-neg-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      9. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      11. distribute-neg-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{-1}{2}}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \left(C - A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      14. --lowering--.f6499.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified99.1%

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

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

Alternative 2: 78.3% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;A \leq 4.5 \cdot 10^{-24}:\\
\;\;\;\;\frac{1}{\pi} \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{0.005555555555555556}\\

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


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

    1. Initial program 14.6%

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

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. *-lowering-*.f6483.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified83.5%

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

        \[\leadsto \tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right) \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
      2. un-div-invN/A

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

        \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right), \color{blue}{\left(\frac{\mathsf{PI}\left(\right)}{180}\right)}\right) \]
      4. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{1}{2}}{A}\right)\right), \left(\frac{\color{blue}{\mathsf{PI}\left(\right)}}{180}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}{A}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\mathsf{neg}\left(B \cdot \frac{-1}{2}\right)}{A}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(B \cdot \frac{-1}{2}\right)\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6483.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    9. Applied egg-rr83.6%

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

    if -1.8999999999999999e120 < A < 4.4999999999999997e-24

    1. Initial program 50.8%

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

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. hypot-lowering-hypot.f6477.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified77.5%

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{\mathsf{PI}\left(\right)}\right), \color{blue}{\left(\frac{\tan^{-1} \left(\frac{C - \sqrt{C \cdot C + B \cdot B}}{B}\right)}{\frac{1}{180}}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{PI}\left(\right)\right), \left(\frac{\color{blue}{\tan^{-1} \left(\frac{C - \sqrt{C \cdot C + B \cdot B}}{B}\right)}}{\frac{1}{180}}\right)\right) \]
      8. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{PI.f64}\left(\right)\right), \left(\frac{\tan^{-1} \left(\frac{C - \sqrt{C \cdot C + B \cdot B}}{B}\right)}{\frac{1}{180}}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{PI.f64}\left(\right)\right), \mathsf{/.f64}\left(\tan^{-1} \left(\frac{C - \sqrt{C \cdot C + B \cdot B}}{B}\right), \color{blue}{\left(\frac{1}{180}\right)}\right)\right) \]
    9. Applied egg-rr77.6%

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

    if 4.4999999999999997e-24 < 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. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\sqrt{{A}^{2} + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\sqrt{A \cdot A + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\sqrt{A \cdot A + B \cdot B}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\mathsf{hypot}\left(A, B\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      8. hypot-lowering-hypot.f6488.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(A, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified88.7%

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

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

Alternative 3: 78.3% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 14.6%

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

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. *-lowering-*.f6483.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified83.5%

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

        \[\leadsto \tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right) \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
      2. un-div-invN/A

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

        \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right), \color{blue}{\left(\frac{\mathsf{PI}\left(\right)}{180}\right)}\right) \]
      4. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{1}{2}}{A}\right)\right), \left(\frac{\color{blue}{\mathsf{PI}\left(\right)}}{180}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}{A}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\mathsf{neg}\left(B \cdot \frac{-1}{2}\right)}{A}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(B \cdot \frac{-1}{2}\right)\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6483.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    9. Applied egg-rr83.6%

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

    if -2.6999999999999998e122 < A < 2.7999999999999997e-23

    1. Initial program 50.8%

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

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. hypot-lowering-hypot.f6477.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified77.5%

      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)} \cdot \frac{180}{\pi} \]
    8. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{1}{\frac{B}{C - \sqrt{C \cdot C + B \cdot B}}}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{B}{C - \sqrt{C \cdot C + B \cdot B}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \left(C - \sqrt{C \cdot C + B \cdot B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, \left(\sqrt{B \cdot B + C \cdot C}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(B, C\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. hypot-lowering-hypot.f6477.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(B, C\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    9. Applied egg-rr77.5%

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

    if 2.7999999999999997e-23 < 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. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\sqrt{{A}^{2} + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\sqrt{A \cdot A + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\sqrt{A \cdot A + B \cdot B}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\mathsf{hypot}\left(A, B\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      8. hypot-lowering-hypot.f6488.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(A, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified88.7%

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

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

Alternative 4: 75.4% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;A \leq 1.02 \cdot 10^{+117}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{\frac{B}{C - \mathsf{hypot}\left(B, C\right)}}\right)\\

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


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

    1. Initial program 14.6%

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

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. *-lowering-*.f6483.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified83.5%

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

        \[\leadsto \tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right) \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
      2. un-div-invN/A

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

        \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right), \color{blue}{\left(\frac{\mathsf{PI}\left(\right)}{180}\right)}\right) \]
      4. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{1}{2}}{A}\right)\right), \left(\frac{\color{blue}{\mathsf{PI}\left(\right)}}{180}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}{A}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\mathsf{neg}\left(B \cdot \frac{-1}{2}\right)}{A}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(B \cdot \frac{-1}{2}\right)\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6483.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    9. Applied egg-rr83.6%

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

    if -1.0199999999999999e118 < A < 1.02e117

    1. Initial program 53.4%

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

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. hypot-lowering-hypot.f6476.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified76.7%

      \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)} \cdot \frac{180}{\pi} \]
    8. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{1}{\frac{B}{C - \sqrt{C \cdot C + B \cdot B}}}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{B}{C - \sqrt{C \cdot C + B \cdot B}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \left(C - \sqrt{C \cdot C + B \cdot B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, \left(\sqrt{B \cdot B + C \cdot C}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(B, C\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. hypot-lowering-hypot.f6476.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(B, C\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    9. Applied egg-rr76.7%

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

    if 1.02e117 < A

    1. Initial program 80.0%

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

      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. associate--r+N/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. --lowering--.f6485.6%

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
    5. Simplified85.6%

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

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

Alternative 5: 75.5% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;A \leq 9.5 \cdot 10^{+116}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)\\

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


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

    1. Initial program 14.6%

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

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. *-lowering-*.f6483.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified83.5%

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

        \[\leadsto \tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right) \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
      2. un-div-invN/A

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

        \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right), \color{blue}{\left(\frac{\mathsf{PI}\left(\right)}{180}\right)}\right) \]
      4. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{1}{2}}{A}\right)\right), \left(\frac{\color{blue}{\mathsf{PI}\left(\right)}}{180}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}{A}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\mathsf{neg}\left(B \cdot \frac{-1}{2}\right)}{A}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(B \cdot \frac{-1}{2}\right)\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6483.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    9. Applied egg-rr83.6%

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

    if -3.7999999999999998e120 < A < 9.5000000000000004e116

    1. Initial program 53.4%

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

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. hypot-lowering-hypot.f6476.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified76.7%

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

    if 9.5000000000000004e116 < A

    1. Initial program 80.0%

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

      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. associate--r+N/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. --lowering--.f6485.6%

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
    5. Simplified85.6%

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

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

Alternative 6: 80.3% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 14.6%

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

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. *-lowering-*.f6483.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified83.5%

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

        \[\leadsto \tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right) \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
      2. un-div-invN/A

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

        \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right), \color{blue}{\left(\frac{\mathsf{PI}\left(\right)}{180}\right)}\right) \]
      4. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{1}{2}}{A}\right)\right), \left(\frac{\color{blue}{\mathsf{PI}\left(\right)}}{180}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)}{A}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\mathsf{neg}\left(B \cdot \frac{-1}{2}\right)}{A}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(B \cdot \frac{-1}{2}\right)\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6483.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    9. Applied egg-rr83.6%

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

    if -1.15e122 < A

    1. Initial program 57.1%

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

      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \color{blue}{\left(\sqrt{{B}^{2} + {C}^{2}}\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\sqrt{C \cdot C + {B}^{2}}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\sqrt{C \cdot C + B \cdot B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\mathsf{hypot}\left(C, B\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. hypot-lowering-hypot.f6481.8%

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(C, B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
    5. Simplified81.8%

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

Alternative 7: 61.0% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
t_1 := \frac{C - A}{B}\\
t_2 := t\_1 + -1\\
\mathbf{if}\;B \leq -2.95 \cdot 10^{+79}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\

\mathbf{elif}\;B \leq -2.1 \cdot 10^{-290}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;B \leq 1.25 \cdot 10^{-211}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} t\_2}{\pi}\\

\mathbf{elif}\;B \leq 2 \cdot 10^{-106}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < -2.95e79

    1. Initial program 40.6%

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

        \[\leadsto \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)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. Simplified80.3%

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

      if -2.95e79 < B < -2.1000000000000001e-290 or 1.2500000000000001e-211 < B < 1.99999999999999988e-106

      1. Initial program 42.9%

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

          \[\leadsto \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)} \cdot \color{blue}{180} \]
        2. associate-*l/N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. associate-/l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        5. distribute-neg-fracN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        7. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        11. distribute-neg-fracN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{-1}{2}}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        13. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \left(C - A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        14. --lowering--.f6462.9%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. Simplified62.9%

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

      if -2.1000000000000001e-290 < B < 1.2500000000000001e-211

      1. Initial program 82.9%

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

          \[\leadsto \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)} \cdot \color{blue}{180} \]
        2. associate-*l/N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. associate--r+N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. div-subN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. --lowering--.f6477.1%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. Simplified77.1%

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

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

          \[\leadsto \mathsf{/.f64}\left(\left(\tan^{-1} \left(\frac{C - A}{B} - 1\right) \cdot 180\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\left(180 \cdot \tan^{-1} \left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI}\left(\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \tan^{-1} \left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI}\left(\right)\right) \]
        5. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        6. sub-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        7. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{C - A}{B} + -1\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        8. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(-1 + \frac{C - A}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \left(\frac{C - A}{B}\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(\left(C - A\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        11. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        12. PI-lowering-PI.f6477.1%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. Applied egg-rr77.1%

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

      if 1.99999999999999988e-106 < B

      1. Initial program 60.5%

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

          \[\leadsto \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)} \cdot \color{blue}{180} \]
        2. associate-*l/N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\left(\frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{{B}^{2}} + \frac{C}{B}\right) - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. Step-by-step derivation
        1. associate--l+N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{{B}^{2}} + \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right) + \frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{{B}^{2}}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right), \left(\frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{{B}^{2}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right), \left(\frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{{B}^{2}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        5. associate--r+N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right), \left(\frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{{B}^{2}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. div-subN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{C - A}{B} - 1\right), \left(\frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{{B}^{2}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        7. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right), \left(\frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{{B}^{2}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right), \left(\frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{{B}^{2}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        9. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \left(\frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{{B}^{2}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{\left(C - A\right)}^{2}}{{B}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left({\left(C - A\right)}^{2}\right), \left({B}^{2}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        12. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(\left(C - A\right) \cdot \left(C - A\right)\right), \left({B}^{2}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(C - A\right), \left(C - A\right)\right), \left({B}^{2}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        14. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(C - A\right)\right), \left({B}^{2}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        15. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{\_.f64}\left(C, A\right)\right), \left({B}^{2}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        16. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{\_.f64}\left(C, A\right)\right), \left(B \cdot B\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        17. *-lowering-*.f6471.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{\_.f64}\left(C, A\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. Simplified71.2%

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{C - A}{B} \cdot \frac{C - A}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. clear-numN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{C - A}{B} \cdot \frac{1}{\frac{B}{C - A}}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. un-div-invN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{\frac{C - A}{B}}{\frac{B}{C - A}}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(\frac{C - A}{B}\right), \left(\frac{B}{C - A}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), \left(\frac{B}{C - A}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \left(\frac{B}{C - A}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. --lowering--.f6481.1%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right), \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      9. Applied egg-rr81.1%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.95 \cdot 10^{+79}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -2.1 \cdot 10^{-290}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-211}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \mathbf{elif}\;B \leq 2 \cdot 10^{-106}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\left(\frac{C - A}{B} + -1\right) + -0.5 \cdot \frac{\frac{C - A}{B}}{\frac{B}{C - A}}\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 8: 60.6% accurate, 3.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \mathbf{if}\;B \leq -6.2 \cdot 10^{+79}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -2.4 \cdot 10^{-290}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{-210}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 1.9 \cdot 10^{-112}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A))))))
            (t_1 (/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI)))
       (if (<= B -6.2e+79)
         (* (/ 180.0 PI) (atan 1.0))
         (if (<= B -2.4e-290)
           t_0
           (if (<= B 1.2e-210) t_1 (if (<= B 1.9e-112) t_0 t_1))))))
    double code(double A, double B, double C) {
    	double t_0 = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
    	double t_1 = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
    	double tmp;
    	if (B <= -6.2e+79) {
    		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
    	} else if (B <= -2.4e-290) {
    		tmp = t_0;
    	} else if (B <= 1.2e-210) {
    		tmp = t_1;
    	} else if (B <= 1.9e-112) {
    		tmp = t_0;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
    	double t_1 = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
    	double tmp;
    	if (B <= -6.2e+79) {
    		tmp = (180.0 / Math.PI) * Math.atan(1.0);
    	} else if (B <= -2.4e-290) {
    		tmp = t_0;
    	} else if (B <= 1.2e-210) {
    		tmp = t_1;
    	} else if (B <= 1.9e-112) {
    		tmp = t_0;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A))))
    	t_1 = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi
    	tmp = 0
    	if B <= -6.2e+79:
    		tmp = (180.0 / math.pi) * math.atan(1.0)
    	elif B <= -2.4e-290:
    		tmp = t_0
    	elif B <= 1.2e-210:
    		tmp = t_1
    	elif B <= 1.9e-112:
    		tmp = t_0
    	else:
    		tmp = t_1
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A)))))
    	t_1 = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi)
    	tmp = 0.0
    	if (B <= -6.2e+79)
    		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
    	elseif (B <= -2.4e-290)
    		tmp = t_0;
    	elseif (B <= 1.2e-210)
    		tmp = t_1;
    	elseif (B <= 1.9e-112)
    		tmp = t_0;
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = (180.0 / pi) * atan((B * (-0.5 / (C - A))));
    	t_1 = (180.0 * atan((((C - A) / B) + -1.0))) / pi;
    	tmp = 0.0;
    	if (B <= -6.2e+79)
    		tmp = (180.0 / pi) * atan(1.0);
    	elseif (B <= -2.4e-290)
    		tmp = t_0;
    	elseif (B <= 1.2e-210)
    		tmp = t_1;
    	elseif (B <= 1.9e-112)
    		tmp = t_0;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -6.2e+79], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.4e-290], t$95$0, If[LessEqual[B, 1.2e-210], t$95$1, If[LessEqual[B, 1.9e-112], t$95$0, t$95$1]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
    t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
    \mathbf{if}\;B \leq -6.2 \cdot 10^{+79}:\\
    \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
    
    \mathbf{elif}\;B \leq -2.4 \cdot 10^{-290}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.2 \cdot 10^{-210}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq 1.9 \cdot 10^{-112}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if B < -6.1999999999999998e79

      1. Initial program 40.6%

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

          \[\leadsto \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)} \cdot \color{blue}{180} \]
        2. associate-*l/N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. Step-by-step derivation
        1. Simplified80.3%

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

        if -6.1999999999999998e79 < B < -2.4000000000000001e-290 or 1.20000000000000002e-210 < B < 1.89999999999999997e-112

        1. Initial program 42.7%

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

            \[\leadsto \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)} \cdot \color{blue}{180} \]
          2. associate-*l/N/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          3. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. distribute-neg-fracN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          9. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          10. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          11. distribute-neg-fracN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          12. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{-1}{2}}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          13. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \left(C - A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          14. --lowering--.f6463.1%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        7. Simplified63.1%

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

        if -2.4000000000000001e-290 < B < 1.20000000000000002e-210 or 1.89999999999999997e-112 < B

        1. Initial program 63.7%

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

            \[\leadsto \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)} \cdot \color{blue}{180} \]
          2. associate-*l/N/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          2. associate--r+N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          3. div-subN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. --lowering--.f6478.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        7. Simplified78.7%

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

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

            \[\leadsto \mathsf{/.f64}\left(\left(\tan^{-1} \left(\frac{C - A}{B} - 1\right) \cdot 180\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\left(180 \cdot \tan^{-1} \left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI}\left(\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \tan^{-1} \left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI}\left(\right)\right) \]
          5. atan-lowering-atan.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
          6. sub-negN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
          7. metadata-evalN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{C - A}{B} + -1\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
          8. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(-1 + \frac{C - A}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
          9. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \left(\frac{C - A}{B}\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(\left(C - A\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
          11. --lowering--.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
          12. PI-lowering-PI.f6478.7%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        9. Applied egg-rr78.7%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.2 \cdot 10^{+79}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -2.4 \cdot 10^{-290}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{-210}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.9 \cdot 10^{-112}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 9: 60.5% accurate, 3.2× speedup?

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

        1. Initial program 40.6%

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

            \[\leadsto \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)} \cdot \color{blue}{180} \]
          2. associate-*l/N/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. Step-by-step derivation
          1. Simplified80.3%

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

          if -2.99999999999999974e79 < B < -1.0500000000000001e-290 or 7.8e-212 < B < 2.0999999999999999e-108

          1. Initial program 42.7%

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

              \[\leadsto \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)} \cdot \color{blue}{180} \]
            2. associate-*l/N/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. distribute-neg-fracN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            11. distribute-neg-fracN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            12. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{-1}{2}}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            13. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \left(C - A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            14. --lowering--.f6463.1%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. Simplified63.1%

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

          if -1.0500000000000001e-290 < B < 7.8e-212

          1. Initial program 82.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 \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. associate--r+N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. div-subN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. --lowering--.f6477.1%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified77.1%

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

          if 2.0999999999999999e-108 < B

          1. Initial program 60.3%

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

              \[\leadsto \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)} \cdot \color{blue}{180} \]
            2. associate-*l/N/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. associate--r+N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. div-subN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. --lowering--.f6479.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. Simplified79.0%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3 \cdot 10^{+79}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -1.05 \cdot 10^{-290}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ \mathbf{elif}\;B \leq 7.8 \cdot 10^{-212}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-108}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 10: 60.6% accurate, 3.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \mathbf{if}\;B \leq -2.5 \cdot 10^{+79}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -3.9 \cdot 10^{-291}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 7.5 \cdot 10^{-211}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-118}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (A B C)
         :precision binary64
         (let* ((t_0 (* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A))))))
                (t_1 (* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI))))
           (if (<= B -2.5e+79)
             (* (/ 180.0 PI) (atan 1.0))
             (if (<= B -3.9e-291)
               t_0
               (if (<= B 7.5e-211) t_1 (if (<= B 6e-118) t_0 t_1))))))
        double code(double A, double B, double C) {
        	double t_0 = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
        	double t_1 = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
        	double tmp;
        	if (B <= -2.5e+79) {
        		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
        	} else if (B <= -3.9e-291) {
        		tmp = t_0;
        	} else if (B <= 7.5e-211) {
        		tmp = t_1;
        	} else if (B <= 6e-118) {
        		tmp = t_0;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        public static double code(double A, double B, double C) {
        	double t_0 = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
        	double t_1 = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
        	double tmp;
        	if (B <= -2.5e+79) {
        		tmp = (180.0 / Math.PI) * Math.atan(1.0);
        	} else if (B <= -3.9e-291) {
        		tmp = t_0;
        	} else if (B <= 7.5e-211) {
        		tmp = t_1;
        	} else if (B <= 6e-118) {
        		tmp = t_0;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(A, B, C):
        	t_0 = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A))))
        	t_1 = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi)
        	tmp = 0
        	if B <= -2.5e+79:
        		tmp = (180.0 / math.pi) * math.atan(1.0)
        	elif B <= -3.9e-291:
        		tmp = t_0
        	elif B <= 7.5e-211:
        		tmp = t_1
        	elif B <= 6e-118:
        		tmp = t_0
        	else:
        		tmp = t_1
        	return tmp
        
        function code(A, B, C)
        	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A)))))
        	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi))
        	tmp = 0.0
        	if (B <= -2.5e+79)
        		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
        	elseif (B <= -3.9e-291)
        		tmp = t_0;
        	elseif (B <= 7.5e-211)
        		tmp = t_1;
        	elseif (B <= 6e-118)
        		tmp = t_0;
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(A, B, C)
        	t_0 = (180.0 / pi) * atan((B * (-0.5 / (C - A))));
        	t_1 = 180.0 * (atan((((C - A) / B) + -1.0)) / pi);
        	tmp = 0.0;
        	if (B <= -2.5e+79)
        		tmp = (180.0 / pi) * atan(1.0);
        	elseif (B <= -3.9e-291)
        		tmp = t_0;
        	elseif (B <= 7.5e-211)
        		tmp = t_1;
        	elseif (B <= 6e-118)
        		tmp = t_0;
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.5e+79], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.9e-291], t$95$0, If[LessEqual[B, 7.5e-211], t$95$1, If[LessEqual[B, 6e-118], t$95$0, t$95$1]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
        t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
        \mathbf{if}\;B \leq -2.5 \cdot 10^{+79}:\\
        \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
        
        \mathbf{elif}\;B \leq -3.9 \cdot 10^{-291}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;B \leq 7.5 \cdot 10^{-211}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;B \leq 6 \cdot 10^{-118}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -2.5e79

          1. Initial program 40.6%

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

              \[\leadsto \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)} \cdot \color{blue}{180} \]
            2. associate-*l/N/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. Step-by-step derivation
            1. Simplified80.3%

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

            if -2.5e79 < B < -3.90000000000000016e-291 or 7.5000000000000003e-211 < B < 6.00000000000000035e-118

            1. Initial program 42.7%

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

                \[\leadsto \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)} \cdot \color{blue}{180} \]
              2. associate-*l/N/A

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. associate-/l*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. distribute-neg-fracN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              9. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              10. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              11. distribute-neg-fracN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{-1}{2}}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \left(C - A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              14. --lowering--.f6463.1%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. Simplified63.1%

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

            if -3.90000000000000016e-291 < B < 7.5000000000000003e-211 or 6.00000000000000035e-118 < B

            1. Initial program 63.7%

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. associate--r+N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. div-subN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. --lowering--.f6478.7%

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. Simplified78.7%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.5 \cdot 10^{+79}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -3.9 \cdot 10^{-291}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ \mathbf{elif}\;B \leq 7.5 \cdot 10^{-211}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-118}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
          9. Add Preprocessing

          Alternative 11: 51.2% accurate, 3.4× speedup?

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

            1. Initial program 40.0%

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

                \[\leadsto \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)} \cdot \color{blue}{180} \]
              2. associate-*l/N/A

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. Step-by-step derivation
              1. Simplified62.4%

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

              if -2.6999999999999997e-35 < B < 1.84999999999999992e-181

              1. Initial program 57.8%

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

                  \[\leadsto \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)} \cdot \color{blue}{180} \]
                2. associate-*l/N/A

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                2. associate--r+N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                3. div-subN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                4. --lowering--.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                6. --lowering--.f6450.0%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. Simplified50.0%

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              9. Step-by-step derivation
                1. /-lowering-/.f6443.6%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(C, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              10. Simplified43.6%

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

              if 1.84999999999999992e-181 < B < 5.40000000000000005e-117

              1. Initial program 26.8%

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

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. Step-by-step derivation
                1. associate-*r/N/A

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                3. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                4. *-lowering-*.f6452.6%

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. Simplified52.6%

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

              if 5.40000000000000005e-117 < B

              1. Initial program 60.3%

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

                  \[\leadsto \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)} \cdot \color{blue}{180} \]
                2. associate-*l/N/A

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                2. associate--r+N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                3. div-subN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                4. --lowering--.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                6. --lowering--.f6479.0%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. Simplified79.0%

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              9. Step-by-step derivation
                1. distribute-lft-inN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                2. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                3. mul-1-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + \left(\mathsf{neg}\left(\frac{A}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                4. unsub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 - \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                5. --lowering--.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \left(\frac{A}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                6. /-lowering-/.f6471.5%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(A, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              10. Simplified71.5%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.7 \cdot 10^{-35}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{-181}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;B \leq 5.4 \cdot 10^{-117}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\ \end{array} \]
            9. Add Preprocessing

            Alternative 12: 47.5% accurate, 3.4× speedup?

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

              1. Initial program 40.0%

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

                  \[\leadsto \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)} \cdot \color{blue}{180} \]
                2. associate-*l/N/A

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. Step-by-step derivation
                1. Simplified62.4%

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

                if -1.80000000000000009e-35 < B < 6.50000000000000014e-183

                1. Initial program 57.8%

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

                    \[\leadsto \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)} \cdot \color{blue}{180} \]
                  2. associate-*l/N/A

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                6. Step-by-step derivation
                  1. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  2. associate--r+N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  3. div-subN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  4. --lowering--.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  5. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. --lowering--.f6450.0%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                7. Simplified50.0%

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                9. Step-by-step derivation
                  1. /-lowering-/.f6443.6%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(C, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                10. Simplified43.6%

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

                if 6.50000000000000014e-183 < B < 5.49999999999999974e40

                1. Initial program 49.9%

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

                    \[\leadsto \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)} \cdot \color{blue}{180} \]
                  2. associate-*l/N/A

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                6. Step-by-step derivation
                  1. associate-*r/N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  2. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  4. *-lowering-*.f6438.1%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                7. Simplified38.1%

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{1}{2}}{A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  2. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2}}{A} \cdot B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{1}{2}}{A}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  4. /-lowering-/.f6438.1%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, A\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                9. Applied egg-rr38.1%

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

                if 5.49999999999999974e40 < B

                1. Initial program 58.8%

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

                    \[\leadsto \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)} \cdot \color{blue}{180} \]
                  2. associate-*l/N/A

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                6. Step-by-step derivation
                  1. Simplified78.6%

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.8 \cdot 10^{-35}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-183}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{+40}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                9. Add Preprocessing

                Alternative 13: 47.4% accurate, 3.4× speedup?

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

                  1. Initial program 40.0%

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

                      \[\leadsto \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)} \cdot \color{blue}{180} \]
                    2. associate-*l/N/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. Simplified62.4%

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

                    if -1.3499999999999999e-28 < B < 7.1999999999999998e-180

                    1. Initial program 57.8%

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

                        \[\leadsto \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)} \cdot \color{blue}{180} \]
                      2. associate-*l/N/A

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. Step-by-step derivation
                      1. +-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      2. associate--r+N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      3. div-subN/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      4. --lowering--.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      5. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      6. --lowering--.f6450.0%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    7. Simplified50.0%

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    9. Step-by-step derivation
                      1. /-lowering-/.f6443.6%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(C, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    10. Simplified43.6%

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

                    if 7.1999999999999998e-180 < B < 1.04999999999999998e42

                    1. Initial program 49.9%

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

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. Step-by-step derivation
                      1. associate-*r/N/A

                        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                      2. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                      4. *-lowering-*.f6438.0%

                        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. Simplified38.0%

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

                    if 1.04999999999999998e42 < B

                    1. Initial program 58.8%

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

                        \[\leadsto \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)} \cdot \color{blue}{180} \]
                      2. associate-*l/N/A

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. Step-by-step derivation
                      1. Simplified78.6%

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.35 \cdot 10^{-28}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-180}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{+42}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 14: 56.8% accurate, 3.5× speedup?

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

                      1. Initial program 40.8%

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

                          \[\leadsto \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)} \cdot \color{blue}{180} \]
                        2. associate-*l/N/A

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      6. Step-by-step derivation
                        1. Simplified76.7%

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

                        if -2.99999999999999998e53 < B < -6.99999999999999963e-290

                        1. Initial program 47.5%

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

                          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B} + \frac{-1}{2} \cdot \frac{B}{C}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        4. Step-by-step derivation
                          1. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. associate-*r/N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. distribute-rgt1-inN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(\left(-1 + 1\right) \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(0 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. mul0-lftN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot 0}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{0}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          7. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          8. associate-*r/N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{\frac{-1}{2} \cdot B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          9. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot B\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          10. *-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(B \cdot \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          11. *-lowering-*.f6449.3%

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        5. Simplified49.3%

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right), \mathsf{PI}\left(\right)\right), 180\right) \]
                          4. div0N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\tan^{-1} \left(0 + \frac{B \cdot \frac{-1}{2}}{C}\right), \mathsf{PI}\left(\right)\right), 180\right) \]
                          5. +-lft-identityN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right), \mathsf{PI}\left(\right)\right), 180\right) \]
                          6. atan-lowering-atan.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C}\right)\right), \mathsf{PI}\left(\right)\right), 180\right) \]
                          7. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{-1}{2}\right), C\right)\right), \mathsf{PI}\left(\right)\right), 180\right) \]
                          8. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right), \mathsf{PI}\left(\right)\right), 180\right) \]
                          9. PI-lowering-PI.f6449.3%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
                        7. Applied egg-rr49.3%

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

                        if -6.99999999999999963e-290 < B

                        1. Initial program 57.6%

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

                          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        4. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. associate--r+N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. div-subN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. --lowering--.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. --lowering--.f6469.2%

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        5. Simplified69.2%

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

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

                      Alternative 15: 60.2% accurate, 3.5× speedup?

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

                        1. Initial program 70.9%

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

                            \[\leadsto \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)} \cdot \color{blue}{180} \]
                          2. associate-*l/N/A

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        6. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. associate--r+N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. div-subN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. --lowering--.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. --lowering--.f6474.6%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        7. Simplified74.6%

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

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

                            \[\leadsto \mathsf{/.f64}\left(\left(\tan^{-1} \left(\frac{C - A}{B} - 1\right) \cdot 180\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                          3. *-commutativeN/A

                            \[\leadsto \mathsf{/.f64}\left(\left(180 \cdot \tan^{-1} \left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI}\left(\right)\right) \]
                          4. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \tan^{-1} \left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI}\left(\right)\right) \]
                          5. atan-lowering-atan.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
                          6. sub-negN/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{C - A}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
                          7. metadata-evalN/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{C - A}{B} + -1\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
                          8. +-commutativeN/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(-1 + \frac{C - A}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
                          9. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \left(\frac{C - A}{B}\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
                          10. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(\left(C - A\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
                          11. --lowering--.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
                          12. PI-lowering-PI.f6474.6%

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                        9. Applied egg-rr74.6%

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

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - 1\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                        11. Step-by-step derivation
                          1. sub-negN/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{C}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                          2. metadata-evalN/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{C}{B} + -1\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                          3. +-commutativeN/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(-1 + \frac{C}{B}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                          4. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \left(\frac{C}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                          5. /-lowering-/.f6473.8%

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(C, B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                        12. Simplified73.8%

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

                        if -1.7500000000000001e-137 < C < 4.4e17

                        1. Initial program 50.5%

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

                            \[\leadsto \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)} \cdot \color{blue}{180} \]
                          2. associate-*l/N/A

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        6. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. associate--r+N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. div-subN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. --lowering--.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. --lowering--.f6447.0%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        7. Simplified47.0%

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        9. Step-by-step derivation
                          1. distribute-lft-inN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. mul-1-negN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + \left(\mathsf{neg}\left(\frac{A}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. unsub-negN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 - \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. --lowering--.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \left(\frac{A}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. /-lowering-/.f6447.2%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(A, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        10. Simplified47.2%

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

                        if 4.4e17 < C

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

                          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B} + \frac{-1}{2} \cdot \frac{B}{C}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        4. Step-by-step derivation
                          1. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. associate-*r/N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. distribute-rgt1-inN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(\left(-1 + 1\right) \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(0 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. mul0-lftN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot 0}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{0}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          7. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          8. associate-*r/N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{\frac{-1}{2} \cdot B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          9. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot B\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          10. *-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(B \cdot \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          11. *-lowering-*.f6473.4%

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        5. Simplified73.4%

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

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

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

                            \[\leadsto \tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \color{blue}{\left(\frac{1}{\mathsf{PI}\left(\right)} \cdot 180\right)} \]
                          4. associate-/r/N/A

                            \[\leadsto \tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
                          5. clear-numN/A

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

                            \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
                          7. div0N/A

                            \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(0 + \frac{B \cdot \frac{-1}{2}}{C}\right), \left(\frac{180}{\mathsf{PI}\left(\right)}\right)\right) \]
                          8. +-lft-identityN/A

                            \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right), \left(\frac{180}{\mathsf{PI}\left(\right)}\right)\right) \]
                          9. atan-lowering-atan.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C}\right)\right), \left(\frac{\color{blue}{180}}{\mathsf{PI}\left(\right)}\right)\right) \]
                          10. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{-1}{2}\right), C\right)\right), \left(\frac{180}{\mathsf{PI}\left(\right)}\right)\right) \]
                          11. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right), \left(\frac{180}{\mathsf{PI}\left(\right)}\right)\right) \]
                          12. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right), \mathsf{/.f64}\left(180, \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                          13. PI-lowering-PI.f6473.4%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        7. Applied egg-rr73.4%

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

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

                      Alternative 16: 60.2% accurate, 3.5× speedup?

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

                        1. Initial program 70.9%

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

                            \[\leadsto \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)} \cdot \color{blue}{180} \]
                          2. associate-*l/N/A

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        6. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. associate--r+N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. div-subN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. --lowering--.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. --lowering--.f6474.6%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        7. Simplified74.6%

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(\frac{C}{B}\right)}, 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        9. Step-by-step derivation
                          1. /-lowering-/.f6473.8%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(C, B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        10. Simplified73.8%

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

                        if -1.44999999999999993e-137 < C < 4.3e16

                        1. Initial program 50.5%

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

                            \[\leadsto \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)} \cdot \color{blue}{180} \]
                          2. associate-*l/N/A

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        6. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. associate--r+N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. div-subN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. --lowering--.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. --lowering--.f6447.0%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        7. Simplified47.0%

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        9. Step-by-step derivation
                          1. distribute-lft-inN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. mul-1-negN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + \left(\mathsf{neg}\left(\frac{A}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. unsub-negN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 - \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. --lowering--.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \left(\frac{A}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. /-lowering-/.f6447.2%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(A, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        10. Simplified47.2%

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

                        if 4.3e16 < C

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

                          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B} + \frac{-1}{2} \cdot \frac{B}{C}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        4. Step-by-step derivation
                          1. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. associate-*r/N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. distribute-rgt1-inN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(\left(-1 + 1\right) \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(0 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. mul0-lftN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot 0}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{0}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          7. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          8. associate-*r/N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{\frac{-1}{2} \cdot B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          9. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot B\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          10. *-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(B \cdot \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          11. *-lowering-*.f6473.4%

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        5. Simplified73.4%

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

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

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

                            \[\leadsto \tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \color{blue}{\left(\frac{1}{\mathsf{PI}\left(\right)} \cdot 180\right)} \]
                          4. associate-/r/N/A

                            \[\leadsto \tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
                          5. clear-numN/A

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

                            \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
                          7. div0N/A

                            \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(0 + \frac{B \cdot \frac{-1}{2}}{C}\right), \left(\frac{180}{\mathsf{PI}\left(\right)}\right)\right) \]
                          8. +-lft-identityN/A

                            \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right), \left(\frac{180}{\mathsf{PI}\left(\right)}\right)\right) \]
                          9. atan-lowering-atan.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C}\right)\right), \left(\frac{\color{blue}{180}}{\mathsf{PI}\left(\right)}\right)\right) \]
                          10. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{-1}{2}\right), C\right)\right), \left(\frac{180}{\mathsf{PI}\left(\right)}\right)\right) \]
                          11. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right), \left(\frac{180}{\mathsf{PI}\left(\right)}\right)\right) \]
                          12. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right), \mathsf{/.f64}\left(180, \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                          13. PI-lowering-PI.f6473.4%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        7. Applied egg-rr73.4%

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

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

                      Alternative 17: 60.0% accurate, 3.5× speedup?

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

                        1. Initial program 24.9%

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

                            \[\leadsto \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)} \cdot \color{blue}{180} \]
                          2. associate-*l/N/A

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        6. Step-by-step derivation
                          1. associate-*r/N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. *-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. *-lowering-*.f6465.6%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        7. Simplified65.6%

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{1}{2}}{A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. *-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2}}{A} \cdot B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{1}{2}}{A}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. /-lowering-/.f6465.4%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, A\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        9. Applied egg-rr65.4%

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

                        if -5.2000000000000002e-9 < A < 2.7999999999999999e-134

                        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. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \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)} \cdot \color{blue}{180} \]
                          2. associate-*l/N/A

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        6. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. associate--r+N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. div-subN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. --lowering--.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. --lowering--.f6454.7%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        7. Simplified54.7%

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(\frac{C}{B}\right)}, 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        9. Step-by-step derivation
                          1. /-lowering-/.f6454.8%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(C, B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        10. Simplified54.8%

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

                        if 2.7999999999999999e-134 < A

                        1. Initial program 66.0%

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

                            \[\leadsto \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)} \cdot \color{blue}{180} \]
                          2. associate-*l/N/A

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        6. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. associate--r+N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. div-subN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. --lowering--.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. --lowering--.f6467.5%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        7. Simplified67.5%

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        9. Step-by-step derivation
                          1. distribute-lft-inN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. mul-1-negN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + \left(\mathsf{neg}\left(\frac{A}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. unsub-negN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 - \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. --lowering--.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \left(\frac{A}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. /-lowering-/.f6466.7%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(A, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        10. Simplified66.7%

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

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

                      Alternative 18: 46.8% accurate, 3.6× speedup?

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

                        1. Initial program 40.0%

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

                            \[\leadsto \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)} \cdot \color{blue}{180} \]
                          2. associate-*l/N/A

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        6. Step-by-step derivation
                          1. Simplified62.4%

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

                          if -1.20000000000000001e-27 < B < 6.8e44

                          1. Initial program 54.7%

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

                              \[\leadsto \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)} \cdot \color{blue}{180} \]
                            2. associate-*l/N/A

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. Step-by-step derivation
                            1. +-commutativeN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                            2. associate--r+N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                            3. div-subN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                            4. --lowering--.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                            5. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                            6. --lowering--.f6449.4%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          7. Simplified49.4%

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          9. Step-by-step derivation
                            1. /-lowering-/.f6436.4%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(C, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          10. Simplified36.4%

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

                          if 6.8e44 < B

                          1. Initial program 58.1%

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

                              \[\leadsto \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)} \cdot \color{blue}{180} \]
                            2. associate-*l/N/A

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. Step-by-step derivation
                            1. Simplified79.7%

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.2 \cdot 10^{-27}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 6.8 \cdot 10^{+44}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                          9. Add Preprocessing

                          Alternative 19: 45.2% accurate, 3.6× speedup?

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

                            1. Initial program 42.0%

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

                                \[\leadsto \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)} \cdot \color{blue}{180} \]
                              2. associate-*l/N/A

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                            6. Step-by-step derivation
                              1. Simplified59.8%

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

                              if -1.54999999999999998e-89 < B < 6.9999999999999997e-91

                              1. Initial program 51.1%

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

                                  \[\leadsto \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)} \cdot \color{blue}{180} \]
                                2. associate-*l/N/A

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

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

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

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                              6. Step-by-step derivation
                                1. associate-*r/N/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                                2. distribute-rgt1-inN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-1 \cdot \left(\left(-1 + 1\right) \cdot A\right)}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                                3. metadata-evalN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-1 \cdot \left(0 \cdot A\right)}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                                4. mul0-lftN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-1 \cdot 0}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                                5. metadata-evalN/A

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{0}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                                6. /-lowering-/.f6432.0%

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(0, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                              7. Simplified32.0%

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

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

                                  \[\leadsto \mathsf{/.f64}\left(\left(\tan^{-1} \left(\frac{0}{B}\right) \cdot 180\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                                3. *-commutativeN/A

                                  \[\leadsto \mathsf{/.f64}\left(\left(180 \cdot \tan^{-1} \left(\frac{0}{B}\right)\right), \mathsf{PI}\left(\right)\right) \]
                                4. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \tan^{-1} \left(\frac{0}{B}\right)\right), \mathsf{PI}\left(\right)\right) \]
                                5. div0N/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \tan^{-1} 0\right), \mathsf{PI}\left(\right)\right) \]
                                6. atan-lowering-atan.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(0\right)\right), \mathsf{PI}\left(\right)\right) \]
                                7. PI-lowering-PI.f6432.0%

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(0\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                              9. Applied egg-rr32.0%

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

                              if 6.9999999999999997e-91 < B

                              1. Initial program 59.8%

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

                                  \[\leadsto \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)} \cdot \color{blue}{180} \]
                                2. associate-*l/N/A

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

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

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

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                              6. Step-by-step derivation
                                1. Simplified61.3%

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

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

                              Alternative 20: 40.6% accurate, 3.8× speedup?

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

                                1. Initial program 45.6%

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

                                    \[\leadsto \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)} \cdot \color{blue}{180} \]
                                  2. associate-*l/N/A

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

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

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

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                                6. Step-by-step derivation
                                  1. Simplified40.8%

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

                                  if -4.999999999999985e-310 < B

                                  1. Initial program 57.0%

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

                                      \[\leadsto \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)} \cdot \color{blue}{180} \]
                                    2. associate-*l/N/A

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

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

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

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

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                                  6. Step-by-step derivation
                                    1. Simplified45.4%

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

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                                  9. Add Preprocessing

                                  Alternative 21: 21.6% accurate, 4.0× speedup?

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

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

                                      \[\leadsto \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)} \cdot \color{blue}{180} \]
                                    2. associate-*l/N/A

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

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

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

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

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                                  6. Step-by-step derivation
                                    1. Simplified24.7%

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

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

                                    Reproduce

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