ABCF->ab-angle angle

Percentage Accurate: 53.6% → 82.4%
Time: 17.3s
Alternatives: 18
Speedup: 2.4×

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

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

Initial Program: 53.6% accurate, 1.0× speedup?

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

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

Alternative 1: 82.4% 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)\\ t_1 := \left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\\ \mathbf{if}\;t_0 \leq -0.05:\\ \;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(\frac{t_1}{B}\right)}}\\ \mathbf{elif}\;t_0 \leq 0:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{1}{B} \cdot t_1\right)}}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0
         (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
        (t_1 (- (- C A) (hypot (- A C) B))))
   (if (<= t_0 -0.05)
     (* 180.0 (/ 1.0 (/ PI (atan (/ t_1 B)))))
     (if (<= t_0 0.0)
       (* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
       (/ 180.0 (/ PI (atan (* (/ 1.0 B) t_1))))))))
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 t_1 = (C - A) - hypot((A - C), B);
	double tmp;
	if (t_0 <= -0.05) {
		tmp = 180.0 * (1.0 / (((double) M_PI) / atan((t_1 / B))));
	} else if (t_0 <= 0.0) {
		tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
	} else {
		tmp = 180.0 / (((double) M_PI) / atan(((1.0 / B) * t_1)));
	}
	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 t_1 = (C - A) - Math.hypot((A - C), B);
	double tmp;
	if (t_0 <= -0.05) {
		tmp = 180.0 * (1.0 / (Math.PI / Math.atan((t_1 / B))));
	} else if (t_0 <= 0.0) {
		tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
	} else {
		tmp = 180.0 / (Math.PI / Math.atan(((1.0 / B) * t_1)));
	}
	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))))
	t_1 = (C - A) - math.hypot((A - C), B)
	tmp = 0
	if t_0 <= -0.05:
		tmp = 180.0 * (1.0 / (math.pi / math.atan((t_1 / B))))
	elif t_0 <= 0.0:
		tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A)))
	else:
		tmp = 180.0 / (math.pi / math.atan(((1.0 / B) * t_1)))
	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)))))
	t_1 = Float64(Float64(C - A) - hypot(Float64(A - C), B))
	tmp = 0.0
	if (t_0 <= -0.05)
		tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(t_1 / B)))));
	elseif (t_0 <= 0.0)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A))));
	else
		tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(1.0 / B) * t_1))));
	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))));
	t_1 = (C - A) - hypot((A - C), B);
	tmp = 0.0;
	if (t_0 <= -0.05)
		tmp = 180.0 * (1.0 / (pi / atan((t_1 / B))));
	elseif (t_0 <= 0.0)
		tmp = (180.0 / pi) * atan((0.5 * (B / A)));
	else
		tmp = 180.0 / (pi / atan(((1.0 / B) * t_1)));
	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]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -0.05], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(t$95$1 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.050000000000000003

    1. Initial program 64.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. Applied egg-rr86.1%

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

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

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

    if -0.050000000000000003 < (*.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 14.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. Applied egg-rr14.7%

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0.5 \cdot \frac{{B}^{2}}{A}}{B}\right)}}\right)\right)} \]
      2. expm1-udef14.3%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0.5 \cdot \frac{{B}^{2}}{A}}{B}\right)}}\right)} - 1} \]
      3. associate-/r/14.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5 \cdot \frac{{B}^{2}}{A}}{B}\right)}\right)} - 1 \]
      4. *-un-lft-identity14.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5 \cdot \frac{{B}^{2}}{A}}{\color{blue}{1 \cdot B}}\right)\right)} - 1 \]
      5. times-frac14.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{0.5}{1} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)}\right)} - 1 \]
      6. metadata-eval14.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(\color{blue}{0.5} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1 \]
    5. Applied egg-rr14.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def45.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)\right)} \]
      2. expm1-log1p45.8%

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

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

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

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

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

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

    if -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 67.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. Applied egg-rr90.9%

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

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

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

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

Alternative 2: 77.5% accurate, 1.6× speedup?

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

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

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

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


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

    1. Initial program 24.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. Applied egg-rr46.7%

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

      \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\color{blue}{0.5 \cdot \frac{{B}^{2}}{A}}}{B}\right)}} \]
    4. Step-by-step derivation
      1. expm1-log1p-u54.3%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0.5 \cdot \frac{{B}^{2}}{A}}{B}\right)}}\right)} - 1} \]
      3. associate-/r/23.2%

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{0.5}{1} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)}\right)} - 1 \]
      6. metadata-eval23.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(\color{blue}{0.5} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1 \]
    5. Applied egg-rr23.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def54.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)\right)} \]
      2. expm1-log1p57.0%

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

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

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

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

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

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

    if -2.6999999999999999e23 < A < 7.0000000000000001e-67

    1. Initial program 62.8%

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

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

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

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

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

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

    if 7.0000000000000001e-67 < A

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 80.3% accurate, 1.6× speedup?

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

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

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


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

    1. Initial program 24.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. Applied egg-rr46.7%

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

      \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\color{blue}{0.5 \cdot \frac{{B}^{2}}{A}}}{B}\right)}} \]
    4. Step-by-step derivation
      1. expm1-log1p-u54.3%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0.5 \cdot \frac{{B}^{2}}{A}}{B}\right)}}\right)} - 1} \]
      3. associate-/r/23.2%

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{0.5}{1} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)}\right)} - 1 \]
      6. metadata-eval23.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(\color{blue}{0.5} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1 \]
    5. Applied egg-rr23.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def54.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)\right)} \]
      2. expm1-log1p57.0%

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

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

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

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

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

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

    if -8.6000000000000004e22 < A

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -8.6 \cdot 10^{+22}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \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} \]

    Alternative 4: 80.3% accurate, 1.6× speedup?

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

      1. Initial program 24.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. Applied egg-rr46.7%

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\color{blue}{0.5 \cdot \frac{{B}^{2}}{A}}}{B}\right)}} \]
      4. Step-by-step derivation
        1. expm1-log1p-u54.3%

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

          \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0.5 \cdot \frac{{B}^{2}}{A}}{B}\right)}}\right)} - 1} \]
        3. associate-/r/23.2%

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

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

          \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{0.5}{1} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)}\right)} - 1 \]
        6. metadata-eval23.2%

          \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(\color{blue}{0.5} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1 \]
      5. Applied egg-rr23.2%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1} \]
      6. Step-by-step derivation
        1. expm1-def54.3%

          \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)\right)} \]
        2. expm1-log1p57.0%

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

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

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

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

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

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

      if -4.9000000000000003e23 < A

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.9 \cdot 10^{+23}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\ \end{array} \]

    Alternative 5: 77.5% accurate, 1.6× speedup?

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

      1. Initial program 24.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. Applied egg-rr46.7%

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\color{blue}{0.5 \cdot \frac{{B}^{2}}{A}}}{B}\right)}} \]
      4. Step-by-step derivation
        1. expm1-log1p-u54.3%

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

          \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0.5 \cdot \frac{{B}^{2}}{A}}{B}\right)}}\right)} - 1} \]
        3. associate-/r/23.2%

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

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

          \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{0.5}{1} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)}\right)} - 1 \]
        6. metadata-eval23.2%

          \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(\color{blue}{0.5} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1 \]
      5. Applied egg-rr23.2%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1} \]
      6. Step-by-step derivation
        1. expm1-def54.3%

          \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)\right)} \]
        2. expm1-log1p57.0%

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

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

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

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

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

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

      if -1.3199999999999999e23 < A < 1.99999999999999989e-67

      1. Initial program 62.8%

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

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

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

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

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

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

      if 1.99999999999999989e-67 < A

      1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.32 \cdot 10^{+23}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq 2 \cdot 10^{-67}:\\ \;\;\;\;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} \]

    Alternative 6: 77.5% accurate, 1.6× speedup?

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

      1. Initial program 24.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. Applied egg-rr46.7%

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\color{blue}{0.5 \cdot \frac{{B}^{2}}{A}}}{B}\right)}} \]
      4. Step-by-step derivation
        1. expm1-log1p-u54.3%

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

          \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0.5 \cdot \frac{{B}^{2}}{A}}{B}\right)}}\right)} - 1} \]
        3. associate-/r/23.2%

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

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

          \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{0.5}{1} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)}\right)} - 1 \]
        6. metadata-eval23.2%

          \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(\color{blue}{0.5} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1 \]
      5. Applied egg-rr23.2%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1} \]
      6. Step-by-step derivation
        1. expm1-def54.3%

          \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)\right)} \]
        2. expm1-log1p57.0%

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

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

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

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

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

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

      if -5.8e21 < A < 2.4999999999999999e-67

      1. Initial program 62.8%

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

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

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

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

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

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

      if 2.4999999999999999e-67 < A

      1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.8 \cdot 10^{+21}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq 2.5 \cdot 10^{-67}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}}\\ \end{array} \]

    Alternative 7: 74.1% accurate, 1.7× speedup?

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

      1. Initial program 24.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. Applied egg-rr46.7%

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

        \[\leadsto \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\color{blue}{0.5 \cdot \frac{{B}^{2}}{A}}}{B}\right)}} \]
      4. Step-by-step derivation
        1. expm1-log1p-u54.3%

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

          \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0.5 \cdot \frac{{B}^{2}}{A}}{B}\right)}}\right)} - 1} \]
        3. associate-/r/23.2%

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

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

          \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \color{blue}{\left(\frac{0.5}{1} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)}\right)} - 1 \]
        6. metadata-eval23.2%

          \[\leadsto e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(\color{blue}{0.5} \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1 \]
      5. Applied egg-rr23.2%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)} - 1} \]
      6. Step-by-step derivation
        1. expm1-def54.3%

          \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{\frac{{B}^{2}}{A}}{B}\right)\right)\right)} \]
        2. expm1-log1p57.0%

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

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

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

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

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

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

      if -5.3000000000000001e23 < A < 8.5999999999999998e-72

      1. Initial program 61.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. Taylor expanded in A around 0 60.4%

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

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

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

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

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

      if 8.5999999999999998e-72 < A

      1. Initial program 76.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. Simplified94.0%

          \[\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. Taylor expanded in B around inf 79.9%

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.3 \cdot 10^{+23}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq 8.6 \cdot 10^{-72}:\\ \;\;\;\;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{C - \left(B + A\right)}{B}\right)}{\pi}\\ \end{array} \]

      Alternative 8: 48.6% accurate, 2.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -6 \cdot 10^{-145}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.8 \cdot 10^{-252}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 10^{-144}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.15 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\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 -6e-145)
         (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
         (if (<= A 1.8e-252)
           (* 180.0 (/ (atan (/ C B)) PI))
           (if (<= A 1e-144)
             (* 180.0 (/ (atan 1.0) PI))
             (if (<= A 1.15e-61)
               (* 180.0 (/ (atan -1.0) PI))
               (* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))))
      double code(double A, double B, double C) {
      	double tmp;
      	if (A <= -6e-145) {
      		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
      	} else if (A <= 1.8e-252) {
      		tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
      	} else if (A <= 1e-144) {
      		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
      	} else if (A <= 1.15e-61) {
      		tmp = 180.0 * (atan(-1.0) / ((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 <= -6e-145) {
      		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
      	} else if (A <= 1.8e-252) {
      		tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
      	} else if (A <= 1e-144) {
      		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
      	} else if (A <= 1.15e-61) {
      		tmp = 180.0 * (Math.atan(-1.0) / 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 <= -6e-145:
      		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
      	elif A <= 1.8e-252:
      		tmp = 180.0 * (math.atan((C / B)) / math.pi)
      	elif A <= 1e-144:
      		tmp = 180.0 * (math.atan(1.0) / math.pi)
      	elif A <= 1.15e-61:
      		tmp = 180.0 * (math.atan(-1.0) / 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 <= -6e-145)
      		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
      	elseif (A <= 1.8e-252)
      		tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi));
      	elseif (A <= 1e-144)
      		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
      	elseif (A <= 1.15e-61)
      		tmp = Float64(180.0 * Float64(atan(-1.0) / 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 <= -6e-145)
      		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
      	elseif (A <= 1.8e-252)
      		tmp = 180.0 * (atan((C / B)) / pi);
      	elseif (A <= 1e-144)
      		tmp = 180.0 * (atan(1.0) / pi);
      	elseif (A <= 1.15e-61)
      		tmp = 180.0 * (atan(-1.0) / pi);
      	else
      		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := If[LessEqual[A, -6e-145], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.8e-252], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1e-144], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.15e-61], N[(180.0 * N[(N[ArcTan[-1.0], $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 -6 \cdot 10^{-145}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
      
      \mathbf{elif}\;A \leq 1.8 \cdot 10^{-252}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
      
      \mathbf{elif}\;A \leq 10^{-144}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
      
      \mathbf{elif}\;A \leq 1.15 \cdot 10^{-61}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\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 5 regimes
      2. if A < -5.99999999999999985e-145

        1. Initial program 31.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. Taylor expanded in A around -inf 62.2%

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

        if -5.99999999999999985e-145 < A < 1.80000000000000011e-252

        1. Initial program 68.5%

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

            \[\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. Step-by-step derivation
            1. add-sqr-sqrt80.5%

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

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

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

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

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

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

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

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

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

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

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

          if 1.80000000000000011e-252 < A < 9.9999999999999995e-145

          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. Taylor expanded in B around -inf 44.9%

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

          if 9.9999999999999995e-145 < A < 1.14999999999999996e-61

          1. Initial program 76.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. Taylor expanded in B around inf 54.8%

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

          if 1.14999999999999996e-61 < A

          1. Initial program 75.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. Taylor expanded in A around inf 67.4%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -6 \cdot 10^{-145}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.8 \cdot 10^{-252}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 10^{-144}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.15 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \]

        Alternative 9: 48.6% accurate, 2.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -6.8 \cdot 10^{-145}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-249}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.22 \cdot 10^{-141}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.25 \cdot 10^{-54}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\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 -6.8e-145)
           (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
           (if (<= A 1.2e-249)
             (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
             (if (<= A 1.22e-141)
               (* 180.0 (/ (atan 1.0) PI))
               (if (<= A 1.25e-54)
                 (* 180.0 (/ (atan -1.0) PI))
                 (* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))))
        double code(double A, double B, double C) {
        	double tmp;
        	if (A <= -6.8e-145) {
        		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
        	} else if (A <= 1.2e-249) {
        		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
        	} else if (A <= 1.22e-141) {
        		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
        	} else if (A <= 1.25e-54) {
        		tmp = 180.0 * (atan(-1.0) / ((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 <= -6.8e-145) {
        		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
        	} else if (A <= 1.2e-249) {
        		tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
        	} else if (A <= 1.22e-141) {
        		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
        	} else if (A <= 1.25e-54) {
        		tmp = 180.0 * (Math.atan(-1.0) / 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 <= -6.8e-145:
        		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
        	elif A <= 1.2e-249:
        		tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
        	elif A <= 1.22e-141:
        		tmp = 180.0 * (math.atan(1.0) / math.pi)
        	elif A <= 1.25e-54:
        		tmp = 180.0 * (math.atan(-1.0) / 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 <= -6.8e-145)
        		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
        	elseif (A <= 1.2e-249)
        		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
        	elseif (A <= 1.22e-141)
        		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
        	elseif (A <= 1.25e-54)
        		tmp = Float64(180.0 * Float64(atan(-1.0) / 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 <= -6.8e-145)
        		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
        	elseif (A <= 1.2e-249)
        		tmp = 180.0 * (atan((2.0 * (C / B))) / pi);
        	elseif (A <= 1.22e-141)
        		tmp = 180.0 * (atan(1.0) / pi);
        	elseif (A <= 1.25e-54)
        		tmp = 180.0 * (atan(-1.0) / pi);
        	else
        		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
        	end
        	tmp_2 = tmp;
        end
        
        code[A_, B_, C_] := If[LessEqual[A, -6.8e-145], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.2e-249], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.22e-141], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.25e-54], N[(180.0 * N[(N[ArcTan[-1.0], $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 -6.8 \cdot 10^{-145}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
        
        \mathbf{elif}\;A \leq 1.2 \cdot 10^{-249}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
        
        \mathbf{elif}\;A \leq 1.22 \cdot 10^{-141}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
        
        \mathbf{elif}\;A \leq 1.25 \cdot 10^{-54}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\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 5 regimes
        2. if A < -6.7999999999999998e-145

          1. Initial program 31.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. Taylor expanded in A around -inf 62.2%

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

          if -6.7999999999999998e-145 < A < 1.20000000000000006e-249

          1. Initial program 68.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. Taylor expanded in C around -inf 49.4%

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

          if 1.20000000000000006e-249 < A < 1.22e-141

          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. Taylor expanded in B around -inf 44.9%

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

          if 1.22e-141 < A < 1.25000000000000004e-54

          1. Initial program 76.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. Taylor expanded in B around inf 54.8%

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

          if 1.25000000000000004e-54 < A

          1. Initial program 75.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. Taylor expanded in A around inf 67.4%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -6.8 \cdot 10^{-145}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-249}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.22 \cdot 10^{-141}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.25 \cdot 10^{-54}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \]

        Alternative 10: 59.1% accurate, 2.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -3.3 \cdot 10^{-143}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-231} \lor \neg \left(A \leq 1.45 \cdot 10^{-169}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \end{array} \end{array} \]
        (FPCore (A B C)
         :precision binary64
         (if (<= A -3.3e-143)
           (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
           (if (or (<= A 3.9e-231) (not (<= A 1.45e-169)))
             (* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))
             (* 180.0 (/ (atan 1.0) PI)))))
        double code(double A, double B, double C) {
        	double tmp;
        	if (A <= -3.3e-143) {
        		tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
        	} else if ((A <= 3.9e-231) || !(A <= 1.45e-169)) {
        		tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
        	} else {
        		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
        	}
        	return tmp;
        }
        
        public static double code(double A, double B, double C) {
        	double tmp;
        	if (A <= -3.3e-143) {
        		tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
        	} else if ((A <= 3.9e-231) || !(A <= 1.45e-169)) {
        		tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
        	} else {
        		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
        	}
        	return tmp;
        }
        
        def code(A, B, C):
        	tmp = 0
        	if A <= -3.3e-143:
        		tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi
        	elif (A <= 3.9e-231) or not (A <= 1.45e-169):
        		tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi)
        	else:
        		tmp = 180.0 * (math.atan(1.0) / math.pi)
        	return tmp
        
        function code(A, B, C)
        	tmp = 0.0
        	if (A <= -3.3e-143)
        		tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi);
        	elseif ((A <= 3.9e-231) || !(A <= 1.45e-169))
        		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / 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 (A <= -3.3e-143)
        		tmp = (180.0 * atan((0.5 * (B / A)))) / pi;
        	elseif ((A <= 3.9e-231) || ~((A <= 1.45e-169)))
        		tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi);
        	else
        		tmp = 180.0 * (atan(1.0) / pi);
        	end
        	tmp_2 = tmp;
        end
        
        code[A_, B_, C_] := If[LessEqual[A, -3.3e-143], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[A, 3.9e-231], N[Not[LessEqual[A, 1.45e-169]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / 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}\;A \leq -3.3 \cdot 10^{-143}:\\
        \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
        
        \mathbf{elif}\;A \leq 3.9 \cdot 10^{-231} \lor \neg \left(A \leq 1.45 \cdot 10^{-169}\right):\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{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 A < -3.3000000000000001e-143

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

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

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

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

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

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

          if -3.3000000000000001e-143 < A < 3.8999999999999998e-231 or 1.4500000000000001e-169 < A

          1. Initial program 73.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. Simplified90.8%

              \[\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. Taylor expanded in B around inf 71.2%

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

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

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

            if 3.8999999999999998e-231 < A < 1.4500000000000001e-169

            1. Initial program 49.3%

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.3 \cdot 10^{-143}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-231} \lor \neg \left(A \leq 1.45 \cdot 10^{-169}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \end{array} \]

          Alternative 11: 53.0% accurate, 2.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -9.2 \cdot 10^{-145}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.5 \cdot 10^{-250}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.25 \cdot 10^{-169}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\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 -9.2e-145)
             (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
             (if (<= A 2.5e-250)
               (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
               (if (<= A 2.25e-169)
                 (* 180.0 (/ (atan 1.0) PI))
                 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))))
          double code(double A, double B, double C) {
          	double tmp;
          	if (A <= -9.2e-145) {
          		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
          	} else if (A <= 2.5e-250) {
          		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
          	} else if (A <= 2.25e-169) {
          		tmp = 180.0 * (atan(1.0) / ((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 <= -9.2e-145) {
          		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
          	} else if (A <= 2.5e-250) {
          		tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
          	} else if (A <= 2.25e-169) {
          		tmp = 180.0 * (Math.atan(1.0) / 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 <= -9.2e-145:
          		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
          	elif A <= 2.5e-250:
          		tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
          	elif A <= 2.25e-169:
          		tmp = 180.0 * (math.atan(1.0) / 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 <= -9.2e-145)
          		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
          	elseif (A <= 2.5e-250)
          		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
          	elseif (A <= 2.25e-169)
          		tmp = Float64(180.0 * Float64(atan(1.0) / 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 <= -9.2e-145)
          		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
          	elseif (A <= 2.5e-250)
          		tmp = 180.0 * (atan((2.0 * (C / B))) / pi);
          	elseif (A <= 2.25e-169)
          		tmp = 180.0 * (atan(1.0) / pi);
          	else
          		tmp = 180.0 * (atan((-1.0 - (A / B))) / pi);
          	end
          	tmp_2 = tmp;
          end
          
          code[A_, B_, C_] := If[LessEqual[A, -9.2e-145], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.5e-250], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.25e-169], N[(180.0 * N[(N[ArcTan[1.0], $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 -9.2 \cdot 10^{-145}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
          
          \mathbf{elif}\;A \leq 2.5 \cdot 10^{-250}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
          
          \mathbf{elif}\;A \leq 2.25 \cdot 10^{-169}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if A < -9.20000000000000028e-145

            1. Initial program 31.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. Taylor expanded in A around -inf 62.2%

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

            if -9.20000000000000028e-145 < A < 2.50000000000000013e-250

            1. Initial program 68.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. Taylor expanded in C around -inf 49.4%

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

            if 2.50000000000000013e-250 < A < 2.2499999999999999e-169

            1. Initial program 53.4%

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

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

            if 2.2499999999999999e-169 < A

            1. Initial program 75.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. Taylor expanded in C around 0 68.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -9.2 \cdot 10^{-145}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.5 \cdot 10^{-250}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.25 \cdot 10^{-169}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

          Alternative 12: 53.6% accurate, 2.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -5.9 \cdot 10^{-145}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.85 \cdot 10^{-253}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-161}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{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 -5.9e-145)
             (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
             (if (<= A 1.85e-253)
               (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
               (if (<= A 1.2e-161)
                 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
                 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))))
          double code(double A, double B, double C) {
          	double tmp;
          	if (A <= -5.9e-145) {
          		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
          	} else if (A <= 1.85e-253) {
          		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
          	} else if (A <= 1.2e-161) {
          		tmp = 180.0 * (atan((1.0 - (A / 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 <= -5.9e-145) {
          		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
          	} else if (A <= 1.85e-253) {
          		tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
          	} else if (A <= 1.2e-161) {
          		tmp = 180.0 * (Math.atan((1.0 - (A / 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 <= -5.9e-145:
          		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
          	elif A <= 1.85e-253:
          		tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
          	elif A <= 1.2e-161:
          		tmp = 180.0 * (math.atan((1.0 - (A / 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 <= -5.9e-145)
          		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
          	elseif (A <= 1.85e-253)
          		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
          	elseif (A <= 1.2e-161)
          		tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / 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 <= -5.9e-145)
          		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
          	elseif (A <= 1.85e-253)
          		tmp = 180.0 * (atan((2.0 * (C / B))) / pi);
          	elseif (A <= 1.2e-161)
          		tmp = 180.0 * (atan((1.0 - (A / B))) / pi);
          	else
          		tmp = 180.0 * (atan((-1.0 - (A / B))) / pi);
          	end
          	tmp_2 = tmp;
          end
          
          code[A_, B_, C_] := If[LessEqual[A, -5.9e-145], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.85e-253], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.2e-161], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / 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 -5.9 \cdot 10^{-145}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
          
          \mathbf{elif}\;A \leq 1.85 \cdot 10^{-253}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
          
          \mathbf{elif}\;A \leq 1.2 \cdot 10^{-161}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{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 4 regimes
          2. if A < -5.8999999999999998e-145

            1. Initial program 31.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. Taylor expanded in A around -inf 62.2%

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

            if -5.8999999999999998e-145 < A < 1.84999999999999988e-253

            1. Initial program 68.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. Taylor expanded in C around -inf 49.4%

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

            if 1.84999999999999988e-253 < A < 1.19999999999999999e-161

            1. Initial program 58.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. Taylor expanded in C around 0 46.1%

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.19999999999999999e-161 < A

            1. Initial program 75.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. Taylor expanded in C around 0 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.9 \cdot 10^{-145}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.85 \cdot 10^{-253}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-161}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

          Alternative 13: 53.5% accurate, 2.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -7.2 \cdot 10^{-145}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.7 \cdot 10^{-252}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-157}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{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 -7.2e-145)
             (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
             (if (<= A 2.7e-252)
               (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
               (if (<= A 1.2e-157)
                 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
                 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))))
          double code(double A, double B, double C) {
          	double tmp;
          	if (A <= -7.2e-145) {
          		tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
          	} else if (A <= 2.7e-252) {
          		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
          	} else if (A <= 1.2e-157) {
          		tmp = 180.0 * (atan((1.0 - (A / 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 <= -7.2e-145) {
          		tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
          	} else if (A <= 2.7e-252) {
          		tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
          	} else if (A <= 1.2e-157) {
          		tmp = 180.0 * (Math.atan((1.0 - (A / 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 <= -7.2e-145:
          		tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi
          	elif A <= 2.7e-252:
          		tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
          	elif A <= 1.2e-157:
          		tmp = 180.0 * (math.atan((1.0 - (A / 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 <= -7.2e-145)
          		tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi);
          	elseif (A <= 2.7e-252)
          		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
          	elseif (A <= 1.2e-157)
          		tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / 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 <= -7.2e-145)
          		tmp = (180.0 * atan((0.5 * (B / A)))) / pi;
          	elseif (A <= 2.7e-252)
          		tmp = 180.0 * (atan((2.0 * (C / B))) / pi);
          	elseif (A <= 1.2e-157)
          		tmp = 180.0 * (atan((1.0 - (A / B))) / pi);
          	else
          		tmp = 180.0 * (atan((-1.0 - (A / B))) / pi);
          	end
          	tmp_2 = tmp;
          end
          
          code[A_, B_, C_] := If[LessEqual[A, -7.2e-145], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 2.7e-252], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.2e-157], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / 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 -7.2 \cdot 10^{-145}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
          
          \mathbf{elif}\;A \leq 2.7 \cdot 10^{-252}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
          
          \mathbf{elif}\;A \leq 1.2 \cdot 10^{-157}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{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 4 regimes
          2. if A < -7.2000000000000001e-145

            1. Initial program 31.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. Applied egg-rr53.0%

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

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

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

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

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

            if -7.2000000000000001e-145 < A < 2.69999999999999981e-252

            1. Initial program 68.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. Taylor expanded in C around -inf 49.4%

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

            if 2.69999999999999981e-252 < A < 1.2e-157

            1. Initial program 58.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. Taylor expanded in C around 0 46.1%

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.2e-157 < A

            1. Initial program 75.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. Taylor expanded in C around 0 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7.2 \cdot 10^{-145}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.7 \cdot 10^{-252}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-157}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]

          Alternative 14: 63.3% accurate, 2.4× speedup?

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

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

                \[\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. Taylor expanded in B around -inf 67.5%

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

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

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

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

              if 1.40000000000000011e-103 < B < 2.3e6

              1. Initial program 38.8%

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

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

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

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

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

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

              if 2.3e6 < B

              1. Initial program 58.2%

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

                  \[\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. Taylor expanded in B around inf 80.7%

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.4 \cdot 10^{-103}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2300000:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\ \end{array} \]

              Alternative 15: 46.8% accurate, 2.5× speedup?

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

                1. Initial program 58.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. Taylor expanded in B around -inf 58.9%

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

                if -6.19999999999999976e-81 < B < 1.6000000000000001e-61

                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. Simplified66.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. Step-by-step derivation
                    1. add-sqr-sqrt60.9%

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

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

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

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

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

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

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

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

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

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

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

                  if 1.6000000000000001e-61 < B

                  1. Initial program 53.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. Taylor expanded in B around inf 54.2%

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.2 \cdot 10^{-81}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

                Alternative 16: 43.8% accurate, 2.5× speedup?

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

                  1. Initial program 62.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. Taylor expanded in B around -inf 53.4%

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

                  if -1.0999999999999999e-130 < B < 7.19999999999999988e-226

                  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. Applied egg-rr74.5%

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

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

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

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

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

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

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

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

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

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

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

                  if 7.19999999999999988e-226 < B

                  1. Initial program 56.5%

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.1 \cdot 10^{-130}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-226}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

                Alternative 17: 40.1% accurate, 2.5× speedup?

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

                  1. Initial program 59.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. Taylor expanded in B around -inf 40.6%

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

                  if -4.999999999999985e-310 < B

                  1. Initial program 57.2%

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

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

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

                Alternative 18: 20.6% accurate, 2.5× 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 58.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. Taylor expanded in B around inf 20.1%

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

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

                Reproduce

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