ABCF->ab-angle angle

Percentage Accurate: 53.1% → 80.7%
Time: 15.5s
Alternatives: 21
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 21 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.1% 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}\;C \leq 2.65 \cdot 10^{+29}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - \mathsf{hypot}\left(B, A - C\right)\right) - A\right)\right)}{\pi}\\ \mathbf{elif}\;C \leq 3.9 \cdot 10^{+34}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;C \leq 2.3 \cdot 10^{+65}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\frac{\pi}{180}}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= C 2.65e+29)
   (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C (hypot B (- A C))) A))) PI))
   (if (<= C 3.9e+34)
     (/ (* 180.0 (atan (/ (* B -0.5) C))) PI)
     (if (<= C 2.3e+65)
       (* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI))
       (/ (atan (/ -0.5 (/ C B))) (/ PI 180.0))))))
double code(double A, double B, double C) {
	double tmp;
	if (C <= 2.65e+29) {
		tmp = 180.0 * (atan(((1.0 / B) * ((C - hypot(B, (A - C))) - A))) / ((double) M_PI));
	} else if (C <= 3.9e+34) {
		tmp = (180.0 * atan(((B * -0.5) / C))) / ((double) M_PI);
	} else if (C <= 2.3e+65) {
		tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
	} else {
		tmp = atan((-0.5 / (C / B))) / (((double) M_PI) / 180.0);
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (C <= 2.65e+29) {
		tmp = 180.0 * (Math.atan(((1.0 / B) * ((C - Math.hypot(B, (A - C))) - A))) / Math.PI);
	} else if (C <= 3.9e+34) {
		tmp = (180.0 * Math.atan(((B * -0.5) / C))) / Math.PI;
	} else if (C <= 2.3e+65) {
		tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
	} else {
		tmp = Math.atan((-0.5 / (C / B))) / (Math.PI / 180.0);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if C <= 2.65e+29:
		tmp = 180.0 * (math.atan(((1.0 / B) * ((C - math.hypot(B, (A - C))) - A))) / math.pi)
	elif C <= 3.9e+34:
		tmp = (180.0 * math.atan(((B * -0.5) / C))) / math.pi
	elif C <= 2.3e+65:
		tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi)
	else:
		tmp = math.atan((-0.5 / (C / B))) / (math.pi / 180.0)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (C <= 2.65e+29)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - hypot(B, Float64(A - C))) - A))) / pi));
	elseif (C <= 3.9e+34)
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / C))) / pi);
	elseif (C <= 2.3e+65)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi));
	else
		tmp = Float64(atan(Float64(-0.5 / Float64(C / B))) / Float64(pi / 180.0));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (C <= 2.65e+29)
		tmp = 180.0 * (atan(((1.0 / B) * ((C - hypot(B, (A - C))) - A))) / pi);
	elseif (C <= 3.9e+34)
		tmp = (180.0 * atan(((B * -0.5) / C))) / pi;
	elseif (C <= 2.3e+65)
		tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi);
	else
		tmp = atan((-0.5 / (C / B))) / (pi / 180.0);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[C, 2.65e+29], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.9e+34], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.3e+65], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if C < 2.65e29

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C + \left(-\left(A + \mathsf{hypot}\left(A - C, B\right)\right)\right)\right)}\right)}{\pi} \]
    4. Step-by-step derivation
      1. unsub-neg79.0%

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

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

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

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

    if 2.65e29 < C < 3.90000000000000019e34

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.90000000000000019e34 < C < 2.3e65

    1. Initial program 24.5%

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

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

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

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

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

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

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

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

    if 2.3e65 < C

    1. Initial program 14.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 76.1% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;A \leq -6.2 \cdot 10^{+101}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\

\mathbf{elif}\;A \leq -1.7 \cdot 10^{+70}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;A \leq 5.5 \cdot 10^{+117}:\\
\;\;\;\;\frac{t_0}{\frac{\pi}{180}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -1.02000000000000002e151 or -6.19999999999999998e101 < A < -1.7e70

    1. Initial program 12.1%

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

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

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

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

    if -1.02000000000000002e151 < A < -6.19999999999999998e101

    1. Initial program 37.1%

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

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

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

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

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

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

    if -1.7e70 < A < 5.49999999999999965e117

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.49999999999999965e117 < A

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.02 \cdot 10^{+151}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -6.2 \cdot 10^{+101}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.7 \cdot 10^{+70}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5.5 \cdot 10^{+117}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\frac{\pi}{180}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\ \end{array} \]

Alternative 3: 75.0% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;A \leq -6.5 \cdot 10^{+101}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;A \leq -4.2 \cdot 10^{+71}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;A \leq 3 \cdot 10^{+122}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -2.4000000000000001e151 or -6.50000000000000016e101 < A < -4.19999999999999978e71

    1. Initial program 12.1%

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

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

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

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

    if -2.4000000000000001e151 < A < -6.50000000000000016e101 or -4.19999999999999978e71 < A < 2.99999999999999986e122

    1. Initial program 54.7%

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

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

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

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

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

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

    if 2.99999999999999986e122 < A

    1. Initial program 74.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-74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.4 \cdot 10^{+151}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -6.5 \cdot 10^{+101}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.2 \cdot 10^{+71}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3 \cdot 10^{+122}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 4: 74.9% accurate, 1.6× speedup?

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

\mathbf{elif}\;A \leq -6.5 \cdot 10^{+101}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\

\mathbf{elif}\;A \leq -1.6 \cdot 10^{+73}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;A \leq 7 \cdot 10^{+121}:\\
\;\;\;\;\frac{t_0}{\frac{\pi}{180}}\\

\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 < -5.00000000000000009e150 or -6.50000000000000016e101 < A < -1.59999999999999991e73

    1. Initial program 12.1%

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

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

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

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

    if -5.00000000000000009e150 < A < -6.50000000000000016e101

    1. Initial program 37.1%

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

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

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

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

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

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

    if -1.59999999999999991e73 < A < 6.9999999999999999e121

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.9999999999999999e121 < A

    1. Initial program 74.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-74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5 \cdot 10^{+150}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -6.5 \cdot 10^{+101}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.6 \cdot 10^{+73}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 7 \cdot 10^{+121}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\frac{\pi}{180}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 5: 80.8% accurate, 1.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if C < 1.5499999999999999e29

    1. Initial program 64.9%

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

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

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

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

    if 1.5499999999999999e29 < C < 4.0999999999999998e34

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.0999999999999998e34 < C < 3.80000000000000011e65

    1. Initial program 24.5%

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

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

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

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

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

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

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

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

    if 3.80000000000000011e65 < C

    1. Initial program 14.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 65.0% accurate, 2.3× speedup?

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

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

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

\mathbf{elif}\;B \leq 3.9 \cdot 10^{-104}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{C} + t_0 \cdot 2\right)}{\pi}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if B < 1.8000000000000001e-202

    1. Initial program 53.3%

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

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

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

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

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

    if 1.8000000000000001e-202 < B < 2.4e-151

    1. Initial program 19.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4e-151 < B < 3.9000000000000002e-104

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

    if 3.9000000000000002e-104 < B < 1.30000000000000001e-87

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

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

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

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

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

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

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

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

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

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

    if 1.30000000000000001e-87 < B

    1. Initial program 51.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.8 \cdot 10^{-202}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{-151}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.9 \cdot 10^{-104}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{C} + \frac{C - A}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-87}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]

Alternative 7: 59.1% 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 -2.5 \cdot 10^{+60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.15 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -1.8 \cdot 10^{-85}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.6 \cdot 10^{-173}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))))
   (if (<= A -2.5e+60)
     (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
     (if (<= A -2.15e-11)
       t_0
       (if (<= A -1.8e-85)
         (* 180.0 (/ (atan (/ -0.5 (/ C B))) PI))
         (if (<= A 2.6e-173)
           t_0
           (* 180.0 (/ (atan (+ 1.0 (/ (- C 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 <= -2.5e+60) {
		tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
	} else if (A <= -2.15e-11) {
		tmp = t_0;
	} else if (A <= -1.8e-85) {
		tmp = 180.0 * (atan((-0.5 / (C / B))) / ((double) M_PI));
	} else if (A <= 2.6e-173) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
	double tmp;
	if (A <= -2.5e+60) {
		tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
	} else if (A <= -2.15e-11) {
		tmp = t_0;
	} else if (A <= -1.8e-85) {
		tmp = 180.0 * (Math.atan((-0.5 / (C / B))) / Math.PI);
	} else if (A <= 2.6e-173) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (Math.atan((1.0 + ((C - 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 <= -2.5e+60:
		tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
	elif A <= -2.15e-11:
		tmp = t_0
	elif A <= -1.8e-85:
		tmp = 180.0 * (math.atan((-0.5 / (C / B))) / math.pi)
	elif A <= 2.6e-173:
		tmp = t_0
	else:
		tmp = 180.0 * (math.atan((1.0 + ((C - 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 <= -2.5e+60)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi));
	elseif (A <= -2.15e-11)
		tmp = t_0;
	elseif (A <= -1.8e-85)
		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 / Float64(C / B))) / pi));
	elseif (A <= 2.6e-173)
		tmp = t_0;
	else
		tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan(((C / B) + -1.0)) / pi);
	tmp = 0.0;
	if (A <= -2.5e+60)
		tmp = 180.0 * (atan(((B * 0.5) / A)) / pi);
	elseif (A <= -2.15e-11)
		tmp = t_0;
	elseif (A <= -1.8e-85)
		tmp = 180.0 * (atan((-0.5 / (C / B))) / pi);
	elseif (A <= 2.6e-173)
		tmp = t_0;
	else
		tmp = 180.0 * (atan((1.0 + ((C - 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, -2.5e+60], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.15e-11], t$95$0, If[LessEqual[A, -1.8e-85], N[(180.0 * N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.6e-173], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;A \leq -2.15 \cdot 10^{-11}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;A \leq 2.6 \cdot 10^{-173}:\\
\;\;\;\;t_0\\

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


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

    1. Initial program 15.7%

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

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

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

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

    if -2.49999999999999987e60 < A < -2.15000000000000001e-11 or -1.7999999999999999e-85 < A < 2.60000000000000003e-173

    1. Initial program 60.5%

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

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

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

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

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

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

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

    if -2.15000000000000001e-11 < A < -1.7999999999999999e-85

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

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

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

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

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

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

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

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

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

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

    if 2.60000000000000003e-173 < A

    1. Initial program 64.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.5 \cdot 10^{+60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -2.15 \cdot 10^{-11}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \mathbf{elif}\;A \leq -1.8 \cdot 10^{-85}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.6 \cdot 10^{-173}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \end{array} \]

Alternative 8: 46.8% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{if}\;B \leq -8 \cdot 10^{+48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-198}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 9.2 \cdot 10^{-156}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-78}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan (* (/ C B) 2.0)) PI))))
   (if (<= B -8e+48)
     (* 180.0 (/ (atan 1.0) PI))
     (if (<= B 3.1e-198)
       t_0
       (if (<= B 9.2e-156)
         (* 180.0 (/ (atan (/ 0.0 B)) PI))
         (if (<= B 1.8e-78) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
	double tmp;
	if (B <= -8e+48) {
		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
	} else if (B <= 3.1e-198) {
		tmp = t_0;
	} else if (B <= 9.2e-156) {
		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
	} else if (B <= 1.8e-78) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
	double tmp;
	if (B <= -8e+48) {
		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
	} else if (B <= 3.1e-198) {
		tmp = t_0;
	} else if (B <= 9.2e-156) {
		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
	} else if (B <= 1.8e-78) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi)
	tmp = 0
	if B <= -8e+48:
		tmp = 180.0 * (math.atan(1.0) / math.pi)
	elif B <= 3.1e-198:
		tmp = t_0
	elif B <= 9.2e-156:
		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
	elif B <= 1.8e-78:
		tmp = t_0
	else:
		tmp = 180.0 * (math.atan(-1.0) / math.pi)
	return tmp
function code(A, B, C)
	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi))
	tmp = 0.0
	if (B <= -8e+48)
		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
	elseif (B <= 3.1e-198)
		tmp = t_0;
	elseif (B <= 9.2e-156)
		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
	elseif (B <= 1.8e-78)
		tmp = t_0;
	else
		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan(((C / B) * 2.0)) / pi);
	tmp = 0.0;
	if (B <= -8e+48)
		tmp = 180.0 * (atan(1.0) / pi);
	elseif (B <= 3.1e-198)
		tmp = t_0;
	elseif (B <= 9.2e-156)
		tmp = 180.0 * (atan((0.0 / B)) / pi);
	elseif (B <= 1.8e-78)
		tmp = t_0;
	else
		tmp = 180.0 * (atan(-1.0) / 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] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8e+48], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-198], t$95$0, If[LessEqual[B, 9.2e-156], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.8e-78], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;B \leq 3.1 \cdot 10^{-198}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;B \leq 1.8 \cdot 10^{-78}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < -8.00000000000000035e48

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

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

    if -8.00000000000000035e48 < B < 3.0999999999999998e-198 or 9.1999999999999998e-156 < B < 1.8000000000000001e-78

    1. Initial program 57.8%

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

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

    if 3.0999999999999998e-198 < B < 9.1999999999999998e-156

    1. Initial program 19.3%

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

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

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

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

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

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

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

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

    if 1.8000000000000001e-78 < B

    1. Initial program 50.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8 \cdot 10^{+48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-198}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{elif}\;B \leq 9.2 \cdot 10^{-156}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-78}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 9: 59.0% accurate, 2.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if C < -3.45000000000000021e-87

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

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

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

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

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

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

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

    if -3.45000000000000021e-87 < C < -2.9999999999999998e-289

    1. Initial program 67.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-63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9999999999999998e-289 < C < 1.25e-268

    1. Initial program 47.6%

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C + \left(-\left(A + \mathsf{hypot}\left(A - C, B\right)\right)\right)\right)}\right)}{\pi} \]
    4. Step-by-step derivation
      1. unsub-neg54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25e-268 < C < 3.99999999999999963e-21

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999963e-21 < C

    1. Initial program 18.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -3.45 \cdot 10^{-87}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -3 \cdot 10^{-289}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.25 \cdot 10^{-268}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)}{\pi}\\ \mathbf{elif}\;C \leq 4 \cdot 10^{-21}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\frac{\pi}{180}}\\ \end{array} \]

Alternative 10: 51.6% accurate, 2.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < 3.90000000000000018e-205

    1. Initial program 53.3%

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

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

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

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

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

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

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

    if 3.90000000000000018e-205 < B < 1.59999999999999991e-156

    1. Initial program 19.3%

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

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

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

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

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

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

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

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

    if 1.59999999999999991e-156 < B < 2.0499999999999999e-78

    1. Initial program 58.8%

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

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

    if 2.0499999999999999e-78 < B

    1. Initial program 50.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.9 \cdot 10^{-205}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{-156}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.05 \cdot 10^{-78}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

Alternative 11: 53.1% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;C \leq 9.5 \cdot 10^{-168}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;C \leq 1.4 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if C < 3.00000000000000002e-255

    1. Initial program 66.5%

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

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

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

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

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

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

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

    if 3.00000000000000002e-255 < C < 9.49999999999999918e-168

    1. Initial program 58.1%

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

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

    if 9.49999999999999918e-168 < C < 1.40000000000000005e-67

    1. Initial program 67.8%

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

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

    if 1.40000000000000005e-67 < C

    1. Initial program 25.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 66.0% accurate, 2.4× speedup?

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

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

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

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


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

    1. Initial program 53.3%

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

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

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

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

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

    if 1.1e-198 < B < 1.75000000000000006e-158

    1. Initial program 14.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.75000000000000006e-158 < B

    1. Initial program 51.8%

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

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

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

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

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

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

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

Alternative 13: 55.6% accurate, 2.4× speedup?

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

\mathbf{elif}\;B \leq 2 \cdot 10^{-156}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{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 B < 1.70000000000000006e-202

    1. Initial program 53.3%

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

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

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

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

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

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

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

    if 1.70000000000000006e-202 < B < 2.00000000000000008e-156

    1. Initial program 19.3%

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

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

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

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

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

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

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

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

    if 2.00000000000000008e-156 < B

    1. Initial program 52.0%

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

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

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

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

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

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

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

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

Alternative 14: 54.0% accurate, 2.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -1.14999999999999993e-287

    1. Initial program 68.3%

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

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

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

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

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

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

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

    if -1.14999999999999993e-287 < C < 1.95000000000000013e-178

    1. Initial program 54.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-50.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.95000000000000013e-178 < C

    1. Initial program 33.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 54.3% accurate, 2.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -4e-289

    1. Initial program 68.3%

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

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

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

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

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

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

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

    if -4e-289 < C < 5.99999999999999982e-184

    1. Initial program 54.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-50.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.99999999999999982e-184 < C

    1. Initial program 33.1%

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

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

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

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

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

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

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

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

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

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

Alternative 16: 54.2% accurate, 2.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -9.4999999999999995e-289

    1. Initial program 68.3%

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

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

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

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

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

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

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

    if -9.4999999999999995e-289 < C < 2.1e-178

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

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

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

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

    if 2.1e-178 < C

    1. Initial program 33.1%

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

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

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

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

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

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

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

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

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

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

Alternative 17: 59.3% accurate, 2.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -2.8499999999999999e-223

    1. Initial program 66.7%

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

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

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

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

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

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

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

    if -2.8499999999999999e-223 < C < 2.10000000000000008e-26

    1. Initial program 65.8%

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C + \left(-\left(A + \mathsf{hypot}\left(A - C, B\right)\right)\right)\right)}\right)}{\pi} \]
    4. Step-by-step derivation
      1. unsub-neg73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.10000000000000008e-26 < C

    1. Initial program 18.3%

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

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

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

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

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

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

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

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

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

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

Alternative 18: 59.2% accurate, 2.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -6.1999999999999998e-221

    1. Initial program 66.7%

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

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

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

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

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

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

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

    if -6.1999999999999998e-221 < C < 1.15e-20

    1. Initial program 65.8%

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(C + \left(-\left(A + \mathsf{hypot}\left(A - C, B\right)\right)\right)\right)}\right)}{\pi} \]
    4. Step-by-step derivation
      1. unsub-neg73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e-20 < C

    1. Initial program 18.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 45.7% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;B \leq 4.6 \cdot 10^{-157}:\\
\;\;\;\;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 < -5.19999999999999971e-57

    1. Initial program 47.3%

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

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

    if -5.19999999999999971e-57 < B < 4.59999999999999977e-157

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

    if 4.59999999999999977e-157 < B

    1. Initial program 51.8%

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

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

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

Alternative 20: 40.8% accurate, 2.5× speedup?

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

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

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


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

    1. Initial program 50.2%

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

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

    if -1.999999999999994e-310 < B

    1. Initial program 52.0%

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

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

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

Alternative 21: 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 51.2%

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

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

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

Reproduce

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