ABCF->ab-angle angle

Percentage Accurate: 54.0% → 82.0%
Time: 29.6s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 54.0% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -9.9999999999999997e-48 or 0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))

    1. Initial program 57.1%

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

        \[\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}} \]
    4. Applied egg-rr85.7%

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

    if -9.9999999999999997e-48 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0

    1. Initial program 12.6%

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

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

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

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

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

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

    \[\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 -1 \cdot 10^{-47} \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 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 75.7% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;A \leq -1.5 \cdot 10^{+158}:\\
\;\;\;\;\frac{180 \cdot t\_2}{\pi}\\

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

\mathbf{elif}\;A \leq 3 \cdot 10^{+34}:\\
\;\;\;\;180 \cdot \frac{t\_2}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -4.8e213 or -1.5e158 < A < -6.49999999999999972e48

    1. Initial program 19.6%

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

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

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

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

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

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

    if -4.8e213 < A < -1.5e158

    1. Initial program 32.5%

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

        \[\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}} \]
    4. Applied egg-rr81.7%

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

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

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

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

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

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

    if -6.49999999999999972e48 < A < 3.00000000000000018e34

    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. Step-by-step derivation
      1. associate--l-53.9%

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

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

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

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

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

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

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

    if 3.00000000000000018e34 < A

    1. Initial program 79.5%

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

        \[\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}} \]
    4. Applied egg-rr92.9%

      \[\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 C around -inf 87.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.8 \cdot 10^{+213}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.5 \cdot 10^{+158}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -6.5 \cdot 10^{+48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3 \cdot 10^{+34}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - \mathsf{hypot}\left(B, C\right)\right) - A}{B}\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 75.6% 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 -6.5 \cdot 10^{+212}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq -1.55 \cdot 10^{+158}:\\ \;\;\;\;\frac{180 \cdot t\_0}{\pi}\\ \mathbf{elif}\;A \leq -5.6 \cdot 10^{+48}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq 2 \cdot 10^{+35}:\\ \;\;\;\;180 \cdot \frac{t\_0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \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 -6.5e+212)
     t_1
     (if (<= A -1.55e+158)
       (/ (* 180.0 t_0) PI)
       (if (<= A -5.6e+48)
         t_1
         (if (<= A 2e+35)
           (* 180.0 (/ t_0 PI))
           (* 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 <= -6.5e+212) {
		tmp = t_1;
	} else if (A <= -1.55e+158) {
		tmp = (180.0 * t_0) / ((double) M_PI);
	} else if (A <= -5.6e+48) {
		tmp = t_1;
	} else if (A <= 2e+35) {
		tmp = 180.0 * (t_0 / ((double) M_PI));
	} 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 <= -6.5e+212) {
		tmp = t_1;
	} else if (A <= -1.55e+158) {
		tmp = (180.0 * t_0) / Math.PI;
	} else if (A <= -5.6e+48) {
		tmp = t_1;
	} else if (A <= 2e+35) {
		tmp = 180.0 * (t_0 / Math.PI);
	} 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 <= -6.5e+212:
		tmp = t_1
	elif A <= -1.55e+158:
		tmp = (180.0 * t_0) / math.pi
	elif A <= -5.6e+48:
		tmp = t_1
	elif A <= 2e+35:
		tmp = 180.0 * (t_0 / math.pi)
	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 <= -6.5e+212)
		tmp = t_1;
	elseif (A <= -1.55e+158)
		tmp = Float64(Float64(180.0 * t_0) / pi);
	elseif (A <= -5.6e+48)
		tmp = t_1;
	elseif (A <= 2e+35)
		tmp = Float64(180.0 * Float64(t_0 / pi));
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / 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 <= -6.5e+212)
		tmp = t_1;
	elseif (A <= -1.55e+158)
		tmp = (180.0 * t_0) / pi;
	elseif (A <= -5.6e+48)
		tmp = t_1;
	elseif (A <= 2e+35)
		tmp = 180.0 * (t_0 / pi);
	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, -6.5e+212], t$95$1, If[LessEqual[A, -1.55e+158], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -5.6e+48], t$95$1, If[LessEqual[A, 2e+35], N[(180.0 * N[(t$95$0 / Pi), $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 -6.5 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;A \leq -5.6 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -6.49999999999999997e212 or -1.5500000000000001e158 < A < -5.60000000000000025e48

    1. Initial program 19.6%

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

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

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

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

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

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

    if -6.49999999999999997e212 < A < -1.5500000000000001e158

    1. Initial program 32.5%

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

        \[\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}} \]
    4. Applied egg-rr81.7%

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

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

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

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

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

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

    if -5.60000000000000025e48 < A < 1.9999999999999999e35

    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. Step-by-step derivation
      1. associate--l-53.9%

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

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

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

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

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

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

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

    if 1.9999999999999999e35 < A

    1. Initial program 79.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -6.5 \cdot 10^{+212}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.55 \cdot 10^{+158}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -5.6 \cdot 10^{+48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2 \cdot 10^{+35}:\\ \;\;\;\;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{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 73.8% 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 -6.5 \cdot 10^{+212}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq -8 \cdot 10^{+157}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;A \leq -1.5 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq 8 \cdot 10^{+38}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\right) - 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 -6.5e+212)
     t_1
     (if (<= A -8e+157)
       t_0
       (if (<= A -1.5e+45)
         t_1
         (if (<= A 8e+38) t_0 (/ (* 180.0 (atan (/ (- (- C 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 <= -6.5e+212) {
		tmp = t_1;
	} else if (A <= -8e+157) {
		tmp = t_0;
	} else if (A <= -1.5e+45) {
		tmp = t_1;
	} else if (A <= 8e+38) {
		tmp = t_0;
	} else {
		tmp = (180.0 * atan((((C - 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 <= -6.5e+212) {
		tmp = t_1;
	} else if (A <= -8e+157) {
		tmp = t_0;
	} else if (A <= -1.5e+45) {
		tmp = t_1;
	} else if (A <= 8e+38) {
		tmp = t_0;
	} else {
		tmp = (180.0 * Math.atan((((C - 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 <= -6.5e+212:
		tmp = t_1
	elif A <= -8e+157:
		tmp = t_0
	elif A <= -1.5e+45:
		tmp = t_1
	elif A <= 8e+38:
		tmp = t_0
	else:
		tmp = (180.0 * math.atan((((C - 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 <= -6.5e+212)
		tmp = t_1;
	elseif (A <= -8e+157)
		tmp = t_0;
	elseif (A <= -1.5e+45)
		tmp = t_1;
	elseif (A <= 8e+38)
		tmp = t_0;
	else
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - B) - A) / B))) / pi);
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi);
	t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi);
	tmp = 0.0;
	if (A <= -6.5e+212)
		tmp = t_1;
	elseif (A <= -8e+157)
		tmp = t_0;
	elseif (A <= -1.5e+45)
		tmp = t_1;
	elseif (A <= 8e+38)
		tmp = t_0;
	else
		tmp = (180.0 * atan((((C - 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, -6.5e+212], t$95$1, If[LessEqual[A, -8e+157], t$95$0, If[LessEqual[A, -1.5e+45], t$95$1, If[LessEqual[A, 8e+38], t$95$0, N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -6.5 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;A \leq -1.5 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;A \leq 8 \cdot 10^{+38}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -6.49999999999999997e212 or -7.99999999999999987e157 < A < -1.50000000000000005e45

    1. Initial program 19.6%

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

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

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

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

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

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

    if -6.49999999999999997e212 < A < -7.99999999999999987e157 or -1.50000000000000005e45 < A < 7.99999999999999982e38

    1. Initial program 51.1%

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

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

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

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

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

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

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

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

    if 7.99999999999999982e38 < A

    1. Initial program 79.1%

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

        \[\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}} \]
    4. Applied egg-rr92.8%

      \[\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 81.0%

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

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

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

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

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

Alternative 5: 73.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 -6.5 \cdot 10^{+212}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq -1.6 \cdot 10^{+158}:\\ \;\;\;\;\frac{180 \cdot t\_0}{\pi}\\ \mathbf{elif}\;A \leq -1.25 \cdot 10^{+46}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;A \leq 1.25 \cdot 10^{+39}:\\ \;\;\;\;180 \cdot \frac{t\_0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\right) - 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 -6.5e+212)
     t_1
     (if (<= A -1.6e+158)
       (/ (* 180.0 t_0) PI)
       (if (<= A -1.25e+46)
         t_1
         (if (<= A 1.25e+39)
           (* 180.0 (/ t_0 PI))
           (/ (* 180.0 (atan (/ (- (- C 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 <= -6.5e+212) {
		tmp = t_1;
	} else if (A <= -1.6e+158) {
		tmp = (180.0 * t_0) / ((double) M_PI);
	} else if (A <= -1.25e+46) {
		tmp = t_1;
	} else if (A <= 1.25e+39) {
		tmp = 180.0 * (t_0 / ((double) M_PI));
	} else {
		tmp = (180.0 * atan((((C - 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 <= -6.5e+212) {
		tmp = t_1;
	} else if (A <= -1.6e+158) {
		tmp = (180.0 * t_0) / Math.PI;
	} else if (A <= -1.25e+46) {
		tmp = t_1;
	} else if (A <= 1.25e+39) {
		tmp = 180.0 * (t_0 / Math.PI);
	} else {
		tmp = (180.0 * Math.atan((((C - 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 <= -6.5e+212:
		tmp = t_1
	elif A <= -1.6e+158:
		tmp = (180.0 * t_0) / math.pi
	elif A <= -1.25e+46:
		tmp = t_1
	elif A <= 1.25e+39:
		tmp = 180.0 * (t_0 / math.pi)
	else:
		tmp = (180.0 * math.atan((((C - 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 <= -6.5e+212)
		tmp = t_1;
	elseif (A <= -1.6e+158)
		tmp = Float64(Float64(180.0 * t_0) / pi);
	elseif (A <= -1.25e+46)
		tmp = t_1;
	elseif (A <= 1.25e+39)
		tmp = Float64(180.0 * Float64(t_0 / pi));
	else
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - B) - A) / 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 <= -6.5e+212)
		tmp = t_1;
	elseif (A <= -1.6e+158)
		tmp = (180.0 * t_0) / pi;
	elseif (A <= -1.25e+46)
		tmp = t_1;
	elseif (A <= 1.25e+39)
		tmp = 180.0 * (t_0 / pi);
	else
		tmp = (180.0 * atan((((C - 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, -6.5e+212], t$95$1, If[LessEqual[A, -1.6e+158], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -1.25e+46], t$95$1, If[LessEqual[A, 1.25e+39], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -6.5 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;A \leq -1.25 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -6.49999999999999997e212 or -1.59999999999999997e158 < A < -1.2500000000000001e46

    1. Initial program 19.6%

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

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

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

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

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

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

    if -6.49999999999999997e212 < A < -1.59999999999999997e158

    1. Initial program 32.5%

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

        \[\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}} \]
    4. Applied egg-rr81.7%

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

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

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

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

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

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

    if -1.2500000000000001e46 < A < 1.25000000000000004e39

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

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

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

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

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

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

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

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

    if 1.25000000000000004e39 < A

    1. Initial program 79.1%

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

        \[\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}} \]
    4. Applied egg-rr92.8%

      \[\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 81.0%

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

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

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

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

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

Alternative 6: 78.6% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{if}\;A \leq -1.35 \cdot 10^{+217}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;A \leq -1.25 \cdot 10^{+158}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.9 \cdot 10^{+47}:\\ \;\;\;\;t\_0\\ \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
 (let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
   (if (<= A -1.35e+217)
     t_0
     (if (<= A -1.25e+158)
       (/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
       (if (<= A -2.9e+47)
         t_0
         (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI)))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
	double tmp;
	if (A <= -1.35e+217) {
		tmp = t_0;
	} else if (A <= -1.25e+158) {
		tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
	} else if (A <= -2.9e+47) {
		tmp = t_0;
	} 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 t_0 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
	double tmp;
	if (A <= -1.35e+217) {
		tmp = t_0;
	} else if (A <= -1.25e+158) {
		tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
	} else if (A <= -2.9e+47) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
	tmp = 0
	if A <= -1.35e+217:
		tmp = t_0
	elif A <= -1.25e+158:
		tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi
	elif A <= -2.9e+47:
		tmp = t_0
	else:
		tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi)
	return tmp
function code(A, B, C)
	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi))
	tmp = 0.0
	if (A <= -1.35e+217)
		tmp = t_0;
	elseif (A <= -1.25e+158)
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi);
	elseif (A <= -2.9e+47)
		tmp = t_0;
	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)
	t_0 = 180.0 * (atan(((B * 0.5) / A)) / pi);
	tmp = 0.0;
	if (A <= -1.35e+217)
		tmp = t_0;
	elseif (A <= -1.25e+158)
		tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi;
	elseif (A <= -2.9e+47)
		tmp = t_0;
	else
		tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.35e+217], t$95$0, If[LessEqual[A, -1.25e+158], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -2.9e+47], t$95$0, 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}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.35 \cdot 10^{+217}:\\
\;\;\;\;t\_0\\

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

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

\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 3 regimes
  2. if A < -1.35000000000000001e217 or -1.2499999999999999e158 < A < -2.8999999999999998e47

    1. Initial program 19.6%

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

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

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

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

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

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

    if -1.35000000000000001e217 < A < -1.2499999999999999e158

    1. Initial program 32.5%

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

        \[\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}} \]
    4. Applied egg-rr81.7%

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

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

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

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

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

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

    if -2.8999999999999998e47 < 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. Simplified83.5%

        \[\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 3 regimes into one program.
    4. Final simplification80.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.35 \cdot 10^{+217}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.25 \cdot 10^{+158}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.9 \cdot 10^{+47}:\\ \;\;\;\;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 7: 78.7% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{if}\;A \leq -4 \cdot 10^{+214}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;A \leq -1.6 \cdot 10^{+158}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -9 \cdot 10^{+46}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
       (if (<= A -4e+214)
         t_0
         (if (<= A -1.6e+158)
           (/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
           (if (<= A -9e+46)
             t_0
             (* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- A C)))) B))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
    	double tmp;
    	if (A <= -4e+214) {
    		tmp = t_0;
    	} else if (A <= -1.6e+158) {
    		tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
    	} else if (A <= -9e+46) {
    		tmp = t_0;
    	} else {
    		tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (A - C)))) / B));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double t_0 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
    	double tmp;
    	if (A <= -4e+214) {
    		tmp = t_0;
    	} else if (A <= -1.6e+158) {
    		tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
    	} else if (A <= -9e+46) {
    		tmp = t_0;
    	} else {
    		tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B));
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	t_0 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
    	tmp = 0
    	if A <= -4e+214:
    		tmp = t_0
    	elif A <= -1.6e+158:
    		tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi
    	elif A <= -9e+46:
    		tmp = t_0
    	else:
    		tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (A - C)))) / B))
    	return tmp
    
    function code(A, B, C)
    	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi))
    	tmp = 0.0
    	if (A <= -4e+214)
    		tmp = t_0;
    	elseif (A <= -1.6e+158)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi);
    	elseif (A <= -9e+46)
    		tmp = t_0;
    	else
    		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	t_0 = 180.0 * (atan(((B * 0.5) / A)) / pi);
    	tmp = 0.0;
    	if (A <= -4e+214)
    		tmp = t_0;
    	elseif (A <= -1.6e+158)
    		tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi;
    	elseif (A <= -9e+46)
    		tmp = t_0;
    	else
    		tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (A - C)))) / B));
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4e+214], t$95$0, If[LessEqual[A, -1.6e+158], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -9e+46], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
    \mathbf{if}\;A \leq -4 \cdot 10^{+214}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;A \leq -1.6 \cdot 10^{+158}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -9 \cdot 10^{+46}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if A < -3.9999999999999998e214 or -1.59999999999999997e158 < A < -9.00000000000000019e46

      1. Initial program 19.6%

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

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

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

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

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

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

      if -3.9999999999999998e214 < A < -1.59999999999999997e158

      1. Initial program 32.5%

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

          \[\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}} \]
      4. Applied egg-rr81.7%

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

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

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

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

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

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

      if -9.00000000000000019e46 < 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. Add Preprocessing
      3. Taylor expanded in B around 0 61.5%

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

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

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

    Alternative 8: 43.9% accurate, 3.2× speedup?

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

      1. Initial program 46.6%

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

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

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

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

      if -4.5e19 < B < -4.0000000000000001e-281

      1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{-\tan^{-1} \left(\frac{\color{blue}{-A}}{B}\right)}{\pi} \]
        10. add-sqr-sqrt9.2%

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

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

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

          \[\leadsto 180 \cdot \frac{-\tan^{-1} \left(\frac{\color{blue}{\sqrt{A} \cdot \sqrt{A}}}{B}\right)}{\pi} \]
        14. add-sqr-sqrt40.1%

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

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

      if -4.0000000000000001e-281 < B < 2.7000000000000001e-93

      1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

      if 2.7000000000000001e-93 < B < 2.00000000000000009e93

      1. Initial program 56.9%

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

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

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

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

      if 2.00000000000000009e93 < B

      1. Initial program 44.7%

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.5 \cdot 10^{+19}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4 \cdot 10^{-281}:\\ \;\;\;\;180 \cdot \frac{-\tan^{-1} \left(\frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-93}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2 \cdot 10^{+93}:\\ \;\;\;\;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 9: 45.1% accurate, 3.4× speedup?

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

      1. Initial program 46.6%

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

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

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

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

      if -5.2e19 < B < -6.50000000000000031e-283

      1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{-\tan^{-1} \left(\frac{\color{blue}{-A}}{B}\right)}{\pi} \]
        10. add-sqr-sqrt9.2%

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

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

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

          \[\leadsto 180 \cdot \frac{-\tan^{-1} \left(\frac{\color{blue}{\sqrt{A} \cdot \sqrt{A}}}{B}\right)}{\pi} \]
        14. add-sqr-sqrt40.1%

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

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

      if -6.50000000000000031e-283 < B < 2.50000000000000009e-98

      1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

      if 2.50000000000000009e-98 < B

      1. Initial program 50.4%

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.2 \cdot 10^{+19}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -6.5 \cdot 10^{-283}:\\ \;\;\;\;180 \cdot \frac{-\tan^{-1} \left(\frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-98}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 59.1% accurate, 3.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -2.2 \cdot 10^{+44}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.1 \cdot 10^{-16}:\\ \;\;\;\;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 -2.2e+44)
       (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
       (if (<= A 4.1e-16)
         (* 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 <= -2.2e+44) {
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
    	} else if (A <= 4.1e-16) {
    		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 <= -2.2e+44) {
    		tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
    	} else if (A <= 4.1e-16) {
    		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 <= -2.2e+44:
    		tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
    	elif A <= 4.1e-16:
    		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 <= -2.2e+44)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi));
    	elseif (A <= 4.1e-16)
    		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 <= -2.2e+44)
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / pi);
    	elseif (A <= 4.1e-16)
    		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, -2.2e+44], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.1e-16], 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 -2.2 \cdot 10^{+44}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq 4.1 \cdot 10^{-16}:\\
    \;\;\;\;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 < -2.19999999999999996e44

      1. Initial program 23.4%

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

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

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

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

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

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

      if -2.19999999999999996e44 < A < 4.10000000000000006e-16

      1. Initial program 55.7%

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

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

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

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

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

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

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

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

      if 4.10000000000000006e-16 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.2 \cdot 10^{+44}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.1 \cdot 10^{-16}:\\ \;\;\;\;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 11: 44.7% accurate, 3.6× speedup?

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

      1. Initial program 52.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-52.5%

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

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

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

      if -1.9e-168 < B < 2.1999999999999999e-97

      1. Initial program 47.5%

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

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

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

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

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

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

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

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

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

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

      if 2.1999999999999999e-97 < B

      1. Initial program 50.4%

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

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

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

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

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

    Alternative 12: 60.6% accurate, 3.6× speedup?

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

      1. Initial program 23.4%

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

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

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

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

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

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

      if -8.5999999999999996e42 < 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. associate--l-61.5%

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

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

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

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

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

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

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

    Alternative 13: 46.3% accurate, 3.7× speedup?

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

      1. Initial program 43.0%

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

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

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

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

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

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

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

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

      if 9.4999999999999995e38 < A

      1. Initial program 79.1%

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

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

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

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

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

    Alternative 14: 48.7% accurate, 3.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq 1.9 \cdot 10^{-29}:\\ \;\;\;\;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 1.9e-29)
       (* 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 <= 1.9e-29) {
    		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 <= 1.9e-29) {
    		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 <= 1.9e-29:
    		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 <= 1.9e-29)
    		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 <= 1.9e-29)
    		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, 1.9e-29], 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 1.9 \cdot 10^{-29}:\\
    \;\;\;\;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 2 regimes
    2. if A < 1.89999999999999988e-29

      1. Initial program 43.3%

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

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

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

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

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

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

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

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

      if 1.89999999999999988e-29 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq 1.9 \cdot 10^{-29}:\\ \;\;\;\;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 15: 39.7% 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 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. Step-by-step derivation
        1. associate--l-52.0%

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

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

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

      if -1.000000000000002e-309 < B

      1. Initial program 48.9%

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

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

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

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

      \[\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 16: 20.9% 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 50.5%

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
    6. Final simplification16.8%

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

    Reproduce

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