ABCF->ab-angle angle

Percentage Accurate: 54.0% → 85.7%
Time: 24.5s
Alternatives: 24
Speedup: 3.3×

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 24 alternatives:

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

Initial Program: 54.0% accurate, 1.0× speedup?

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

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

Alternative 1: 85.7% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 59.9%

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{1 \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}{B}\right)}}{\pi} \]
      3. *-un-lft-identity59.9%

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}}{B}\right)}{\pi} \]
      6. hypot-define91.7%

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

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

    if -5.0000000000000002e-62 < (*.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 18.9%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-9.5%

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)\right)\right)}{\pi} \]
      6. associate-/r/9.5%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}}}\right)}{\pi} \]
      14. hypot-define18.9%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 60.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. Step-by-step derivation
      1. associate--l-60.5%

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)\right)\right)}{\pi} \]
      6. associate-/r/82.9%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}}}\right)}{\pi} \]
      14. hypot-define88.0%

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

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

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

Alternative 2: 75.0% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.28 \cdot 10^{+209}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\

\mathbf{elif}\;A \leq -4.2 \cdot 10^{+174}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;A \leq -4.6 \cdot 10^{+101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\

\mathbf{elif}\;A \leq 4.7 \cdot 10^{+113}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -1.28e209

    1. Initial program 9.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 83.5%

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

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

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

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

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

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

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

    if -1.28e209 < A < -4.20000000000000033e174 or -4.6000000000000003e101 < A < 4.6999999999999998e113

    1. Initial program 55.2%

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
      3. hypot-define79.3%

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

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

    if -4.20000000000000033e174 < A < -4.6000000000000003e101

    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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-6.3%

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)\right)\right)}{\pi} \]
      6. associate-/r/29.5%

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\color{blue}{{B}^{2}} + \left(A - C\right) \cdot \left(A - C\right)}}}\right)}{\pi} \]
      10. unpow215.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{{B}^{2} + \color{blue}{{\left(A - C\right)}^{2}}}}}\right)}{\pi} \]
      11. +-commutative15.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\color{blue}{{\left(A - C\right)}^{2} + {B}^{2}}}}}\right)}{\pi} \]
      12. unpow215.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\color{blue}{\left(A - C\right) \cdot \left(A - C\right)} + {B}^{2}}}}\right)}{\pi} \]
      13. unpow215.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}}}\right)}{\pi} \]
      14. hypot-define39.3%

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\left(-A\right) \cdot \left(\frac{2 \cdot C}{A \cdot B} - \color{blue}{\frac{2 \cdot 1}{B}}\right)}\right)}{\pi} \]
      5. metadata-eval84.4%

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

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

    if 4.6999999999999998e113 < A

    1. Initial program 93.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 A around inf 94.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.28 \cdot 10^{+209}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.2 \cdot 10^{+174}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.6 \cdot 10^{+101}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.7 \cdot 10^{+113}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 75.0% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{if}\;A \leq -3.05 \cdot 10^{+208}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\

\mathbf{elif}\;A \leq -5.1 \cdot 10^{+175}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\

\mathbf{elif}\;A \leq -8.5 \cdot 10^{+110}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\

\mathbf{elif}\;A \leq 4.4 \cdot 10^{+113}:\\
\;\;\;\;\frac{180 \cdot t\_0}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if A < -3.04999999999999988e208

    1. Initial program 9.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 83.5%

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

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

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

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

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

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

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

    if -3.04999999999999988e208 < A < -5.10000000000000007e175

    1. Initial program 16.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 16.1%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
      3. hypot-define100.0%

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

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

    if -5.10000000000000007e175 < A < -8.5000000000000004e110

    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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-6.3%

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)\right)\right)}{\pi} \]
      6. associate-/r/29.5%

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\color{blue}{{B}^{2}} + \left(A - C\right) \cdot \left(A - C\right)}}}\right)}{\pi} \]
      10. unpow215.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{{B}^{2} + \color{blue}{{\left(A - C\right)}^{2}}}}}\right)}{\pi} \]
      11. +-commutative15.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\color{blue}{{\left(A - C\right)}^{2} + {B}^{2}}}}}\right)}{\pi} \]
      12. unpow215.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\color{blue}{\left(A - C\right) \cdot \left(A - C\right)} + {B}^{2}}}}\right)}{\pi} \]
      13. unpow215.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}}}\right)}{\pi} \]
      14. hypot-define39.3%

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\left(-A\right) \cdot \left(\frac{2 \cdot C}{A \cdot B} - \color{blue}{\frac{2 \cdot 1}{B}}\right)}\right)}{\pi} \]
      5. metadata-eval84.4%

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

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

    if -8.5000000000000004e110 < A < 4.40000000000000021e113

    1. Initial program 56.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 A around 0 50.9%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
      3. hypot-define78.6%

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

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

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

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

    if 4.40000000000000021e113 < A

    1. Initial program 93.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 A around inf 94.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.05 \cdot 10^{+208}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -5.1 \cdot 10^{+175}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -8.5 \cdot 10^{+110}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.4 \cdot 10^{+113}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.9% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;A \leq -4.4 \cdot 10^{+175} \lor \neg \left(A \leq -6 \cdot 10^{+120}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\

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


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

    1. Initial program 10.4%

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

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

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

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

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

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

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

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

    if -1.85000000000000001e229 < A < -4.3999999999999999e175 or -6e120 < A

    1. Initial program 60.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. associate-*l/60.4%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{1 \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}{B}\right)}}{\pi} \]
      2. *-lft-identity60.4%

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

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

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

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

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

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

    if -4.3999999999999999e175 < A < -6e120

    1. Initial program 7.4%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-6.6%

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)\right)\right)}{\pi} \]
      6. associate-/r/32.1%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}}}\right)}{\pi} \]
      14. hypot-define33.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.85 \cdot 10^{+229}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.4 \cdot 10^{+175} \lor \neg \left(A \leq -6 \cdot 10^{+120}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 81.5% accurate, 1.8× speedup?

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

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

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

\mathbf{elif}\;A \leq -8.6 \cdot 10^{+107}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -2.4499999999999998e208

    1. Initial program 9.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 83.5%

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

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

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

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

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

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

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

    if -2.4499999999999998e208 < A < -4.8e175

    1. Initial program 16.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 16.1%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
      3. hypot-define100.0%

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

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

    if -4.8e175 < A < -8.5999999999999999e107

    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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-6.3%

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)\right)\right)}{\pi} \]
      6. associate-/r/29.5%

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\color{blue}{{B}^{2}} + \left(A - C\right) \cdot \left(A - C\right)}}}\right)}{\pi} \]
      10. unpow215.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{{B}^{2} + \color{blue}{{\left(A - C\right)}^{2}}}}}\right)}{\pi} \]
      11. +-commutative15.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\color{blue}{{\left(A - C\right)}^{2} + {B}^{2}}}}}\right)}{\pi} \]
      12. unpow215.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\color{blue}{\left(A - C\right) \cdot \left(A - C\right)} + {B}^{2}}}}\right)}{\pi} \]
      13. unpow215.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}}}\right)}{\pi} \]
      14. hypot-define39.3%

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\left(-A\right) \cdot \left(\frac{2 \cdot C}{A \cdot B} - \color{blue}{\frac{2 \cdot 1}{B}}\right)}\right)}{\pi} \]
      5. metadata-eval84.4%

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

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

    if -8.5999999999999999e107 < A

    1. Initial program 62.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. Simplified84.4%

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

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

    Alternative 6: 81.8% accurate, 1.8× speedup?

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

      1. Initial program 10.4%

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

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

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

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

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

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

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

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

      if -1.12e229 < A < -1.70000000000000014e175

      1. Initial program 12.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. associate-*l/12.9%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{1 \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}{B}\right)}}{\pi} \]
        2. *-lft-identity12.9%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}}{B}\right)}{\pi} \]
        6. hypot-define90.4%

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

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

      if -1.70000000000000014e175 < A < -9.39999999999999987e120

      1. Initial program 7.4%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate--l-6.6%

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)\right)\right)}{\pi} \]
        6. associate-/r/32.1%

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}}}\right)}{\pi} \]
        14. hypot-define33.3%

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

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

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

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

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

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

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

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

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

      if -9.39999999999999987e120 < A

      1. Initial program 62.6%

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{1 \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}{B}\right)}}{\pi} \]
        3. *-un-lft-identity62.6%

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}}{B}\right)}{\pi} \]
        6. hypot-define85.4%

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

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

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

    Alternative 7: 45.8% accurate, 3.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -0.415:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.5 \cdot 10^{-240}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.26 \cdot 10^{-282}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-71}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{+76}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
       (if (<= B -0.415)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -3.5e-240)
           t_0
           (if (<= B 1.26e-282)
             (* 180.0 (/ (atan (/ 0.0 B)) PI))
             (if (<= B 5.2e-71)
               t_0
               (if (<= B 1.3e+76)
                 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
                 (* 180.0 (/ (atan -1.0) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
    	double tmp;
    	if (B <= -0.415) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -3.5e-240) {
    		tmp = t_0;
    	} else if (B <= 1.26e-282) {
    		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
    	} else if (B <= 5.2e-71) {
    		tmp = t_0;
    	} else if (B <= 1.3e+76) {
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
    	double tmp;
    	if (B <= -0.415) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -3.5e-240) {
    		tmp = t_0;
    	} else if (B <= 1.26e-282) {
    		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
    	} else if (B <= 5.2e-71) {
    		tmp = t_0;
    	} else if (B <= 1.3e+76) {
    		tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
    	} else {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((C / B)) / math.pi)
    	tmp = 0
    	if B <= -0.415:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -3.5e-240:
    		tmp = t_0
    	elif B <= 1.26e-282:
    		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
    	elif B <= 5.2e-71:
    		tmp = t_0
    	elif B <= 1.3e+76:
    		tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
    	else:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi))
    	tmp = 0.0
    	if (B <= -0.415)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -3.5e-240)
    		tmp = t_0;
    	elseif (B <= 1.26e-282)
    		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
    	elseif (B <= 5.2e-71)
    		tmp = t_0;
    	elseif (B <= 1.3e+76)
    		tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((C / B)) / pi);
    	tmp = 0.0;
    	if (B <= -0.415)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -3.5e-240)
    		tmp = t_0;
    	elseif (B <= 1.26e-282)
    		tmp = 180.0 * (atan((0.0 / B)) / pi);
    	elseif (B <= 5.2e-71)
    		tmp = t_0;
    	elseif (B <= 1.3e+76)
    		tmp = 180.0 * (atan((-2.0 * (A / B))) / pi);
    	else
    		tmp = 180.0 * (atan(-1.0) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -0.415], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.5e-240], t$95$0, If[LessEqual[B, 1.26e-282], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.2e-71], t$95$0, If[LessEqual[B, 1.3e+76], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -0.415:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -3.5 \cdot 10^{-240}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.26 \cdot 10^{-282}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 5.2 \cdot 10^{-71}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.3 \cdot 10^{+76}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if B < -0.41499999999999998

      1. Initial program 46.2%

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

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

      if -0.41499999999999998 < B < -3.50000000000000016e-240 or 1.26000000000000003e-282 < B < 5.1999999999999997e-71

      1. Initial program 59.9%

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

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

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

      if -3.50000000000000016e-240 < B < 1.26000000000000003e-282

      1. Initial program 58.0%

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right)}}{\pi} \]
        2. distribute-rgt1-in53.7%

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

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

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

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

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

      if 5.1999999999999997e-71 < B < 1.3e76

      1. Initial program 78.2%

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

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

      if 1.3e76 < B

      1. Initial program 36.2%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -0.415:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.5 \cdot 10^{-240}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.26 \cdot 10^{-282}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-71}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{+76}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 48.5% accurate, 3.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{if}\;C \leq -6.5 \cdot 10^{-105}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -5.9 \cdot 10^{-252}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;C \leq -5.5 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.85 \cdot 10^{-231}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 5.2 \cdot 10^{-113}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
       (if (<= C -6.5e-105)
         (* 180.0 (/ (atan (/ C B)) PI))
         (if (<= C -5.9e-252)
           t_0
           (if (<= C -5.5e-294)
             (* 180.0 (/ (atan (/ A (- B))) PI))
             (if (<= C 1.85e-231)
               (* 180.0 (/ (atan 1.0) PI))
               (if (<= C 5.2e-113)
                 t_0
                 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
    	double tmp;
    	if (C <= -6.5e-105) {
    		tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
    	} else if (C <= -5.9e-252) {
    		tmp = t_0;
    	} else if (C <= -5.5e-294) {
    		tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
    	} else if (C <= 1.85e-231) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (C <= 5.2e-113) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
    	double tmp;
    	if (C <= -6.5e-105) {
    		tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
    	} else if (C <= -5.9e-252) {
    		tmp = t_0;
    	} else if (C <= -5.5e-294) {
    		tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
    	} else if (C <= 1.85e-231) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (C <= 5.2e-113) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan(-1.0) / math.pi)
    	tmp = 0
    	if C <= -6.5e-105:
    		tmp = 180.0 * (math.atan((C / B)) / math.pi)
    	elif C <= -5.9e-252:
    		tmp = t_0
    	elif C <= -5.5e-294:
    		tmp = 180.0 * (math.atan((A / -B)) / math.pi)
    	elif C <= 1.85e-231:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif C <= 5.2e-113:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(-1.0) / pi))
    	tmp = 0.0
    	if (C <= -6.5e-105)
    		tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi));
    	elseif (C <= -5.9e-252)
    		tmp = t_0;
    	elseif (C <= -5.5e-294)
    		tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi));
    	elseif (C <= 1.85e-231)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (C <= 5.2e-113)
    		tmp = t_0;
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan(-1.0) / pi);
    	tmp = 0.0;
    	if (C <= -6.5e-105)
    		tmp = 180.0 * (atan((C / B)) / pi);
    	elseif (C <= -5.9e-252)
    		tmp = t_0;
    	elseif (C <= -5.5e-294)
    		tmp = 180.0 * (atan((A / -B)) / pi);
    	elseif (C <= 1.85e-231)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (C <= 5.2e-113)
    		tmp = t_0;
    	else
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -6.5e-105], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -5.9e-252], t$95$0, If[LessEqual[C, -5.5e-294], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.85e-231], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.2e-113], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    \mathbf{if}\;C \leq -6.5 \cdot 10^{-105}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq -5.9 \cdot 10^{-252}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;C \leq -5.5 \cdot 10^{-294}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq 1.85 \cdot 10^{-231}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;C \leq 5.2 \cdot 10^{-113}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if C < -6.50000000000000006e-105

      1. Initial program 79.5%

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

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

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

      if -6.50000000000000006e-105 < C < -5.8999999999999995e-252 or 1.84999999999999997e-231 < C < 5.1999999999999998e-113

      1. Initial program 55.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 40.7%

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

      if -5.8999999999999995e-252 < C < -5.5e-294

      1. Initial program 76.5%

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

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

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

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

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

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

      if -5.5e-294 < C < 1.84999999999999997e-231

      1. Initial program 49.3%

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

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

      if 5.1999999999999998e-113 < C

      1. Initial program 22.6%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define56.4%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -6.5 \cdot 10^{-105}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -5.9 \cdot 10^{-252}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq -5.5 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.85 \cdot 10^{-231}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 5.2 \cdot 10^{-113}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 48.5% accurate, 3.1× speedup?

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

      1. Initial program 79.5%

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

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

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

      if -3.40000000000000015e-104 < C < -4.6000000000000001e-253

      1. Initial program 58.5%

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

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

      if -4.6000000000000001e-253 < C < -2.79999999999999991e-294

      1. Initial program 76.5%

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

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

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

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

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

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

      if -2.79999999999999991e-294 < C < 1.2499999999999999e-235

      1. Initial program 49.3%

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

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

      if 1.2499999999999999e-235 < C < 1.6800000000000001e-40

      1. Initial program 45.4%

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

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

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

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

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

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

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

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

      if 1.6800000000000001e-40 < C

      1. Initial program 21.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 18.3%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\color{blue}{B \cdot B} + {C}^{2}}}{B}\right)}{\pi} \]
        2. unpow218.3%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define60.9%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -3.4 \cdot 10^{-104}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -4.6 \cdot 10^{-253}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq -2.8 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.25 \cdot 10^{-235}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 1.68 \cdot 10^{-40}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 48.6% accurate, 3.1× speedup?

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

      1. Initial program 79.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 65.2%

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

      if -8.4999999999999998e-106 < C < -4.4000000000000002e-254

      1. Initial program 58.5%

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

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

      if -4.4000000000000002e-254 < C < -4.6999999999999998e-295

      1. Initial program 76.5%

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

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

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

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

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

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

      if -4.6999999999999998e-295 < C < 1.64999999999999998e-239

      1. Initial program 49.3%

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

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

      if 1.64999999999999998e-239 < C < 3.6e-40

      1. Initial program 45.4%

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

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

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

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

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

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

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

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

      if 3.6e-40 < C

      1. Initial program 21.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 18.3%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\color{blue}{B \cdot B} + {C}^{2}}}{B}\right)}{\pi} \]
        2. unpow218.3%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define60.9%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -8.5 \cdot 10^{-106}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -4.4 \cdot 10^{-254}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq -4.7 \cdot 10^{-295}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.65 \cdot 10^{-239}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 3.6 \cdot 10^{-40}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 59.1% accurate, 3.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;C \leq -5.2 \cdot 10^{+96}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -2.1 \cdot 10^{-106}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 5.8 \cdot 10^{-286}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;C \leq 9.8 \cdot 10^{-241}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 6.6 \cdot 10^{-25}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
       (if (<= C -5.2e+96)
         (* 180.0 (/ (atan (/ (- C B) B)) PI))
         (if (<= C -2.1e-106)
           (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
           (if (<= C 5.8e-286)
             t_0
             (if (<= C 9.8e-241)
               (* 180.0 (/ (atan 1.0) PI))
               (if (<= C 6.6e-25)
                 t_0
                 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
    	double tmp;
    	if (C <= -5.2e+96) {
    		tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
    	} else if (C <= -2.1e-106) {
    		tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
    	} else if (C <= 5.8e-286) {
    		tmp = t_0;
    	} else if (C <= 9.8e-241) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (C <= 6.6e-25) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
    	double tmp;
    	if (C <= -5.2e+96) {
    		tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
    	} else if (C <= -2.1e-106) {
    		tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
    	} else if (C <= 5.8e-286) {
    		tmp = t_0;
    	} else if (C <= 9.8e-241) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (C <= 6.6e-25) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi)
    	tmp = 0
    	if C <= -5.2e+96:
    		tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi)
    	elif C <= -2.1e-106:
    		tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi)
    	elif C <= 5.8e-286:
    		tmp = t_0
    	elif C <= 9.8e-241:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif C <= 6.6e-25:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi))
    	tmp = 0.0
    	if (C <= -5.2e+96)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi));
    	elseif (C <= -2.1e-106)
    		tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi));
    	elseif (C <= 5.8e-286)
    		tmp = t_0;
    	elseif (C <= 9.8e-241)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (C <= 6.6e-25)
    		tmp = t_0;
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((-1.0 - (A / B))) / pi);
    	tmp = 0.0;
    	if (C <= -5.2e+96)
    		tmp = 180.0 * (atan(((C - B) / B)) / pi);
    	elseif (C <= -2.1e-106)
    		tmp = 180.0 * (atan((1.0 + (C / B))) / pi);
    	elseif (C <= 5.8e-286)
    		tmp = t_0;
    	elseif (C <= 9.8e-241)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (C <= 6.6e-25)
    		tmp = t_0;
    	else
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -5.2e+96], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.1e-106], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.8e-286], t$95$0, If[LessEqual[C, 9.8e-241], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.6e-25], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
    \mathbf{if}\;C \leq -5.2 \cdot 10^{+96}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq -2.1 \cdot 10^{-106}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq 5.8 \cdot 10^{-286}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;C \leq 9.8 \cdot 10^{-241}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;C \leq 6.6 \cdot 10^{-25}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if C < -5.2e96

      1. Initial program 79.2%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define94.1%

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

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

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

      if -5.2e96 < C < -2.10000000000000003e-106

      1. Initial program 79.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 0 69.1%

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

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

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

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

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

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

      if -2.10000000000000003e-106 < C < 5.7999999999999996e-286 or 9.7999999999999997e-241 < C < 6.5999999999999997e-25

      1. Initial program 52.9%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-\left(1 + \frac{A}{B}\right)\right)}}{\pi} \]
        2. distribute-neg-in54.3%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\left(-1\right) + \left(-\frac{A}{B}\right)\right)}}{\pi} \]
        3. metadata-eval54.3%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{-1} + \left(-\frac{A}{B}\right)\right)}{\pi} \]
        4. unsub-neg54.3%

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

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

      if 5.7999999999999996e-286 < C < 9.7999999999999997e-241

      1. Initial program 51.4%

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

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

      if 6.5999999999999997e-25 < C

      1. Initial program 21.2%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define59.7%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -5.2 \cdot 10^{+96}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -2.1 \cdot 10^{-106}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 5.8 \cdot 10^{-286}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 9.8 \cdot 10^{-241}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 6.6 \cdot 10^{-25}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 59.1% accurate, 3.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;C \leq -7 \cdot 10^{+94}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -9.2 \cdot 10^{-107}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 5.8 \cdot 10^{-286}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;C \leq 8.2 \cdot 10^{-242}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 1.42 \cdot 10^{-24}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
       (if (<= C -7e+94)
         (* 180.0 (/ (atan (/ (- C B) B)) PI))
         (if (<= C -9.2e-107)
           (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
           (if (<= C 5.8e-286)
             t_0
             (if (<= C 8.2e-242)
               (* 180.0 (/ (atan 1.0) PI))
               (if (<= C 1.42e-24)
                 t_0
                 (* (atan (* -0.5 (/ B C))) (/ 180.0 PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
    	double tmp;
    	if (C <= -7e+94) {
    		tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
    	} else if (C <= -9.2e-107) {
    		tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
    	} else if (C <= 5.8e-286) {
    		tmp = t_0;
    	} else if (C <= 8.2e-242) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (C <= 1.42e-24) {
    		tmp = t_0;
    	} else {
    		tmp = atan((-0.5 * (B / C))) * (180.0 / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
    	double tmp;
    	if (C <= -7e+94) {
    		tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
    	} else if (C <= -9.2e-107) {
    		tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
    	} else if (C <= 5.8e-286) {
    		tmp = t_0;
    	} else if (C <= 8.2e-242) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (C <= 1.42e-24) {
    		tmp = t_0;
    	} else {
    		tmp = Math.atan((-0.5 * (B / C))) * (180.0 / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi)
    	tmp = 0
    	if C <= -7e+94:
    		tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi)
    	elif C <= -9.2e-107:
    		tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi)
    	elif C <= 5.8e-286:
    		tmp = t_0
    	elif C <= 8.2e-242:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif C <= 1.42e-24:
    		tmp = t_0
    	else:
    		tmp = math.atan((-0.5 * (B / C))) * (180.0 / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi))
    	tmp = 0.0
    	if (C <= -7e+94)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi));
    	elseif (C <= -9.2e-107)
    		tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi));
    	elseif (C <= 5.8e-286)
    		tmp = t_0;
    	elseif (C <= 8.2e-242)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (C <= 1.42e-24)
    		tmp = t_0;
    	else
    		tmp = Float64(atan(Float64(-0.5 * Float64(B / C))) * Float64(180.0 / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((-1.0 - (A / B))) / pi);
    	tmp = 0.0;
    	if (C <= -7e+94)
    		tmp = 180.0 * (atan(((C - B) / B)) / pi);
    	elseif (C <= -9.2e-107)
    		tmp = 180.0 * (atan((1.0 + (C / B))) / pi);
    	elseif (C <= 5.8e-286)
    		tmp = t_0;
    	elseif (C <= 8.2e-242)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (C <= 1.42e-24)
    		tmp = t_0;
    	else
    		tmp = atan((-0.5 * (B / C))) * (180.0 / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -7e+94], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -9.2e-107], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.8e-286], t$95$0, If[LessEqual[C, 8.2e-242], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.42e-24], t$95$0, N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
    \mathbf{if}\;C \leq -7 \cdot 10^{+94}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq -9.2 \cdot 10^{-107}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq 5.8 \cdot 10^{-286}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;C \leq 8.2 \cdot 10^{-242}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;C \leq 1.42 \cdot 10^{-24}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if C < -6.9999999999999994e94

      1. Initial program 79.2%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define94.1%

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

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

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

      if -6.9999999999999994e94 < C < -9.20000000000000014e-107

      1. Initial program 79.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 0 69.1%

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

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

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

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

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

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

      if -9.20000000000000014e-107 < C < 5.7999999999999996e-286 or 8.19999999999999942e-242 < C < 1.42e-24

      1. Initial program 52.9%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-\left(1 + \frac{A}{B}\right)\right)}}{\pi} \]
        2. distribute-neg-in54.3%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\left(-1\right) + \left(-\frac{A}{B}\right)\right)}}{\pi} \]
        3. metadata-eval54.3%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{-1} + \left(-\frac{A}{B}\right)\right)}{\pi} \]
        4. unsub-neg54.3%

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

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

      if 5.7999999999999996e-286 < C < 8.19999999999999942e-242

      1. Initial program 51.4%

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

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

      if 1.42e-24 < C

      1. Initial program 21.2%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define59.7%

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(-1 \cdot \frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{B}\right)}{\pi}} \]
        2. *-commutative18.3%

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

          \[\leadsto \color{blue}{\tan^{-1} \left(-1 \cdot \frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{B}\right) \cdot \frac{180}{\pi}} \]
        4. mul-1-neg18.3%

          \[\leadsto \tan^{-1} \color{blue}{\left(-\frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{B}\right)} \cdot \frac{180}{\pi} \]
        5. distribute-neg-frac218.3%

          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{-B}\right)} \cdot \frac{180}{\pi} \]
        6. neg-mul-118.3%

          \[\leadsto \tan^{-1} \left(\frac{\sqrt{{B}^{2} + {C}^{2}} + \color{blue}{\left(-C\right)}}{-B}\right) \cdot \frac{180}{\pi} \]
        7. unsub-neg18.3%

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

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

          \[\leadsto \tan^{-1} \left(\frac{\sqrt{\color{blue}{C \cdot C} + {B}^{2}} - C}{-B}\right) \cdot \frac{180}{\pi} \]
        10. unpow218.3%

          \[\leadsto \tan^{-1} \left(\frac{\sqrt{C \cdot C + \color{blue}{B \cdot B}} - C}{-B}\right) \cdot \frac{180}{\pi} \]
        11. hypot-define59.7%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -7 \cdot 10^{+94}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -9.2 \cdot 10^{-107}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 5.8 \cdot 10^{-286}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 8.2 \cdot 10^{-242}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 1.42 \cdot 10^{-24}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 59.1% accurate, 3.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;C \leq -5 \cdot 10^{+94}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -1.92 \cdot 10^{-103}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 5.2 \cdot 10^{-286}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;C \leq 1.05 \cdot 10^{-240}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 8.5 \cdot 10^{-25}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
       (if (<= C -5e+94)
         (/ (* 180.0 (atan (/ (- C B) B))) PI)
         (if (<= C -1.92e-103)
           (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
           (if (<= C 5.2e-286)
             t_0
             (if (<= C 1.05e-240)
               (* 180.0 (/ (atan 1.0) PI))
               (if (<= C 8.5e-25)
                 t_0
                 (* (atan (* -0.5 (/ B C))) (/ 180.0 PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
    	double tmp;
    	if (C <= -5e+94) {
    		tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
    	} else if (C <= -1.92e-103) {
    		tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
    	} else if (C <= 5.2e-286) {
    		tmp = t_0;
    	} else if (C <= 1.05e-240) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (C <= 8.5e-25) {
    		tmp = t_0;
    	} else {
    		tmp = atan((-0.5 * (B / C))) * (180.0 / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
    	double tmp;
    	if (C <= -5e+94) {
    		tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
    	} else if (C <= -1.92e-103) {
    		tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
    	} else if (C <= 5.2e-286) {
    		tmp = t_0;
    	} else if (C <= 1.05e-240) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (C <= 8.5e-25) {
    		tmp = t_0;
    	} else {
    		tmp = Math.atan((-0.5 * (B / C))) * (180.0 / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi)
    	tmp = 0
    	if C <= -5e+94:
    		tmp = (180.0 * math.atan(((C - B) / B))) / math.pi
    	elif C <= -1.92e-103:
    		tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi)
    	elif C <= 5.2e-286:
    		tmp = t_0
    	elif C <= 1.05e-240:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif C <= 8.5e-25:
    		tmp = t_0
    	else:
    		tmp = math.atan((-0.5 * (B / C))) * (180.0 / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi))
    	tmp = 0.0
    	if (C <= -5e+94)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi);
    	elseif (C <= -1.92e-103)
    		tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi));
    	elseif (C <= 5.2e-286)
    		tmp = t_0;
    	elseif (C <= 1.05e-240)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (C <= 8.5e-25)
    		tmp = t_0;
    	else
    		tmp = Float64(atan(Float64(-0.5 * Float64(B / C))) * Float64(180.0 / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan((-1.0 - (A / B))) / pi);
    	tmp = 0.0;
    	if (C <= -5e+94)
    		tmp = (180.0 * atan(((C - B) / B))) / pi;
    	elseif (C <= -1.92e-103)
    		tmp = 180.0 * (atan((1.0 + (C / B))) / pi);
    	elseif (C <= 5.2e-286)
    		tmp = t_0;
    	elseif (C <= 1.05e-240)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (C <= 8.5e-25)
    		tmp = t_0;
    	else
    		tmp = atan((-0.5 * (B / C))) * (180.0 / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -5e+94], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -1.92e-103], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.2e-286], t$95$0, If[LessEqual[C, 1.05e-240], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.5e-25], t$95$0, N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
    \mathbf{if}\;C \leq -5 \cdot 10^{+94}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq -1.92 \cdot 10^{-103}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq 5.2 \cdot 10^{-286}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;C \leq 1.05 \cdot 10^{-240}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;C \leq 8.5 \cdot 10^{-25}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if C < -5.0000000000000001e94

      1. Initial program 79.2%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define94.1%

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

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

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

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

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

      if -5.0000000000000001e94 < C < -1.9200000000000001e-103

      1. Initial program 79.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 0 69.1%

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

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

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

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

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

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

      if -1.9200000000000001e-103 < C < 5.1999999999999999e-286 or 1.04999999999999997e-240 < C < 8.49999999999999981e-25

      1. Initial program 52.9%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-\left(1 + \frac{A}{B}\right)\right)}}{\pi} \]
        2. distribute-neg-in54.3%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\left(-1\right) + \left(-\frac{A}{B}\right)\right)}}{\pi} \]
        3. metadata-eval54.3%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{-1} + \left(-\frac{A}{B}\right)\right)}{\pi} \]
        4. unsub-neg54.3%

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

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

      if 5.1999999999999999e-286 < C < 1.04999999999999997e-240

      1. Initial program 51.4%

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

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

      if 8.49999999999999981e-25 < C

      1. Initial program 21.2%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define59.7%

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(-1 \cdot \frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{B}\right)}{\pi}} \]
        2. *-commutative18.3%

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

          \[\leadsto \color{blue}{\tan^{-1} \left(-1 \cdot \frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{B}\right) \cdot \frac{180}{\pi}} \]
        4. mul-1-neg18.3%

          \[\leadsto \tan^{-1} \color{blue}{\left(-\frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{B}\right)} \cdot \frac{180}{\pi} \]
        5. distribute-neg-frac218.3%

          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{-B}\right)} \cdot \frac{180}{\pi} \]
        6. neg-mul-118.3%

          \[\leadsto \tan^{-1} \left(\frac{\sqrt{{B}^{2} + {C}^{2}} + \color{blue}{\left(-C\right)}}{-B}\right) \cdot \frac{180}{\pi} \]
        7. unsub-neg18.3%

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

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

          \[\leadsto \tan^{-1} \left(\frac{\sqrt{\color{blue}{C \cdot C} + {B}^{2}} - C}{-B}\right) \cdot \frac{180}{\pi} \]
        10. unpow218.3%

          \[\leadsto \tan^{-1} \left(\frac{\sqrt{C \cdot C + \color{blue}{B \cdot B}} - C}{-B}\right) \cdot \frac{180}{\pi} \]
        11. hypot-define59.7%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -5 \cdot 10^{+94}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -1.92 \cdot 10^{-103}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 5.2 \cdot 10^{-286}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.05 \cdot 10^{-240}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 8.5 \cdot 10^{-25}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 14: 45.8% accurate, 3.1× speedup?

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

      1. Initial program 46.2%

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

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

      if -0.209999999999999992 < B < -4.3999999999999999e-240 or 1.15999999999999999e-281 < B < 5.4000000000000003e-71

      1. Initial program 59.9%

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

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

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

      if -4.3999999999999999e-240 < B < 1.15999999999999999e-281

      1. Initial program 58.0%

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right)}}{\pi} \]
        2. distribute-rgt1-in53.7%

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

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

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

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

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

      if 5.4000000000000003e-71 < B < 1.3e76

      1. Initial program 78.2%

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

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

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

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

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

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

      if 1.3e76 < B

      1. Initial program 36.2%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -0.21:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4.4 \cdot 10^{-240}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.16 \cdot 10^{-281}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.4 \cdot 10^{-71}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{+76}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 15: 53.5% accurate, 3.2× speedup?

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

      1. Initial program 76.0%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define83.8%

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

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

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

      if -4.79999999999999992e-251 < C < -7.00000000000000064e-294

      1. Initial program 71.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 83.6%

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

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

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

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

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

      if -7.00000000000000064e-294 < C < 7.39999999999999958e-232

      1. Initial program 49.3%

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

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

      if 7.39999999999999958e-232 < C < 3.1999999999999998e-39

      1. Initial program 45.4%

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

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

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

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

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

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

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

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

      if 3.1999999999999998e-39 < C

      1. Initial program 21.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 18.3%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\color{blue}{B \cdot B} + {C}^{2}}}{B}\right)}{\pi} \]
        2. unpow218.3%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define60.9%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -4.8 \cdot 10^{-251}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -7 \cdot 10^{-294}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 7.4 \cdot 10^{-232}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 3.2 \cdot 10^{-39}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 16: 59.1% accurate, 3.2× speedup?

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

      1. Initial program 79.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 A around 0 74.2%

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define85.9%

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

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

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

      if -1.05e-107 < C < 4.79999999999999987e-286 or 2.85000000000000016e-242 < C < 5.5000000000000005e-26

      1. Initial program 52.9%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-\left(1 + \frac{A}{B}\right)\right)}}{\pi} \]
        2. distribute-neg-in54.3%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\left(-1\right) + \left(-\frac{A}{B}\right)\right)}}{\pi} \]
        3. metadata-eval54.3%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{-1} + \left(-\frac{A}{B}\right)\right)}{\pi} \]
        4. unsub-neg54.3%

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

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

      if 4.79999999999999987e-286 < C < 2.85000000000000016e-242

      1. Initial program 51.4%

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

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

      if 5.5000000000000005e-26 < C

      1. Initial program 21.2%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define59.7%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.05 \cdot 10^{-107}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.8 \cdot 10^{-286}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 2.85 \cdot 10^{-242}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;C \leq 5.5 \cdot 10^{-26}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 17: 65.4% accurate, 3.2× speedup?

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

      1. Initial program 58.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 63.9%

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

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

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

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

      if -3.40000000000000005e-49 < B < -1.5999999999999999e-97

      1. Initial program 12.2%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate--l-12.4%

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)\right)\right)}{\pi} \]
        6. associate-/r/31.3%

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}}}\right)}{\pi} \]
        14. hypot-define46.2%

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

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

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

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

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

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

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

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

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

      if 9.99999999999999962e-165 < B

      1. Initial program 53.2%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.4 \cdot 10^{-49}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-97}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\ \mathbf{elif}\;B \leq 10^{-164}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 18: 65.4% accurate, 3.3× speedup?

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

      1. Initial program 58.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 63.5%

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

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

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

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

      if -2.1999999999999999e-49 < B < -5.6e-91

      1. Initial program 13.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 13.8%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\color{blue}{B \cdot B} + {C}^{2}}}{B}\right)}{\pi} \]
        2. unpow213.8%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define43.6%

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(-1 \cdot \frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{B}\right)}{\pi}} \]
        2. *-commutative13.7%

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

          \[\leadsto \color{blue}{\tan^{-1} \left(-1 \cdot \frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{B}\right) \cdot \frac{180}{\pi}} \]
        4. mul-1-neg13.7%

          \[\leadsto \tan^{-1} \color{blue}{\left(-\frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{B}\right)} \cdot \frac{180}{\pi} \]
        5. distribute-neg-frac213.7%

          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{-B}\right)} \cdot \frac{180}{\pi} \]
        6. neg-mul-113.7%

          \[\leadsto \tan^{-1} \left(\frac{\sqrt{{B}^{2} + {C}^{2}} + \color{blue}{\left(-C\right)}}{-B}\right) \cdot \frac{180}{\pi} \]
        7. unsub-neg13.7%

          \[\leadsto \tan^{-1} \left(\frac{\color{blue}{\sqrt{{B}^{2} + {C}^{2}} - C}}{-B}\right) \cdot \frac{180}{\pi} \]
        8. +-commutative13.7%

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

          \[\leadsto \tan^{-1} \left(\frac{\sqrt{\color{blue}{C \cdot C} + {B}^{2}} - C}{-B}\right) \cdot \frac{180}{\pi} \]
        10. unpow213.7%

          \[\leadsto \tan^{-1} \left(\frac{\sqrt{C \cdot C + \color{blue}{B \cdot B}} - C}{-B}\right) \cdot \frac{180}{\pi} \]
        11. hypot-define43.5%

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

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

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

      if 9.99999999999999962e-165 < B

      1. Initial program 53.2%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.2 \cdot 10^{-49}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -5.6 \cdot 10^{-91}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 10^{-164}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 19: 65.5% accurate, 3.3× speedup?

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

      1. Initial program 58.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 63.9%

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

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

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

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

      if -1.79999999999999985e-49 < B < -1.6500000000000001e-94

      1. Initial program 12.2%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate--l-12.4%

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)\right)\right)}{\pi} \]
        6. associate-/r/31.3%

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}}}\right)}{\pi} \]
        14. hypot-define46.2%

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

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

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

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

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

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

      if 9.99999999999999962e-165 < B

      1. Initial program 53.2%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.8 \cdot 10^{-49}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.65 \cdot 10^{-94}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{1 + \frac{A - C}{B}}\right)}{\pi}\\ \mathbf{elif}\;B \leq 10^{-164}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 20: 46.7% accurate, 3.3× speedup?

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

      1. Initial program 46.2%

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

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

      if -0.35999999999999999 < B < -8.49999999999999974e-241 or 8.19999999999999973e-283 < B < 5.2e-92

      1. Initial program 60.4%

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

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

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

      if -8.49999999999999974e-241 < B < 8.19999999999999973e-283

      1. Initial program 58.0%

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right)}}{\pi} \]
        2. distribute-rgt1-in53.7%

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

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

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

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

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

      if 5.2e-92 < B

      1. Initial program 53.2%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -0.36:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-241}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 8.2 \cdot 10^{-283}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-92}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 21: 62.0% accurate, 3.3× speedup?

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

      1. Initial program 58.2%

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

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

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

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

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

      if -1.79999999999999985e-49 < B < -3.6e-91

      1. Initial program 13.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 13.8%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\color{blue}{B \cdot B} + {C}^{2}}}{B}\right)}{\pi} \]
        2. unpow213.8%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}}{B}\right)}{\pi} \]
        3. hypot-define43.6%

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(-1 \cdot \frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{B}\right)}{\pi}} \]
        2. *-commutative13.7%

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

          \[\leadsto \color{blue}{\tan^{-1} \left(-1 \cdot \frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{B}\right) \cdot \frac{180}{\pi}} \]
        4. mul-1-neg13.7%

          \[\leadsto \tan^{-1} \color{blue}{\left(-\frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{B}\right)} \cdot \frac{180}{\pi} \]
        5. distribute-neg-frac213.7%

          \[\leadsto \tan^{-1} \color{blue}{\left(\frac{\sqrt{{B}^{2} + {C}^{2}} + -1 \cdot C}{-B}\right)} \cdot \frac{180}{\pi} \]
        6. neg-mul-113.7%

          \[\leadsto \tan^{-1} \left(\frac{\sqrt{{B}^{2} + {C}^{2}} + \color{blue}{\left(-C\right)}}{-B}\right) \cdot \frac{180}{\pi} \]
        7. unsub-neg13.7%

          \[\leadsto \tan^{-1} \left(\frac{\color{blue}{\sqrt{{B}^{2} + {C}^{2}} - C}}{-B}\right) \cdot \frac{180}{\pi} \]
        8. +-commutative13.7%

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

          \[\leadsto \tan^{-1} \left(\frac{\sqrt{\color{blue}{C \cdot C} + {B}^{2}} - C}{-B}\right) \cdot \frac{180}{\pi} \]
        10. unpow213.7%

          \[\leadsto \tan^{-1} \left(\frac{\sqrt{C \cdot C + \color{blue}{B \cdot B}} - C}{-B}\right) \cdot \frac{180}{\pi} \]
        11. hypot-define43.5%

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

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

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

      if 9.49999999999999946e-92 < B

      1. Initial program 53.2%

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-\left(1 + \frac{A}{B}\right)\right)}}{\pi} \]
        2. distribute-neg-in71.6%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\left(-1\right) + \left(-\frac{A}{B}\right)\right)}}{\pi} \]
        3. metadata-eval71.6%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{-1} + \left(-\frac{A}{B}\right)\right)}{\pi} \]
        4. unsub-neg71.6%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.8 \cdot 10^{-49}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -3.6 \cdot 10^{-91}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{-92}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 22: 45.2% accurate, 3.6× speedup?

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

      1. Initial program 50.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 B around -inf 56.4%

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

      if -7.19999999999999958e-50 < B < 4.8000000000000001e-112

      1. Initial program 58.4%

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right)}}{\pi} \]
        2. distribute-rgt1-in31.5%

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

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

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

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

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

      if 4.8000000000000001e-112 < B

      1. Initial program 54.4%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -7.2 \cdot 10^{-50}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-112}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 23: 40.4% accurate, 3.8× speedup?

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

      1. Initial program 54.9%

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

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

      if -1.999999999999994e-310 < B

      1. Initial program 54.8%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 24: 21.3% accurate, 4.0× speedup?

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
    4. Final simplification20.6%

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

    Reproduce

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