ABCF->ab-angle angle

Percentage Accurate: 54.4% → 82.6%
Time: 21.3s
Alternatives: 27
Speedup: 3.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 27 alternatives:

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

Initial Program: 54.4% 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.6% 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 := 180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-43}:\\ \;\;\;\;\frac{t\_1}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\pi}{t\_1}}\\ \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 (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B)))))
   (if (<= t_0 -5e-43)
     (/ t_1 PI)
     (if (<= t_0 0.0)
       (* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
       (/ 1.0 (/ PI 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 = 180.0 * atan((((C - A) - hypot((A - C), B)) / B));
	double tmp;
	if (t_0 <= -5e-43) {
		tmp = t_1 / ((double) M_PI);
	} else if (t_0 <= 0.0) {
		tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
	} else {
		tmp = 1.0 / (((double) M_PI) / 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 = 180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B));
	double tmp;
	if (t_0 <= -5e-43) {
		tmp = t_1 / Math.PI;
	} else if (t_0 <= 0.0) {
		tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
	} else {
		tmp = 1.0 / (Math.PI / 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 = 180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))
	tmp = 0
	if t_0 <= -5e-43:
		tmp = t_1 / math.pi
	elif t_0 <= 0.0:
		tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi)
	else:
		tmp = 1.0 / (math.pi / 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(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))
	tmp = 0.0
	if (t_0 <= -5e-43)
		tmp = Float64(t_1 / pi);
	elseif (t_0 <= 0.0)
		tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi));
	else
		tmp = Float64(1.0 / Float64(pi / 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 = 180.0 * atan((((C - A) - hypot((A - C), B)) / B));
	tmp = 0.0;
	if (t_0 <= -5e-43)
		tmp = t_1 / pi;
	elseif (t_0 <= 0.0)
		tmp = atan((0.5 * (B / A))) * (180.0 / pi);
	else
		tmp = 1.0 / (pi / 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[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-43], N[(t$95$1 / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(Pi / t$95$1), $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 := 180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-43}:\\
\;\;\;\;\frac{t\_1}{\pi}\\

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

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


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

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

    1. Initial program 14.9%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 56.1%

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

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

Alternative 2: 77.9% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

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

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

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

    if -5.7999999999999996e30 < A < 4.5999999999999996

    1. Initial program 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.5999999999999996 < A

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 77.9% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -1.15 \cdot 10^{+31}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq 6.8:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -1.15e+31)
   (* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
   (if (<= A 6.8)
     (/ (* 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.15e+31) {
		tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
	} else if (A <= 6.8) {
		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.15e+31) {
		tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
	} else if (A <= 6.8) {
		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.15e+31:
		tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi)
	elif A <= 6.8:
		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.15e+31)
		tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi));
	elseif (A <= 6.8)
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi);
	else
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(A + hypot(B, A)) / Float64(-B)))) / pi);
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (A <= -1.15e+31)
		tmp = atan((0.5 * (B / A))) * (180.0 / pi);
	elseif (A <= 6.8)
		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.15e+31], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.8], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e31 < A < 6.79999999999999982

    1. Initial program 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.79999999999999982 < A

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.9% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -3.7 \cdot 10^{+32}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq 3.1:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= A -3.7e+32)
   (* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
   (if (<= A 3.1)
     (/ (* 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 <= -3.7e+32) {
		tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
	} else if (A <= 3.1) {
		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 <= -3.7e+32) {
		tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
	} else if (A <= 3.1) {
		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 <= -3.7e+32:
		tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi)
	elif A <= 3.1:
		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 <= -3.7e+32)
		tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi));
	elseif (A <= 3.1)
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi);
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (A <= -3.7e+32)
		tmp = atan((0.5 * (B / A))) * (180.0 / pi);
	elseif (A <= 3.1)
		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, -3.7e+32], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.1], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -3.7 \cdot 10^{+32}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

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

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

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

    if -3.7e32 < A < 3.10000000000000009

    1. Initial program 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.10000000000000009 < A

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

Alternative 5: 75.4% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

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

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

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

    if -3.8000000000000003e32 < A < 6.5999999999999996

    1. Initial program 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.5999999999999996 < A

    1. Initial program 74.5%

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

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

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

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

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

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

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

Alternative 6: 75.4% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

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

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

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

    if -6.5e30 < A < 5.9000000000000004

    1. Initial program 54.8%

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

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

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

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

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

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

    if 5.9000000000000004 < A

    1. Initial program 74.5%

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

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

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

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

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

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

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

Alternative 7: 82.3% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 2.0000000000000001e148

    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. Add Preprocessing
    3. Applied egg-rr84.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)}}} \]

    if 2.0000000000000001e148 < C

    1. Initial program 6.3%

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

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

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

Alternative 8: 82.2% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 3.75000000000000023e152

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

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

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

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

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

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

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

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

    if 3.75000000000000023e152 < C

    1. Initial program 6.3%

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

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

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

Alternative 9: 80.9% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.95000000000000005e30 < A

    1. Initial program 61.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. Simplified87.5%

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

    Alternative 10: 65.0% accurate, 3.1× speedup?

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

      1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

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

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

      if -8.50000000000000052e-85 < B < -1.9999999999999999e-144

      1. Initial program 29.3%

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

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

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

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

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

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

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

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

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

      if -1.9999999999999999e-144 < B < 1.31999999999999996e-279

      1. Initial program 74.2%

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

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

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

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

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

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

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

      if 1.31999999999999996e-279 < B < 4.29999999999999988e-188

      1. Initial program 47.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.29999999999999988e-188 < 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. Add Preprocessing
      3. Taylor expanded in B around inf 74.6%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8.5 \cdot 10^{-85}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \left(1 + \left(-1 + \frac{C - A}{B}\right)\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq -2 \cdot 10^{-144}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A - A}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.32 \cdot 10^{-279}:\\ \;\;\;\;180 \cdot \left(\tan^{-1} \left(1 + \frac{C - A}{B}\right) \cdot \frac{1}{\pi}\right)\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{-188}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B + \frac{B \cdot C}{A}}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 65.0% accurate, 3.1× speedup?

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

      1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

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

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

      if -8.50000000000000052e-85 < B < -1.9999999999999999e-144

      1. Initial program 29.3%

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

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

      if -1.9999999999999999e-144 < B < 1.49999999999999987e-281

      1. Initial program 74.2%

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

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

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

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

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

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

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

      if 1.49999999999999987e-281 < B < 2.15e-187

      1. Initial program 47.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.15e-187 < 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. Add Preprocessing
      3. Taylor expanded in B around inf 74.6%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8.5 \cdot 10^{-85}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \left(1 + \left(-1 + \frac{C - A}{B}\right)\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq -2 \cdot 10^{-144}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A - A}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-281}:\\ \;\;\;\;180 \cdot \left(\tan^{-1} \left(1 + \frac{C - A}{B}\right) \cdot \frac{1}{\pi}\right)\\ \mathbf{elif}\;B \leq 2.15 \cdot 10^{-187}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B + \frac{B \cdot C}{A}}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 57.3% accurate, 3.2× speedup?

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

      1. Initial program 21.3%

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

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

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

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

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

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

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

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

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

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

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

      if -1.7500000000000001e-46 < A < -1.79999999999999996e-306 or 1.2000000000000001e-196 < A < 1.95000000000000013e-76

      1. Initial program 62.1%

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

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

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

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

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

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

      if -1.79999999999999996e-306 < A < 1.2000000000000001e-196

      1. Initial program 46.9%

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

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

      if 1.95000000000000013e-76 < A

      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. Add Preprocessing
      3. Taylor expanded in C around 0 67.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.75 \cdot 10^{-46}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq -1.8 \cdot 10^{-306}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-196}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 1.95 \cdot 10^{-76}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(1 + \frac{A}{B}\right)}{\pi} \cdot -180\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 56.7% accurate, 3.2× speedup?

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

      1. Initial program 21.3%

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

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

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

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

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

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

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

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

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

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

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

      if -2.3999999999999999e-47 < A < -1.4499999999999999e-306 or 4.10000000000000022e-199 < A < 3.7999999999999999e-93

      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. Add Preprocessing
      3. Taylor expanded in B around -inf 64.6%

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

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

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

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

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

      if -1.4499999999999999e-306 < A < 4.10000000000000022e-199

      1. Initial program 46.9%

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

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

      if 3.7999999999999999e-93 < A

      1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 14: 56.6% accurate, 3.2× speedup?

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

      1. Initial program 21.3%

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

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

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

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

      if -1.69999999999999998e-46 < A < -1.4499999999999999e-306 or 1.92000000000000001e-199 < A < 2.5999999999999998e-93

      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. Add Preprocessing
      3. Taylor expanded in B around -inf 64.6%

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

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

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

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

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

      if -1.4499999999999999e-306 < A < 1.92000000000000001e-199

      1. Initial program 46.9%

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

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

      if 2.5999999999999998e-93 < A

      1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.7 \cdot 10^{-46}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.45 \cdot 10^{-306}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.92 \cdot 10^{-199}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 2.6 \cdot 10^{-93}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 15: 47.5% accurate, 3.2× speedup?

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

      1. Initial program 48.4%

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

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

      if -5.6000000000000002e-83 < B < -1.30000000000000004e-148

      1. Initial program 28.0%

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

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

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

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

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

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

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

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

      if -1.30000000000000004e-148 < B < -2.40000000000000004e-210

      1. Initial program 68.4%

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

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

      if -2.40000000000000004e-210 < B < 1.1e-32

      1. Initial program 67.3%

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

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

      if 1.1e-32 < B

      1. Initial program 47.5%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.6 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.3 \cdot 10^{-148}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.4 \cdot 10^{-210}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 16: 66.0% accurate, 3.4× speedup?

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

      1. Initial program 52.7%

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\left(e^{\log \left(1 + \frac{C - A}{B}\right)} - 1\right)}\right)}{\pi} \]
        4. add-exp-log69.3%

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

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

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

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

      if 5.39999999999999967e-280 < B < 2.15e-187

      1. Initial program 47.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.15e-187 < 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. Add Preprocessing
      3. Taylor expanded in B around inf 74.6%

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

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

    Alternative 17: 66.0% accurate, 3.4× speedup?

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

      1. Initial program 52.7%

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\left(e^{\log \left(1 + \frac{C - A}{B}\right)} - 1\right)}\right)}{\pi} \]
        4. add-exp-log69.3%

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

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

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

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

      if 3.50000000000000022e-281 < B < 8.5000000000000004e-188

      1. Initial program 47.7%

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

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

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

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

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

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

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

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

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

      if 8.5000000000000004e-188 < 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. Add Preprocessing
      3. Taylor expanded in B around inf 74.6%

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

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

    Alternative 18: 66.1% accurate, 3.4× speedup?

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

      1. Initial program 52.7%

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

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

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

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

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

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

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

      if 2.15e-278 < B < 5.6000000000000002e-188

      1. Initial program 47.7%

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

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

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

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

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

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

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

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

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

      if 5.6000000000000002e-188 < 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. Add Preprocessing
      3. Taylor expanded in B around inf 74.6%

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

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

    Alternative 19: 51.6% accurate, 3.4× speedup?

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

      1. Initial program 52.6%

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

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

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

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

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

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

      if 2.90000000000000014e-211 < B < 1.05999999999999996e-150

      1. Initial program 60.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.05999999999999996e-150 < B < 1.30000000000000005e-26

      1. Initial program 68.2%

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

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

      if 1.30000000000000005e-26 < B

      1. Initial program 47.5%

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

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

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

    Alternative 20: 46.6% accurate, 3.4× speedup?

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

      1. Initial program 48.4%

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

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

      if -8.50000000000000052e-85 < B < -1.15e-146

      1. Initial program 28.0%

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

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

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

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

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

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

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

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

      if -1.15e-146 < B < 4.6000000000000001e-134

      1. Initial program 65.6%

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

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

      if 4.6000000000000001e-134 < B

      1. Initial program 52.4%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8.5 \cdot 10^{-85}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.15 \cdot 10^{-146}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.6 \cdot 10^{-134}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 21: 46.6% accurate, 3.4× speedup?

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

      1. Initial program 48.4%

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

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

      if -2.0999999999999999e-83 < B < -1.01999999999999993e-145

      1. Initial program 28.0%

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

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

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

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

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

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

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

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

      if -1.01999999999999993e-145 < B < 4.80000000000000019e-134

      1. Initial program 65.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.80000000000000019e-134 < B

      1. Initial program 52.4%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.1 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.02 \cdot 10^{-145}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-134}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 22: 66.5% accurate, 3.6× speedup?

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

      1. Initial program 52.6%

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

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

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

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

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

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

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

      if 4.9999999999999999e-150 < B

      1. Initial program 52.8%

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

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

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

    Alternative 23: 62.9% accurate, 3.6× speedup?

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

      1. Initial program 54.8%

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

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

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

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

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

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

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

      if 3.5e-34 < B

      1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 24: 45.2% accurate, 3.6× speedup?

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

      1. Initial program 48.4%

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

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

      if -4.80000000000000017e-82 < B < 5.79999999999999968e-145

      1. Initial program 57.3%

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

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

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

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

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

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

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

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

      if 5.79999999999999968e-145 < B

      1. Initial program 52.8%

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

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

    Alternative 25: 62.9% accurate, 3.6× speedup?

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

      1. Initial program 55.1%

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

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

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

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

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

      if 1.5e-37 < B

      1. Initial program 47.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 26: 40.1% accurate, 3.8× speedup?

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

      1. Initial program 51.6%

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

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

      if -1.999999999999994e-310 < B

      1. Initial program 53.8%

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

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

    Alternative 27: 21.7% accurate, 4.0× speedup?

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

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

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

    Reproduce

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