ABCF->ab-angle angle

Percentage Accurate: 53.9% → 81.3%
Time: 22.1s
Alternatives: 21
Speedup: 3.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 53.9% 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: 81.3% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\ t_1 := \tan^{-1} \left(\frac{A - A}{B} + -0.5 \cdot \frac{B}{C}\right)\\ \mathbf{if}\;C \leq 5.4 \cdot 10^{+154}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;C \leq 3.5 \cdot 10^{+199}:\\ \;\;\;\;180 \cdot \frac{t\_1}{\pi}\\ \mathbf{elif}\;C \leq 5.6 \cdot 10^{+234}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{t\_1}}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)))
        (t_1 (atan (+ (/ (- A A) B) (* -0.5 (/ B C))))))
   (if (<= C 5.4e+154)
     t_0
     (if (<= C 3.5e+199)
       (* 180.0 (/ t_1 PI))
       (if (<= C 5.6e+234) t_0 (/ 180.0 (/ PI t_1)))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
	double t_1 = atan((((A - A) / B) + (-0.5 * (B / C))));
	double tmp;
	if (C <= 5.4e+154) {
		tmp = t_0;
	} else if (C <= 3.5e+199) {
		tmp = 180.0 * (t_1 / ((double) M_PI));
	} else if (C <= 5.6e+234) {
		tmp = t_0;
	} else {
		tmp = 180.0 / (((double) M_PI) / t_1);
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
	double t_1 = Math.atan((((A - A) / B) + (-0.5 * (B / C))));
	double tmp;
	if (C <= 5.4e+154) {
		tmp = t_0;
	} else if (C <= 3.5e+199) {
		tmp = 180.0 * (t_1 / Math.PI);
	} else if (C <= 5.6e+234) {
		tmp = t_0;
	} else {
		tmp = 180.0 / (Math.PI / t_1);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi)
	t_1 = math.atan((((A - A) / B) + (-0.5 * (B / C))))
	tmp = 0
	if C <= 5.4e+154:
		tmp = t_0
	elif C <= 3.5e+199:
		tmp = 180.0 * (t_1 / math.pi)
	elif C <= 5.6e+234:
		tmp = t_0
	else:
		tmp = 180.0 / (math.pi / t_1)
	return tmp
function code(A, B, C)
	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi))
	t_1 = atan(Float64(Float64(Float64(A - A) / B) + Float64(-0.5 * Float64(B / C))))
	tmp = 0.0
	if (C <= 5.4e+154)
		tmp = t_0;
	elseif (C <= 3.5e+199)
		tmp = Float64(180.0 * Float64(t_1 / pi));
	elseif (C <= 5.6e+234)
		tmp = t_0;
	else
		tmp = Float64(180.0 / Float64(pi / t_1));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi);
	t_1 = atan((((A - A) / B) + (-0.5 * (B / C))));
	tmp = 0.0;
	if (C <= 5.4e+154)
		tmp = t_0;
	elseif (C <= 3.5e+199)
		tmp = 180.0 * (t_1 / pi);
	elseif (C <= 5.6e+234)
		tmp = t_0;
	else
		tmp = 180.0 / (pi / t_1);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[ArcTan[N[(N[(N[(A - A), $MachinePrecision] / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[C, 5.4e+154], t$95$0, If[LessEqual[C, 3.5e+199], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.6e+234], t$95$0, N[(180.0 / N[(Pi / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;C \leq 3.5 \cdot 10^{+199}:\\
\;\;\;\;180 \cdot \frac{t\_1}{\pi}\\

\mathbf{elif}\;C \leq 5.6 \cdot 10^{+234}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t\_1}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < 5.40000000000000011e154 or 3.49999999999999981e199 < C < 5.5999999999999997e234

    1. Initial program 60.5%

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

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

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

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

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

        \[\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-define84.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. Simplified84.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 5.40000000000000011e154 < C < 3.49999999999999981e199

    1. Initial program 6.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 C around inf 86.9%

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

    if 5.5999999999999997e234 < C

    1. Initial program 4.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. Applied egg-rr45.5%

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

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

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

Alternative 2: 82.1% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 60.3%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Applied egg-rr88.8%

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

    if -0.0200000000000000004 < (*.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 17.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. Applied egg-rr17.7%

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

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

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

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

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

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

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

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

Alternative 3: 75.7% 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)\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{if}\;A \leq -5.2 \cdot 10^{+166}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\ \;\;\;\;180 \cdot \frac{t\_0}{\pi}\\ \mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq 8 \cdot 10^{+84}:\\ \;\;\;\;\frac{180}{\frac{\pi}{t\_0}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (atan (/ (- C (hypot B C)) B)))
        (t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
   (if (<= A -5.2e+166)
     t_1
     (if (<= A -2.7e-20)
       (* 180.0 (/ t_0 PI))
       (if (<= A -2.25e-61)
         t_1
         (if (<= A 8e+84)
           (/ 180.0 (/ PI t_0))
           (* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI))))))))
double code(double A, double B, double C) {
	double t_0 = atan(((C - hypot(B, C)) / B));
	double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
	double tmp;
	if (A <= -5.2e+166) {
		tmp = t_1;
	} else if (A <= -2.7e-20) {
		tmp = 180.0 * (t_0 / ((double) M_PI));
	} else if (A <= -2.25e-61) {
		tmp = t_1;
	} else if (A <= 8e+84) {
		tmp = 180.0 / (((double) M_PI) / t_0);
	} else {
		tmp = 180.0 * (atan(((A + hypot(B, 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 t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
	double tmp;
	if (A <= -5.2e+166) {
		tmp = t_1;
	} else if (A <= -2.7e-20) {
		tmp = 180.0 * (t_0 / Math.PI);
	} else if (A <= -2.25e-61) {
		tmp = t_1;
	} else if (A <= 8e+84) {
		tmp = 180.0 / (Math.PI / t_0);
	} else {
		tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = math.atan(((C - math.hypot(B, C)) / B))
	t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
	tmp = 0
	if A <= -5.2e+166:
		tmp = t_1
	elif A <= -2.7e-20:
		tmp = 180.0 * (t_0 / math.pi)
	elif A <= -2.25e-61:
		tmp = t_1
	elif A <= 8e+84:
		tmp = 180.0 / (math.pi / t_0)
	else:
		tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi)
	return tmp
function code(A, B, C)
	t_0 = atan(Float64(Float64(C - hypot(B, C)) / B))
	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi))
	tmp = 0.0
	if (A <= -5.2e+166)
		tmp = t_1;
	elseif (A <= -2.7e-20)
		tmp = Float64(180.0 * Float64(t_0 / pi));
	elseif (A <= -2.25e-61)
		tmp = t_1;
	elseif (A <= 8e+84)
		tmp = Float64(180.0 / Float64(pi / t_0));
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = atan(((C - hypot(B, C)) / B));
	t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi);
	tmp = 0.0;
	if (A <= -5.2e+166)
		tmp = t_1;
	elseif (A <= -2.7e-20)
		tmp = 180.0 * (t_0 / pi);
	elseif (A <= -2.25e-61)
		tmp = t_1;
	elseif (A <= 8e+84)
		tmp = 180.0 / (pi / t_0);
	else
		tmp = 180.0 * (atan(((A + hypot(B, 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]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.2e+166], t$95$1, If[LessEqual[A, -2.7e-20], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.25e-61], t$95$1, If[LessEqual[A, 8e+84], N[(180.0 / N[(Pi / t$95$0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $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)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -5.2 \cdot 10^{+166}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\

\mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -5.1999999999999999e166 or -2.7e-20 < A < -2.25e-61

    1. Initial program 13.8%

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

      \[\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/80.9%

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

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

    if -5.1999999999999999e166 < A < -2.7e-20

    1. Initial program 47.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 39.0%

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

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

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

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

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

    if -2.25e-61 < A < 8.00000000000000046e84

    1. Initial program 60.3%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Applied egg-rr84.8%

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

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

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

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

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

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

    if 8.00000000000000046e84 < A

    1. Initial program 75.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 0 75.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.2 \cdot 10^{+166}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 8 \cdot 10^{+84}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 75.7% 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)\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{if}\;A \leq -1.8 \cdot 10^{+167}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\ \;\;\;\;180 \cdot \frac{t\_0}{\pi}\\ \mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq 8 \cdot 10^{+84}:\\ \;\;\;\;\frac{180}{\frac{\pi}{t\_0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (atan (/ (- C (hypot B C)) B)))
        (t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
   (if (<= A -1.8e+167)
     t_1
     (if (<= A -2.7e-20)
       (* 180.0 (/ t_0 PI))
       (if (<= A -2.25e-61)
         t_1
         (if (<= A 8e+84)
           (/ 180.0 (/ PI t_0))
           (/ 180.0 (/ PI (atan (/ (- (- A) (hypot A B)) B))))))))))
double code(double A, double B, double C) {
	double t_0 = atan(((C - hypot(B, C)) / B));
	double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
	double tmp;
	if (A <= -1.8e+167) {
		tmp = t_1;
	} else if (A <= -2.7e-20) {
		tmp = 180.0 * (t_0 / ((double) M_PI));
	} else if (A <= -2.25e-61) {
		tmp = t_1;
	} else if (A <= 8e+84) {
		tmp = 180.0 / (((double) M_PI) / t_0);
	} else {
		tmp = 180.0 / (((double) M_PI) / atan(((-A - hypot(A, B)) / B)));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = Math.atan(((C - Math.hypot(B, C)) / B));
	double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
	double tmp;
	if (A <= -1.8e+167) {
		tmp = t_1;
	} else if (A <= -2.7e-20) {
		tmp = 180.0 * (t_0 / Math.PI);
	} else if (A <= -2.25e-61) {
		tmp = t_1;
	} else if (A <= 8e+84) {
		tmp = 180.0 / (Math.PI / t_0);
	} else {
		tmp = 180.0 / (Math.PI / Math.atan(((-A - Math.hypot(A, B)) / B)));
	}
	return tmp;
}
def code(A, B, C):
	t_0 = math.atan(((C - math.hypot(B, C)) / B))
	t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
	tmp = 0
	if A <= -1.8e+167:
		tmp = t_1
	elif A <= -2.7e-20:
		tmp = 180.0 * (t_0 / math.pi)
	elif A <= -2.25e-61:
		tmp = t_1
	elif A <= 8e+84:
		tmp = 180.0 / (math.pi / t_0)
	else:
		tmp = 180.0 / (math.pi / math.atan(((-A - math.hypot(A, B)) / B)))
	return tmp
function code(A, B, C)
	t_0 = atan(Float64(Float64(C - hypot(B, C)) / B))
	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi))
	tmp = 0.0
	if (A <= -1.8e+167)
		tmp = t_1;
	elseif (A <= -2.7e-20)
		tmp = Float64(180.0 * Float64(t_0 / pi));
	elseif (A <= -2.25e-61)
		tmp = t_1;
	elseif (A <= 8e+84)
		tmp = Float64(180.0 / Float64(pi / t_0));
	else
		tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B))));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = atan(((C - hypot(B, C)) / B));
	t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi);
	tmp = 0.0;
	if (A <= -1.8e+167)
		tmp = t_1;
	elseif (A <= -2.7e-20)
		tmp = 180.0 * (t_0 / pi);
	elseif (A <= -2.25e-61)
		tmp = t_1;
	elseif (A <= 8e+84)
		tmp = 180.0 / (pi / t_0);
	else
		tmp = 180.0 / (pi / atan(((-A - hypot(A, B)) / B)));
	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]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.8e+167], t$95$1, If[LessEqual[A, -2.7e-20], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.25e-61], t$95$1, If[LessEqual[A, 8e+84], N[(180.0 / N[(Pi / t$95$0), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\

\mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -1.80000000000000012e167 or -2.7e-20 < A < -2.25e-61

    1. Initial program 13.8%

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

      \[\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/80.9%

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

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

    if -1.80000000000000012e167 < A < -2.7e-20

    1. Initial program 47.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 39.0%

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

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

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

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

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

    if -2.25e-61 < A < 8.00000000000000046e84

    1. Initial program 60.3%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Applied egg-rr84.8%

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

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

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

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

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

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

    if 8.00000000000000046e84 < A

    1. Initial program 75.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. Applied egg-rr92.6%

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

      \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\color{blue}{-1 \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}}{B}\right)}} \]
    5. Step-by-step derivation
      1. distribute-lft-in75.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.8 \cdot 10^{+167}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 8 \cdot 10^{+84}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 73.9% 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}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{if}\;A \leq -9.5 \cdot 10^{+166}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq 1.05 \cdot 10^{+85}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + 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)))
        (t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
   (if (<= A -9.5e+166)
     t_1
     (if (<= A -2.7e-20)
       t_0
       (if (<= A -2.25e-61)
         t_1
         (if (<= A 1.05e+85)
           t_0
           (* 180.0 (/ (atan (/ (+ B 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 t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
	double tmp;
	if (A <= -9.5e+166) {
		tmp = t_1;
	} else if (A <= -2.7e-20) {
		tmp = t_0;
	} else if (A <= -2.25e-61) {
		tmp = t_1;
	} else if (A <= 1.05e+85) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (atan(((B + 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 t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
	double tmp;
	if (A <= -9.5e+166) {
		tmp = t_1;
	} else if (A <= -2.7e-20) {
		tmp = t_0;
	} else if (A <= -2.25e-61) {
		tmp = t_1;
	} else if (A <= 1.05e+85) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (Math.atan(((B + 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)
	t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
	tmp = 0
	if A <= -9.5e+166:
		tmp = t_1
	elif A <= -2.7e-20:
		tmp = t_0
	elif A <= -2.25e-61:
		tmp = t_1
	elif A <= 1.05e+85:
		tmp = t_0
	else:
		tmp = 180.0 * (math.atan(((B + 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))
	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi))
	tmp = 0.0
	if (A <= -9.5e+166)
		tmp = t_1;
	elseif (A <= -2.7e-20)
		tmp = t_0;
	elseif (A <= -2.25e-61)
		tmp = t_1;
	elseif (A <= 1.05e+85)
		tmp = t_0;
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + A) / Float64(-B))) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi);
	t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi);
	tmp = 0.0;
	if (A <= -9.5e+166)
		tmp = t_1;
	elseif (A <= -2.7e-20)
		tmp = t_0;
	elseif (A <= -2.25e-61)
		tmp = t_1;
	elseif (A <= 1.05e+85)
		tmp = t_0;
	else
		tmp = 180.0 * (atan(((B + 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]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -9.5e+166], t$95$1, If[LessEqual[A, -2.7e-20], t$95$0, If[LessEqual[A, -2.25e-61], t$95$1, If[LessEqual[A, 1.05e+85], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B + A), $MachinePrecision] / (-B)), $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}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -9.5 \cdot 10^{+166}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;A \leq 1.05 \cdot 10^{+85}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -9.49999999999999984e166 or -2.7e-20 < A < -2.25e-61

    1. Initial program 13.8%

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

      \[\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/80.9%

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

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

    if -9.49999999999999984e166 < A < -2.7e-20 or -2.25e-61 < A < 1.05000000000000005e85

    1. Initial program 57.2%

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

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

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

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

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

    if 1.05000000000000005e85 < A

    1. Initial program 75.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 0 75.5%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -9.5 \cdot 10^{+166}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.05 \cdot 10^{+85}:\\ \;\;\;\;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(\frac{B + A}{-B}\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 73.9% 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)\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{if}\;A \leq -9.5 \cdot 10^{+166}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\ \;\;\;\;180 \cdot \frac{t\_0}{\pi}\\ \mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq 5.8 \cdot 10^{+85}:\\ \;\;\;\;\frac{180}{\frac{\pi}{t\_0}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + A}{-B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (atan (/ (- C (hypot B C)) B)))
        (t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
   (if (<= A -9.5e+166)
     t_1
     (if (<= A -2.7e-20)
       (* 180.0 (/ t_0 PI))
       (if (<= A -2.25e-61)
         t_1
         (if (<= A 5.8e+85)
           (/ 180.0 (/ PI t_0))
           (* 180.0 (/ (atan (/ (+ B A) (- B))) PI))))))))
double code(double A, double B, double C) {
	double t_0 = atan(((C - hypot(B, C)) / B));
	double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
	double tmp;
	if (A <= -9.5e+166) {
		tmp = t_1;
	} else if (A <= -2.7e-20) {
		tmp = 180.0 * (t_0 / ((double) M_PI));
	} else if (A <= -2.25e-61) {
		tmp = t_1;
	} else if (A <= 5.8e+85) {
		tmp = 180.0 / (((double) M_PI) / t_0);
	} else {
		tmp = 180.0 * (atan(((B + 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 t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
	double tmp;
	if (A <= -9.5e+166) {
		tmp = t_1;
	} else if (A <= -2.7e-20) {
		tmp = 180.0 * (t_0 / Math.PI);
	} else if (A <= -2.25e-61) {
		tmp = t_1;
	} else if (A <= 5.8e+85) {
		tmp = 180.0 / (Math.PI / t_0);
	} else {
		tmp = 180.0 * (Math.atan(((B + A) / -B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = math.atan(((C - math.hypot(B, C)) / B))
	t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
	tmp = 0
	if A <= -9.5e+166:
		tmp = t_1
	elif A <= -2.7e-20:
		tmp = 180.0 * (t_0 / math.pi)
	elif A <= -2.25e-61:
		tmp = t_1
	elif A <= 5.8e+85:
		tmp = 180.0 / (math.pi / t_0)
	else:
		tmp = 180.0 * (math.atan(((B + A) / -B)) / math.pi)
	return tmp
function code(A, B, C)
	t_0 = atan(Float64(Float64(C - hypot(B, C)) / B))
	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi))
	tmp = 0.0
	if (A <= -9.5e+166)
		tmp = t_1;
	elseif (A <= -2.7e-20)
		tmp = Float64(180.0 * Float64(t_0 / pi));
	elseif (A <= -2.25e-61)
		tmp = t_1;
	elseif (A <= 5.8e+85)
		tmp = Float64(180.0 / Float64(pi / t_0));
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + A) / Float64(-B))) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = atan(((C - hypot(B, C)) / B));
	t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi);
	tmp = 0.0;
	if (A <= -9.5e+166)
		tmp = t_1;
	elseif (A <= -2.7e-20)
		tmp = 180.0 * (t_0 / pi);
	elseif (A <= -2.25e-61)
		tmp = t_1;
	elseif (A <= 5.8e+85)
		tmp = 180.0 / (pi / t_0);
	else
		tmp = 180.0 * (atan(((B + 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]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -9.5e+166], t$95$1, If[LessEqual[A, -2.7e-20], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.25e-61], t$95$1, If[LessEqual[A, 5.8e+85], N[(180.0 / N[(Pi / t$95$0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B + A), $MachinePrecision] / (-B)), $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)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -9.5 \cdot 10^{+166}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\

\mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -9.49999999999999984e166 or -2.7e-20 < A < -2.25e-61

    1. Initial program 13.8%

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

      \[\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/80.9%

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

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

    if -9.49999999999999984e166 < A < -2.7e-20

    1. Initial program 47.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 39.0%

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

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

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

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

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

    if -2.25e-61 < A < 5.79999999999999995e85

    1. Initial program 60.3%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Applied egg-rr84.8%

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

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

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

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

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

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

    if 5.79999999999999995e85 < A

    1. Initial program 75.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 0 75.5%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 79.3% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -5.2 \cdot 10^{+166} \lor \neg \left(A \leq -2.7 \cdot 10^{-20}\right) \land A \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\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 (or (<= A -5.2e+166) (and (not (<= A -2.7e-20)) (<= A -2.25e-61)))
   (* 180.0 (/ (atan (/ (* B 0.5) 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 <= -5.2e+166) || (!(A <= -2.7e-20) && (A <= -2.25e-61))) {
		tmp = 180.0 * (atan(((B * 0.5) / 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 <= -5.2e+166) || (!(A <= -2.7e-20) && (A <= -2.25e-61))) {
		tmp = 180.0 * (Math.atan(((B * 0.5) / 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 <= -5.2e+166) or (not (A <= -2.7e-20) and (A <= -2.25e-61)):
		tmp = 180.0 * (math.atan(((B * 0.5) / 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 <= -5.2e+166) || (!(A <= -2.7e-20) && (A <= -2.25e-61)))
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / 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 <= -5.2e+166) || (~((A <= -2.7e-20)) && (A <= -2.25e-61)))
		tmp = 180.0 * (atan(((B * 0.5) / 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[Or[LessEqual[A, -5.2e+166], And[N[Not[LessEqual[A, -2.7e-20]], $MachinePrecision], LessEqual[A, -2.25e-61]]], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $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 -5.2 \cdot 10^{+166} \lor \neg \left(A \leq -2.7 \cdot 10^{-20}\right) \land A \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\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 2 regimes
  2. if A < -5.1999999999999999e166 or -2.7e-20 < A < -2.25e-61

    1. Initial program 13.8%

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

      \[\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/80.9%

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

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

    if -5.1999999999999999e166 < A < -2.7e-20 or -2.25e-61 < A

    1. Initial program 61.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. Simplified85.3%

        \[\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 2 regimes into one program.
    4. Final simplification84.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.2 \cdot 10^{+166} \lor \neg \left(A \leq -2.7 \cdot 10^{-20}\right) \land A \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\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 8: 55.3% accurate, 3.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\frac{\pi}{\tan^{-1} 0}}\\ \mathbf{if}\;B \leq -4.8 \cdot 10^{-53}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.4 \cdot 10^{-245}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\ \mathbf{elif}\;B \leq -9.6 \cdot 10^{-273}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-293}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-252}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-221}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + A}{-B}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (/ 180.0 (/ PI (atan 0.0)))))
       (if (<= B -4.8e-53)
         (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
         (if (<= B -2.4e-245)
           (/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
           (if (<= B -9.6e-273)
             (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
             (if (<= B 7.2e-293)
               t_0
               (if (<= B 1.8e-252)
                 (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
                 (if (<= B 2.2e-221)
                   t_0
                   (* 180.0 (/ (atan (/ (+ B A) (- B))) PI))))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 / (((double) M_PI) / atan(0.0));
    	double tmp;
    	if (B <= -4.8e-53) {
    		tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
    	} else if (B <= -2.4e-245) {
    		tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
    	} else if (B <= -9.6e-273) {
    		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
    	} else if (B <= 7.2e-293) {
    		tmp = t_0;
    	} else if (B <= 1.8e-252) {
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	} else if (B <= 2.2e-221) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (atan(((B + A) / -B)) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 / (Math.PI / Math.atan(0.0));
    	double tmp;
    	if (B <= -4.8e-53) {
    		tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
    	} else if (B <= -2.4e-245) {
    		tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
    	} else if (B <= -9.6e-273) {
    		tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
    	} else if (B <= 7.2e-293) {
    		tmp = t_0;
    	} else if (B <= 1.8e-252) {
    		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	} else if (B <= 2.2e-221) {
    		tmp = t_0;
    	} else {
    		tmp = 180.0 * (Math.atan(((B + A) / -B)) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 / (math.pi / math.atan(0.0))
    	tmp = 0
    	if B <= -4.8e-53:
    		tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi)
    	elif B <= -2.4e-245:
    		tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A))))
    	elif B <= -9.6e-273:
    		tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
    	elif B <= 7.2e-293:
    		tmp = t_0
    	elif B <= 1.8e-252:
    		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	elif B <= 2.2e-221:
    		tmp = t_0
    	else:
    		tmp = 180.0 * (math.atan(((B + A) / -B)) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 / Float64(pi / atan(0.0)))
    	tmp = 0.0
    	if (B <= -4.8e-53)
    		tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi));
    	elseif (B <= -2.4e-245)
    		tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A)))));
    	elseif (B <= -9.6e-273)
    		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
    	elseif (B <= 7.2e-293)
    		tmp = t_0;
    	elseif (B <= 1.8e-252)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
    	elseif (B <= 2.2e-221)
    		tmp = t_0;
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + A) / Float64(-B))) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 / (pi / atan(0.0));
    	tmp = 0.0;
    	if (B <= -4.8e-53)
    		tmp = 180.0 * (atan((1.0 + (C / B))) / pi);
    	elseif (B <= -2.4e-245)
    		tmp = 180.0 / (pi / atan((0.5 * (B / A))));
    	elseif (B <= -9.6e-273)
    		tmp = 180.0 * (atan((2.0 * (C / B))) / pi);
    	elseif (B <= 7.2e-293)
    		tmp = t_0;
    	elseif (B <= 1.8e-252)
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	elseif (B <= 2.2e-221)
    		tmp = t_0;
    	else
    		tmp = 180.0 * (atan(((B + A) / -B)) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.8e-53], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.4e-245], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.6e-273], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.2e-293], t$95$0, If[LessEqual[B, 1.8e-252], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.2e-221], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B + A), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
    \mathbf{if}\;B \leq -4.8 \cdot 10^{-53}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq -2.4 \cdot 10^{-245}:\\
    \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
    
    \mathbf{elif}\;B \leq -9.6 \cdot 10^{-273}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 7.2 \cdot 10^{-293}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.8 \cdot 10^{-252}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 2.2 \cdot 10^{-221}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + A}{-B}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 6 regimes
    2. if B < -4.80000000000000015e-53

      1. Initial program 55.0%

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

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

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

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

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

      if -4.80000000000000015e-53 < B < -2.4e-245

      1. Initial program 46.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. Applied egg-rr69.9%

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

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

      if -2.4e-245 < B < -9.59999999999999926e-273

      1. Initial program 100.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 100.0%

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

      if -9.59999999999999926e-273 < B < 7.1999999999999997e-293 or 1.80000000000000011e-252 < B < 2.20000000000000001e-221

      1. Initial program 40.6%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Applied egg-rr75.3%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}} \]
      4. Step-by-step derivation
        1. div-sub23.3%

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(-\frac{\mathsf{hypot}\left(A - C, B\right)}{B}\right)\right)}}} \]
      6. Step-by-step derivation
        1. sub-neg23.3%

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{\left(-1 \cdot \left(-1 \cdot \frac{A}{B} + \frac{A}{B}\right)\right)}}} \]
      9. Step-by-step derivation
        1. distribute-lft1-in32.7%

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

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

          \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \left(-1 \cdot \color{blue}{0}\right)}} \]
        4. metadata-eval54.6%

          \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{0}}} \]
      10. Simplified54.6%

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

      if 7.1999999999999997e-293 < B < 1.80000000000000011e-252

      1. Initial program 57.6%

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

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

      if 2.20000000000000001e-221 < B

      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 C around 0 51.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.8 \cdot 10^{-53}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.4 \cdot 10^{-245}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\ \mathbf{elif}\;B \leq -9.6 \cdot 10^{-273}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-293}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-252}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-221}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + A}{-B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 52.4% accurate, 3.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\frac{\pi}{\tan^{-1} 0}}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{if}\;B \leq -6.5 \cdot 10^{-273}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-295}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.35 \cdot 10^{-249}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{-217}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-175}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 1.35 \cdot 10^{-41}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{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 (/ PI (atan 0.0))))
            (t_1 (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))))
       (if (<= B -6.5e-273)
         (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
         (if (<= B 2.7e-295)
           t_0
           (if (<= B 1.35e-249)
             t_1
             (if (<= B 1.4e-217)
               t_0
               (if (<= B 1.1e-175)
                 t_1
                 (if (<= B 1.35e-41)
                   (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
                   (* 180.0 (/ (atan -1.0) PI))))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 / (((double) M_PI) / atan(0.0));
    	double t_1 = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	double tmp;
    	if (B <= -6.5e-273) {
    		tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
    	} else if (B <= 2.7e-295) {
    		tmp = t_0;
    	} else if (B <= 1.35e-249) {
    		tmp = t_1;
    	} else if (B <= 1.4e-217) {
    		tmp = t_0;
    	} else if (B <= 1.1e-175) {
    		tmp = t_1;
    	} else if (B <= 1.35e-41) {
    		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
    	} else {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 / (Math.PI / Math.atan(0.0));
    	double t_1 = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	double tmp;
    	if (B <= -6.5e-273) {
    		tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
    	} else if (B <= 2.7e-295) {
    		tmp = t_0;
    	} else if (B <= 1.35e-249) {
    		tmp = t_1;
    	} else if (B <= 1.4e-217) {
    		tmp = t_0;
    	} else if (B <= 1.1e-175) {
    		tmp = t_1;
    	} else if (B <= 1.35e-41) {
    		tmp = 180.0 * (Math.atan((2.0 * (C / 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.pi / math.atan(0.0))
    	t_1 = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	tmp = 0
    	if B <= -6.5e-273:
    		tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi)
    	elif B <= 2.7e-295:
    		tmp = t_0
    	elif B <= 1.35e-249:
    		tmp = t_1
    	elif B <= 1.4e-217:
    		tmp = t_0
    	elif B <= 1.1e-175:
    		tmp = t_1
    	elif B <= 1.35e-41:
    		tmp = 180.0 * (math.atan((2.0 * (C / 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(pi / atan(0.0)))
    	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi))
    	tmp = 0.0
    	if (B <= -6.5e-273)
    		tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi));
    	elseif (B <= 2.7e-295)
    		tmp = t_0;
    	elseif (B <= 1.35e-249)
    		tmp = t_1;
    	elseif (B <= 1.4e-217)
    		tmp = t_0;
    	elseif (B <= 1.1e-175)
    		tmp = t_1;
    	elseif (B <= 1.35e-41)
    		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 / (pi / atan(0.0));
    	t_1 = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	tmp = 0.0;
    	if (B <= -6.5e-273)
    		tmp = 180.0 * (atan((1.0 + (C / B))) / pi);
    	elseif (B <= 2.7e-295)
    		tmp = t_0;
    	elseif (B <= 1.35e-249)
    		tmp = t_1;
    	elseif (B <= 1.4e-217)
    		tmp = t_0;
    	elseif (B <= 1.1e-175)
    		tmp = t_1;
    	elseif (B <= 1.35e-41)
    		tmp = 180.0 * (atan((2.0 * (C / 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[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6.5e-273], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.7e-295], t$95$0, If[LessEqual[B, 1.35e-249], t$95$1, If[LessEqual[B, 1.4e-217], t$95$0, If[LessEqual[B, 1.1e-175], t$95$1, If[LessEqual[B, 1.35e-41], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / 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 := \frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
    t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    \mathbf{if}\;B \leq -6.5 \cdot 10^{-273}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 2.7 \cdot 10^{-295}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.35 \cdot 10^{-249}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq 1.4 \cdot 10^{-217}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 1.1 \cdot 10^{-175}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;B \leq 1.35 \cdot 10^{-41}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{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 < -6.49999999999999979e-273

      1. Initial program 53.9%

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

        \[\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+69.2%

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

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

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

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

      if -6.49999999999999979e-273 < B < 2.7000000000000001e-295 or 1.35e-249 < B < 1.4e-217

      1. Initial program 33.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. Applied egg-rr75.3%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}} \]
      4. Step-by-step derivation
        1. div-sub16.1%

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(-\frac{\mathsf{hypot}\left(A - C, B\right)}{B}\right)\right)}}} \]
      6. Step-by-step derivation
        1. sub-neg16.1%

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{\left(-1 \cdot \left(-1 \cdot \frac{A}{B} + \frac{A}{B}\right)\right)}}} \]
      9. Step-by-step derivation
        1. distribute-lft1-in32.7%

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

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

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

          \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{0}}} \]
      10. Simplified61.5%

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

      if 2.7000000000000001e-295 < B < 1.35e-249 or 1.4e-217 < B < 1.1e-175

      1. Initial program 61.8%

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

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

      if 1.1e-175 < B < 1.35e-41

      1. Initial program 77.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 56.2%

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

      if 1.35e-41 < B

      1. Initial program 53.6%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.5 \cdot 10^{-273}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-295}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\ \mathbf{elif}\;B \leq 1.35 \cdot 10^{-249}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{-217}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-175}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.35 \cdot 10^{-41}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 48.2% accurate, 3.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -5.1 \cdot 10^{-52}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -6.3 \cdot 10^{-273}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 4 \cdot 10^{-295}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-175}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 10^{-40}:\\ \;\;\;\;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 (* 2.0 (/ C B))) PI))))
       (if (<= B -5.1e-52)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -6.3e-273)
           t_0
           (if (<= B 4e-295)
             (/ 180.0 (/ PI (atan 0.0)))
             (if (<= B 1.5e-175)
               (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
               (if (<= B 1e-40) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
    	double tmp;
    	if (B <= -5.1e-52) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -6.3e-273) {
    		tmp = t_0;
    	} else if (B <= 4e-295) {
    		tmp = 180.0 / (((double) M_PI) / atan(0.0));
    	} else if (B <= 1.5e-175) {
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
    	} else if (B <= 1e-40) {
    		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((2.0 * (C / B))) / Math.PI);
    	double tmp;
    	if (B <= -5.1e-52) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -6.3e-273) {
    		tmp = t_0;
    	} else if (B <= 4e-295) {
    		tmp = 180.0 / (Math.PI / Math.atan(0.0));
    	} else if (B <= 1.5e-175) {
    		tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
    	} else if (B <= 1e-40) {
    		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((2.0 * (C / B))) / math.pi)
    	tmp = 0
    	if B <= -5.1e-52:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -6.3e-273:
    		tmp = t_0
    	elif B <= 4e-295:
    		tmp = 180.0 / (math.pi / math.atan(0.0))
    	elif B <= 1.5e-175:
    		tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi)
    	elif B <= 1e-40:
    		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(2.0 * Float64(C / B))) / pi))
    	tmp = 0.0
    	if (B <= -5.1e-52)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -6.3e-273)
    		tmp = t_0;
    	elseif (B <= 4e-295)
    		tmp = Float64(180.0 / Float64(pi / atan(0.0)));
    	elseif (B <= 1.5e-175)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi));
    	elseif (B <= 1e-40)
    		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((2.0 * (C / B))) / pi);
    	tmp = 0.0;
    	if (B <= -5.1e-52)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -6.3e-273)
    		tmp = t_0;
    	elseif (B <= 4e-295)
    		tmp = 180.0 / (pi / atan(0.0));
    	elseif (B <= 1.5e-175)
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	elseif (B <= 1e-40)
    		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[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.1e-52], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.3e-273], t$95$0, If[LessEqual[B, 4e-295], N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.5e-175], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1e-40], 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(2 \cdot \frac{C}{B}\right)}{\pi}\\
    \mathbf{if}\;B \leq -5.1 \cdot 10^{-52}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -6.3 \cdot 10^{-273}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 4 \cdot 10^{-295}:\\
    \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
    
    \mathbf{elif}\;B \leq 1.5 \cdot 10^{-175}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 10^{-40}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if B < -5.09999999999999989e-52

      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 68.3%

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

      if -5.09999999999999989e-52 < B < -6.29999999999999977e-273 or 1.5e-175 < B < 9.9999999999999993e-41

      1. Initial program 61.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 C around -inf 43.6%

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

      if -6.29999999999999977e-273 < B < 4.00000000000000024e-295

      1. Initial program 35.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. Applied egg-rr77.3%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}} \]
      4. Step-by-step derivation
        1. div-sub16.0%

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(-\frac{\mathsf{hypot}\left(A - C, B\right)}{B}\right)\right)}}} \]
      6. Step-by-step derivation
        1. sub-neg16.0%

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

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

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

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

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

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

          \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{0}}} \]
      10. Simplified63.4%

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

      if 4.00000000000000024e-295 < B < 1.5e-175

      1. Initial program 54.0%

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

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

      if 9.9999999999999993e-41 < B

      1. Initial program 53.6%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.1 \cdot 10^{-52}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -6.3 \cdot 10^{-273}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4 \cdot 10^{-295}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-175}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 10^{-40}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 56.4% accurate, 3.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{if}\;A \leq -5.2 \cdot 10^{+166}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq -4.5 \cdot 10^{+103}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;A \leq -2.4 \cdot 10^{-62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq 8.2 \cdot 10^{-176}:\\ \;\;\;\;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 B))) PI)))
            (t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
       (if (<= A -5.2e+166)
         t_1
         (if (<= A -4.5e+103)
           t_0
           (if (<= A -2.4e-62)
             t_1
             (if (<= A 8.2e-176) 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 / B))) / ((double) M_PI));
    	double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
    	double tmp;
    	if (A <= -5.2e+166) {
    		tmp = t_1;
    	} else if (A <= -4.5e+103) {
    		tmp = t_0;
    	} else if (A <= -2.4e-62) {
    		tmp = t_1;
    	} else if (A <= 8.2e-176) {
    		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 / B))) / Math.PI);
    	double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
    	double tmp;
    	if (A <= -5.2e+166) {
    		tmp = t_1;
    	} else if (A <= -4.5e+103) {
    		tmp = t_0;
    	} else if (A <= -2.4e-62) {
    		tmp = t_1;
    	} else if (A <= 8.2e-176) {
    		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 / B))) / math.pi)
    	t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
    	tmp = 0
    	if A <= -5.2e+166:
    		tmp = t_1
    	elif A <= -4.5e+103:
    		tmp = t_0
    	elif A <= -2.4e-62:
    		tmp = t_1
    	elif A <= 8.2e-176:
    		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(C / B))) / pi))
    	t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi))
    	tmp = 0.0
    	if (A <= -5.2e+166)
    		tmp = t_1;
    	elseif (A <= -4.5e+103)
    		tmp = t_0;
    	elseif (A <= -2.4e-62)
    		tmp = t_1;
    	elseif (A <= 8.2e-176)
    		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 / B))) / pi);
    	t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi);
    	tmp = 0.0;
    	if (A <= -5.2e+166)
    		tmp = t_1;
    	elseif (A <= -4.5e+103)
    		tmp = t_0;
    	elseif (A <= -2.4e-62)
    		tmp = t_1;
    	elseif (A <= 8.2e-176)
    		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[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.2e+166], t$95$1, If[LessEqual[A, -4.5e+103], t$95$0, If[LessEqual[A, -2.4e-62], t$95$1, If[LessEqual[A, 8.2e-176], 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}{B}\right)}{\pi}\\
    t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
    \mathbf{if}\;A \leq -5.2 \cdot 10^{+166}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;A \leq -4.5 \cdot 10^{+103}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;A \leq -2.4 \cdot 10^{-62}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;A \leq 8.2 \cdot 10^{-176}:\\
    \;\;\;\;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 A < -5.1999999999999999e166 or -4.50000000000000001e103 < A < -2.39999999999999984e-62

      1. Initial program 29.7%

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

        \[\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/62.0%

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

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

      if -5.1999999999999999e166 < A < -4.50000000000000001e103 or -2.39999999999999984e-62 < A < 8.2000000000000005e-176

      1. Initial program 56.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 54.0%

        \[\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+54.0%

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

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

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

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

      if 8.2000000000000005e-176 < A

      1. Initial program 70.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 C around 0 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.2 \cdot 10^{+166}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.5 \cdot 10^{+103}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.4 \cdot 10^{-62}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 8.2 \cdot 10^{-176}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 48.2% accurate, 3.5× speedup?

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

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

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

      if -6.4999999999999994e-61 < B < 1.85000000000000002e-7

      1. Initial program 58.8%

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

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

      if 1.85000000000000002e-7 < B

      1. Initial program 52.2%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.5 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{-7}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 51.0% accurate, 3.5× speedup?

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

      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. Applied egg-rr52.8%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}} \]
      4. Step-by-step derivation
        1. div-sub16.7%

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(-\frac{\mathsf{hypot}\left(A - C, B\right)}{B}\right)\right)}}} \]
      6. Step-by-step derivation
        1. sub-neg16.7%

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{\left(-1 \cdot \left(-1 \cdot \frac{A}{B} + \frac{A}{B}\right)\right)}}} \]
      9. Step-by-step derivation
        1. distribute-lft1-in2.8%

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

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

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

          \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{0}}} \]
      10. Simplified39.0%

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

      if -3.49999999999999987e167 < A < 1.2200000000000001e-176

      1. Initial program 52.0%

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

        \[\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+47.2%

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

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

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

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

      if 1.2200000000000001e-176 < A

      1. Initial program 70.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 C around 0 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 14: 65.8% accurate, 3.6× speedup?

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

      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. Step-by-step derivation
        1. associate-*r/54.4%

          \[\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/54.4%

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

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

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

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

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

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

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

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

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

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

      if -8.3999999999999991e-53 < B

      1. Initial program 55.8%

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

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

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

    Alternative 15: 63.5% accurate, 3.6× speedup?

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

      1. Initial program 55.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 63.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+63.8%

          \[\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 7.5000000000000003e-95 < B

      1. Initial program 55.3%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 16: 63.5% accurate, 3.6× speedup?

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

      1. Initial program 55.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 63.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+63.8%

          \[\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 1.79999999999999999e-97 < B

      1. Initial program 55.3%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 17: 65.8% accurate, 3.6× speedup?

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

      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 82.3%

        \[\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+82.3%

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

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

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

      if -8.3999999999999991e-53 < B

      1. Initial program 55.8%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Applied egg-rr78.6%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}} \]
      4. Step-by-step derivation
        1. div-sub65.1%

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(-\frac{\mathsf{hypot}\left(A - C, B\right)}{B}\right)\right)}}} \]
      6. Step-by-step derivation
        1. sub-neg65.1%

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

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

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

          \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right)}} \]
        2. associate--r+60.9%

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

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

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

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

    Alternative 18: 65.8% accurate, 3.6× speedup?

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

      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. Step-by-step derivation
        1. associate-*r/54.4%

          \[\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/54.4%

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

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

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

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

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

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

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

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

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

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

      if -8.3999999999999991e-53 < B

      1. Initial program 55.8%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Applied egg-rr78.6%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}} \]
      4. Step-by-step derivation
        1. div-sub65.1%

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(-\frac{\mathsf{hypot}\left(A - C, B\right)}{B}\right)\right)}}} \]
      6. Step-by-step derivation
        1. sub-neg65.1%

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

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

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

          \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C}{B} - \color{blue}{\left(\frac{A}{B} + 1\right)}\right)}} \]
        2. associate--r+60.9%

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

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

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

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

    Alternative 19: 45.8% accurate, 3.6× speedup?

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

      1. Initial program 54.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 65.8%

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

      if -1.46e-74 < B < 2.45000000000000005e-174

      1. Initial program 52.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. Applied egg-rr76.2%

        \[\leadsto \color{blue}{\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}} \]
      4. Step-by-step derivation
        1. div-sub46.8%

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

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} + \left(-\frac{\mathsf{hypot}\left(A - C, B\right)}{B}\right)\right)}}} \]
      6. Step-by-step derivation
        1. sub-neg46.8%

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

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

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

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

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

          \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \left(-1 \cdot \color{blue}{0}\right)}} \]
        4. metadata-eval32.3%

          \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \color{blue}{0}}} \]
      10. Simplified32.3%

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

      if 2.45000000000000005e-174 < B

      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 B around inf 52.6%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.46 \cdot 10^{-74}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 2.45 \cdot 10^{-174}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 20: 41.3% accurate, 3.8× speedup?

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

      1. Initial program 53.3%

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

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

      if -1.000000000000002e-309 < B

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1 \cdot 10^{-309}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 21: 21.7% 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 55.3%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
    4. Final simplification21.1%

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

    Reproduce

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