ABCF->ab-angle angle

Percentage Accurate: 53.7% → 81.5%
Time: 16.3s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 53.7% accurate, 1.0× speedup?

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

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

Alternative 1: 81.5% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 10.1%

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

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

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

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

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

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

    if -2.7000000000000002e143 < A

    1. Initial program 63.6%

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

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

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

Alternative 2: 77.5% accurate, 1.9× speedup?

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

\mathbf{elif}\;A \leq 1.3 \cdot 10^{-134}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\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 < -1.60000000000000008e143

    1. Initial program 10.1%

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

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

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

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

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

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

    if -1.60000000000000008e143 < A < 1.30000000000000011e-134

    1. Initial program 56.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/56.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}} \]
    4. Applied egg-rr77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.30000000000000011e-134 < A

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 81.5% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 10.1%

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

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

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

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

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

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

    if -3.6999999999999997e144 < A

    1. Initial program 63.6%

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

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

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

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

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

Alternative 4: 77.5% accurate, 1.9× speedup?

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

\mathbf{elif}\;A \leq 1.45 \cdot 10^{-134}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\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 < -5.4000000000000003e143

    1. Initial program 10.1%

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

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

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

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

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

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

    if -5.4000000000000003e143 < A < 1.44999999999999997e-134

    1. Initial program 56.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/56.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}} \]
    4. Applied egg-rr77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.44999999999999997e-134 < A

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 77.5% accurate, 1.9× speedup?

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

\mathbf{elif}\;A \leq 1.06 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\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 < -3.4500000000000002e149

    1. Initial program 10.1%

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

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

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

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

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

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

    if -3.4500000000000002e149 < A < 1.06e-134

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

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

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

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

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

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

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

    if 1.06e-134 < A

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 75.2% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 10.1%

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

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

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

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

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

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

    if -6.40000000000000033e143 < A < 4.8e22

    1. Initial program 59.1%

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

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

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

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

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

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

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

    if 4.8e22 < A

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 81.5% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 10.1%

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

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

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

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

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

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

    if -6.0000000000000001e143 < A

    1. Initial program 63.6%

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

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

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

Alternative 8: 81.5% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 10.1%

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

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

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

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

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

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

    if -8.99999999999999965e149 < A

    1. Initial program 63.6%

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

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

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

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

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

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

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

      \[\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
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 9: 80.8% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 10.1%

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

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

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

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

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

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

    if -1.51999999999999996e143 < A

    1. Initial program 63.6%

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

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

    Alternative 10: 65.1% accurate, 3.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.60000000000000011e-188 < B < 4.70000000000000037e-285

      1. Initial program 48.5%

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

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

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

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

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

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

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

      if 4.70000000000000037e-285 < B

      1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 11: 65.3% accurate, 3.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -7.1000000000000003e-189 < B < 2.39999999999999993e-286

      1. Initial program 48.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. *-commutative48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.39999999999999993e-286 < B

      1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 46.5% accurate, 3.4× speedup?

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

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

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

      if -1.32000000000000005e-45 < B < -6.5000000000000004e-193

      1. Initial program 60.4%

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

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

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

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

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

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

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

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

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

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

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

      if -6.5000000000000004e-193 < B < 4.2999999999999999e-75

      1. Initial program 57.6%

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

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

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

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

      if 4.2999999999999999e-75 < B

      1. Initial program 50.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 67.1%

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

    Alternative 13: 64.5% accurate, 3.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.8e-189 < B < 4.00000000000000024e-295

      1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.00000000000000024e-295 < B

      1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 14: 46.0% accurate, 3.5× speedup?

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

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

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

      if -1.2199999999999999e-108 < B < 1.3499999999999999e-75

      1. Initial program 56.8%

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

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

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

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

      if 1.3499999999999999e-75 < B

      1. Initial program 50.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 67.1%

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

    Alternative 15: 59.9% accurate, 3.6× speedup?

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

      1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.3999999999999998e-58 < B

      1. Initial program 49.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 67.8%

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

    Alternative 16: 59.9% accurate, 3.6× speedup?

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

      1. Initial program 57.6%

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

          \[\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} \]

      if 6.00000000000000015e-58 < B

      1. Initial program 49.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 67.8%

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

    Alternative 17: 45.1% accurate, 3.6× speedup?

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

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

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

      if -2.6999999999999998e-110 < B < 1.35e-99

      1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.35e-99 < B

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

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

    Alternative 18: 40.3% accurate, 3.8× speedup?

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

      1. Initial program 56.1%

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

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

      if -1.000000000000002e-309 < B

      1. Initial program 55.2%

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

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

    Alternative 19: 21.2% accurate, 4.0× speedup?

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

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

    Reproduce

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