ABCF->ab-angle angle

Percentage Accurate: 53.3% → 80.7%
Time: 13.5s
Alternatives: 14
Speedup: 2.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 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.3% 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: 80.7% accurate, 1.6× speedup?

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

\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.8000000000000005e42

    1. Initial program 24.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/24.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-identity24.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. +-commutative24.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. unpow224.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. unpow224.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-def57.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. Simplified57.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. Taylor expanded in A around -inf 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.8000000000000005e42 < A

    1. Initial program 68.4%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Step-by-step derivation
      1. associate-*l/68.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-identity68.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. +-commutative68.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. unpow268.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. unpow268.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-def89.1%

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

      \[\leadsto \color{blue}{180 \cdot \frac{\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. Final simplification88.0%

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

Alternative 2: 75.4% accurate, 1.7× speedup?

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

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

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

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


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

    1. Initial program 24.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/24.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-identity24.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. +-commutative24.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. unpow224.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. unpow224.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-def57.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. Simplified57.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. Taylor expanded in A around -inf 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000012e43 < A < 8.4999999999999999e37

    1. Initial program 62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.4999999999999999e37 < A

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 55.4% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;A \leq 4.8 \cdot 10^{-234}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq 3.2 \cdot 10^{-171}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;A \leq 1.45 \cdot 10^{-37}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -9.99999999999999946e33

    1. Initial program 26.0%

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

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

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

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

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

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

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

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

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

    if -9.99999999999999946e33 < A < 4.7999999999999998e-234 or 3.2000000000000001e-171 < A < 1.45000000000000002e-37

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

    if 4.7999999999999998e-234 < A < 3.2000000000000001e-171

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

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

    if 1.45000000000000002e-37 < 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. Step-by-step derivation
      1. associate-*l/78.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1 \cdot 10^{+34}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.8 \cdot 10^{-234}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.2 \cdot 10^{-171}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.45 \cdot 10^{-37}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 4: 55.6% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;A \leq 3.8 \cdot 10^{-234}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq 6.6 \cdot 10^{-172}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;A \leq 2.8 \cdot 10^{-39}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -1.49999999999999999e26

    1. Initial program 26.0%

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

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

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

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

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

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

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

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

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

    if -1.49999999999999999e26 < A < 3.79999999999999984e-234 or 6.6e-172 < A < 2.8000000000000001e-39

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

    if 3.79999999999999984e-234 < A < 6.6e-172

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

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

    if 2.8000000000000001e-39 < 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. Step-by-step derivation
      1. associate-*l/78.1%

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

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

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

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

        \[\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-def94.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. Simplified94.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. Taylor expanded in A around inf 71.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.5 \cdot 10^{+26}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{-234}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \mathbf{elif}\;A \leq 6.6 \cdot 10^{-172}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 2.8 \cdot 10^{-39}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]

Alternative 5: 60.4% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;A \leq 2.7 \cdot 10^{-170} \lor \neg \left(A \leq 1.15 \cdot 10^{-94}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C + B\right) - A}{B}\right)}{\pi}\\

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


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

    1. Initial program 24.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/24.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-identity24.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. +-commutative24.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. unpow224.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. unpow224.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-def57.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. Simplified57.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. Taylor expanded in A around -inf 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.50000000000000001e42 < A < 2.6999999999999999e-170 or 1.15e-94 < A

    1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

    if 2.6999999999999999e-170 < A < 1.15e-94

    1. Initial program 72.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/72.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-identity72.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. +-commutative72.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. unpow272.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. unpow272.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-def96.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.5 \cdot 10^{+42}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.7 \cdot 10^{-170} \lor \neg \left(A \leq 1.15 \cdot 10^{-94}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C + B\right) - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \end{array} \]

Alternative 6: 56.6% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;A \leq 1.85 \cdot 10^{-169}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\

\mathbf{elif}\;A \leq 1.55 \cdot 10^{-37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -5.79999999999999961e42

    1. Initial program 24.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/24.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-identity24.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. +-commutative24.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. unpow224.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. unpow224.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-def57.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. Simplified57.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. Taylor expanded in A around -inf 79.5%

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

    if -5.79999999999999961e42 < A < 1.8499999999999999e-169

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

    if 1.8499999999999999e-169 < A < 1.54999999999999997e-37

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

    if 1.54999999999999997e-37 < 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. Step-by-step derivation
      1. associate-*l/78.1%

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

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

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

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

        \[\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-def94.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. Simplified94.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. Taylor expanded in A around inf 71.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.8 \cdot 10^{+42}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.85 \cdot 10^{-169}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.55 \cdot 10^{-37}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]

Alternative 7: 59.1% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;A \leq 1.1 \cdot 10^{-170}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\

\mathbf{elif}\;A \leq 2.1 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -7.50000000000000041e42

    1. Initial program 24.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/24.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-identity24.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. +-commutative24.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. unpow224.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. unpow224.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-def57.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. Simplified57.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. Taylor expanded in A around -inf 79.5%

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

    if -7.50000000000000041e42 < A < 1.10000000000000007e-170

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

    if 1.10000000000000007e-170 < A < 2.0999999999999999e-91

    1. Initial program 73.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/73.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-identity73.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. +-commutative73.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. unpow273.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. unpow273.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-def97.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. Simplified97.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. Taylor expanded in B around inf 79.5%

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

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

    if 2.0999999999999999e-91 < A

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7.5 \cdot 10^{+42}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.1 \cdot 10^{-170}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.1 \cdot 10^{-91}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 8: 59.1% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;A \leq 1.05 \cdot 10^{-171}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\

\mathbf{elif}\;A \leq 5 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -1.02e43

    1. Initial program 24.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/24.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-identity24.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. +-commutative24.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. unpow224.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. unpow224.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-def57.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. Simplified57.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. Taylor expanded in A around -inf 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.02e43 < A < 1.05e-171

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

    if 1.05e-171 < A < 4.99999999999999997e-91

    1. Initial program 73.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/73.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-identity73.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. +-commutative73.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. unpow273.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. unpow273.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-def97.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. Simplified97.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. Taylor expanded in B around inf 79.5%

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

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

    if 4.99999999999999997e-91 < A

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.02 \cdot 10^{+43}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.05 \cdot 10^{-171}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-91}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 9: 66.2% accurate, 2.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < 3.9e-306

    1. Initial program 58.7%

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

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

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

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

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

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

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

    if 3.9e-306 < B < 9.9999999999999996e-281

    1. Initial program 31.7%

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

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

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

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

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

        \[\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-def87.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. Simplified87.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. Taylor expanded in C around inf 87.0%

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

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

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

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

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

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

    if 9.9999999999999996e-281 < B

    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-*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}} \]
      2. associate-*l/63.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 48.1% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;A \leq 8 \cdot 10^{-171}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;A \leq 4.8 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -7.50000000000000069e-304

    1. Initial program 42.2%

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

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

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

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

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

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

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

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

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

    if -7.50000000000000069e-304 < A < 7.9999999999999999e-171

    1. Initial program 67.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/67.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-identity67.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. +-commutative67.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. unpow267.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. unpow267.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-def88.1%

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

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

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

    if 7.9999999999999999e-171 < A < 4.80000000000000022e-91

    1. Initial program 73.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/73.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-identity73.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. +-commutative73.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. unpow273.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. unpow273.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-def97.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. Simplified97.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. Taylor expanded in B around inf 55.7%

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

    if 4.80000000000000022e-91 < A

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7.5 \cdot 10^{-304}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 8 \cdot 10^{-171}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 4.8 \cdot 10^{-91}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 11: 44.8% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.2 \cdot 10^{-82}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;B \leq 1.05 \cdot 10^{-164}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -8.19999999999999992e-82

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

    if -8.19999999999999992e-82 < B < 1.04999999999999995e-164

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.04999999999999995e-164 < B

    1. Initial program 63.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8.2 \cdot 10^{-82}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-164}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 12: 46.9% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.8 \cdot 10^{-66}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;B \leq 7.6 \cdot 10^{-46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -3.7999999999999998e-66

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

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

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

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

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

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

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

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

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

    if -3.7999999999999998e-66 < B < 7.5999999999999993e-46

    1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

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

    if 7.5999999999999993e-46 < B

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 39.8% accurate, 2.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < -4.999999999999985e-310

    1. Initial program 58.7%

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < B

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 21.0% accurate, 2.5× speedup?

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

\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Derivation
  1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

Reproduce

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