ABCF->ab-angle angle

Percentage Accurate: 53.3% → 80.8%
Time: 18.0s
Alternatives: 19
Speedup: 3.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 53.3% accurate, 1.0× speedup?

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

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

Alternative 1: 80.8% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 59.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/59.8%

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

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

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

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

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

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

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

    if 8.2e49 < C

    1. Initial program 16.5%

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

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

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

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

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

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

Alternative 2: 77.7% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

    if -8.8000000000000005e42 < C < 7.4999999999999995e49

    1. Initial program 56.6%

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

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

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

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

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

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

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

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

    if 7.4999999999999995e49 < C

    1. Initial program 16.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 77.7% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

    if -1.1e43 < C < 3.9000000000000001e49

    1. Initial program 56.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9000000000000001e49 < C

    1. Initial program 16.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.7% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 68.4%

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

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

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

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

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

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

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

    if -8.8000000000000005e42 < C < 8.2e49

    1. Initial program 56.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.2e49 < C

    1. Initial program 16.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 73.4% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 8.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.4000000000000003e179 < A < 1.06e-41

    1. Initial program 51.6%

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

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

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

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

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

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

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

    if 1.06e-41 < 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. Add Preprocessing
    3. Taylor expanded in B around inf 74.8%

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

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

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

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

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

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

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

Alternative 6: 81.0% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 59.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/59.8%

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

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

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

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

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

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

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

    if 8.2e49 < C

    1. Initial program 16.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 80.8% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 16.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999997e113 < A

    1. Initial program 59.4%

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

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

    Alternative 8: 46.4% accurate, 3.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -2.3 \cdot 10^{-112}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -9.5 \cdot 10^{-220}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 6.8 \cdot 10^{-255}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2 \cdot 10^{-125}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-13}:\\ \;\;\;\;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)) PI))))
       (if (<= B -2.3e-112)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -9.5e-220)
           t_0
           (if (<= B 6.8e-255)
             (* 180.0 (/ (atan (- (/ A B))) PI))
             (if (<= B 2e-125)
               (/ (* 180.0 (atan 0.0)) PI)
               (if (<= B 2.5e-13) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
    	double tmp;
    	if (B <= -2.3e-112) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -9.5e-220) {
    		tmp = t_0;
    	} else if (B <= 6.8e-255) {
    		tmp = 180.0 * (atan(-(A / B)) / ((double) M_PI));
    	} else if (B <= 2e-125) {
    		tmp = (180.0 * atan(0.0)) / ((double) M_PI);
    	} else if (B <= 2.5e-13) {
    		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)) / Math.PI);
    	double tmp;
    	if (B <= -2.3e-112) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -9.5e-220) {
    		tmp = t_0;
    	} else if (B <= 6.8e-255) {
    		tmp = 180.0 * (Math.atan(-(A / B)) / Math.PI);
    	} else if (B <= 2e-125) {
    		tmp = (180.0 * Math.atan(0.0)) / Math.PI;
    	} else if (B <= 2.5e-13) {
    		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)) / math.pi)
    	tmp = 0
    	if B <= -2.3e-112:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -9.5e-220:
    		tmp = t_0
    	elif B <= 6.8e-255:
    		tmp = 180.0 * (math.atan(-(A / B)) / math.pi)
    	elif B <= 2e-125:
    		tmp = (180.0 * math.atan(0.0)) / math.pi
    	elif B <= 2.5e-13:
    		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(C / B)) / pi))
    	tmp = 0.0
    	if (B <= -2.3e-112)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -9.5e-220)
    		tmp = t_0;
    	elseif (B <= 6.8e-255)
    		tmp = Float64(180.0 * Float64(atan(Float64(-Float64(A / B))) / pi));
    	elseif (B <= 2e-125)
    		tmp = Float64(Float64(180.0 * atan(0.0)) / pi);
    	elseif (B <= 2.5e-13)
    		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)) / pi);
    	tmp = 0.0;
    	if (B <= -2.3e-112)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -9.5e-220)
    		tmp = t_0;
    	elseif (B <= 6.8e-255)
    		tmp = 180.0 * (atan(-(A / B)) / pi);
    	elseif (B <= 2e-125)
    		tmp = (180.0 * atan(0.0)) / pi;
    	elseif (B <= 2.5e-13)
    		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[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.3e-112], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.5e-220], t$95$0, If[LessEqual[B, 6.8e-255], N[(180.0 * N[(N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2e-125], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2.5e-13], 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}\right)}{\pi}\\
    \mathbf{if}\;B \leq -2.3 \cdot 10^{-112}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -9.5 \cdot 10^{-220}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 6.8 \cdot 10^{-255}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 2 \cdot 10^{-125}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
    
    \mathbf{elif}\;B \leq 2.5 \cdot 10^{-13}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if B < -2.29999999999999991e-112

      1. Initial program 48.3%

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

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

      if -2.29999999999999991e-112 < B < -9.50000000000000062e-220 or 2.00000000000000002e-125 < B < 2.49999999999999995e-13

      1. Initial program 62.8%

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

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

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

      if -9.50000000000000062e-220 < B < 6.79999999999999967e-255

      1. Initial program 69.0%

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

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

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

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

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

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

      if 6.79999999999999967e-255 < B < 2.00000000000000002e-125

      1. Initial program 33.4%

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

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

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

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

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

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

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

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

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

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

      if 2.49999999999999995e-13 < B

      1. Initial program 49.9%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.3 \cdot 10^{-112}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -9.5 \cdot 10^{-220}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6.8 \cdot 10^{-255}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2 \cdot 10^{-125}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-13}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 59.6% accurate, 3.2× speedup?

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

      1. Initial program 68.8%

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

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

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

      if -8.2000000000000003e-57 < C < 5.3999999999999998e-305 or 4.5999999999999996e-90 < C < 2.74999999999999996e-14

      1. Initial program 57.2%

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

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

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

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

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

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

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

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

      if 5.3999999999999998e-305 < C < 4.5999999999999996e-90

      1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.74999999999999996e-14 < C

      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. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*r/20.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 10: 46.1% accurate, 3.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -3.8 \cdot 10^{-110}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4 \cdot 10^{-200}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 3.6 \cdot 10^{-125}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 5.6 \cdot 10^{-13}:\\ \;\;\;\;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)) PI))))
       (if (<= B -3.8e-110)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= B -4e-200)
           t_0
           (if (<= B 3.6e-125)
             (/ (* 180.0 (atan 0.0)) PI)
             (if (<= B 5.6e-13) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
    double code(double A, double B, double C) {
    	double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
    	double tmp;
    	if (B <= -3.8e-110) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= -4e-200) {
    		tmp = t_0;
    	} else if (B <= 3.6e-125) {
    		tmp = (180.0 * atan(0.0)) / ((double) M_PI);
    	} else if (B <= 5.6e-13) {
    		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)) / Math.PI);
    	double tmp;
    	if (B <= -3.8e-110) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= -4e-200) {
    		tmp = t_0;
    	} else if (B <= 3.6e-125) {
    		tmp = (180.0 * Math.atan(0.0)) / Math.PI;
    	} else if (B <= 5.6e-13) {
    		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)) / math.pi)
    	tmp = 0
    	if B <= -3.8e-110:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= -4e-200:
    		tmp = t_0
    	elif B <= 3.6e-125:
    		tmp = (180.0 * math.atan(0.0)) / math.pi
    	elif B <= 5.6e-13:
    		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(C / B)) / pi))
    	tmp = 0.0
    	if (B <= -3.8e-110)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= -4e-200)
    		tmp = t_0;
    	elseif (B <= 3.6e-125)
    		tmp = Float64(Float64(180.0 * atan(0.0)) / pi);
    	elseif (B <= 5.6e-13)
    		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)) / pi);
    	tmp = 0.0;
    	if (B <= -3.8e-110)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= -4e-200)
    		tmp = t_0;
    	elseif (B <= 3.6e-125)
    		tmp = (180.0 * atan(0.0)) / pi;
    	elseif (B <= 5.6e-13)
    		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[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.8e-110], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4e-200], t$95$0, If[LessEqual[B, 3.6e-125], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 5.6e-13], 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}\right)}{\pi}\\
    \mathbf{if}\;B \leq -3.8 \cdot 10^{-110}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq -4 \cdot 10^{-200}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;B \leq 3.6 \cdot 10^{-125}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
    
    \mathbf{elif}\;B \leq 5.6 \cdot 10^{-13}:\\
    \;\;\;\;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 < -3.7999999999999998e-110

      1. Initial program 48.3%

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

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

      if -3.7999999999999998e-110 < B < -3.9999999999999999e-200 or 3.6000000000000002e-125 < B < 5.6000000000000004e-13

      1. Initial program 66.8%

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

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

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

      if -3.9999999999999999e-200 < B < 3.6000000000000002e-125

      1. Initial program 50.4%

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

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

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{0}}{\pi} \]
      7. Simplified42.5%

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

      if 5.6000000000000004e-13 < B

      1. Initial program 49.9%

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

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

    Alternative 11: 60.3% accurate, 3.3× speedup?

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

      1. Initial program 56.7%

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

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

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

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

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

      if 3.09999999999999988e-254 < B < 3.6999999999999999e-125

      1. Initial program 33.4%

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

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

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

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

      if 2.29999999999999979e-13 < B

      1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

    Alternative 12: 63.7% accurate, 3.5× speedup?

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

      1. Initial program 53.2%

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

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

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

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

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

      if 2.99999999999999995e-252 < B < 3.6000000000000002e-125

      1. Initial program 33.4%

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

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

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

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

      if 3.6000000000000002e-125 < B

      1. Initial program 56.3%

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

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

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

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

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

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

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

    Alternative 13: 59.9% accurate, 3.5× speedup?

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

      1. Initial program 24.7%

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

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

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

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

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

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

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

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

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

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

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

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

      if -9.9999999999999996e-39 < A < 1.69999999999999995e-135

      1. Initial program 58.2%

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

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

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

      if 1.69999999999999995e-135 < A

      1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

    Alternative 14: 59.9% accurate, 3.5× speedup?

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

      1. Initial program 24.7%

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

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

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

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

      if -5.39999999999999998e-42 < A < 7.60000000000000006e-134

      1. Initial program 58.2%

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

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

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

      if 7.60000000000000006e-134 < A

      1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

    Alternative 15: 59.9% accurate, 3.5× speedup?

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

      1. Initial program 68.8%

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

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

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

      if -1.20000000000000003e-57 < C < 2.69999999999999989e-18

      1. Initial program 57.7%

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

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

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

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

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

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

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

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

      if 2.69999999999999989e-18 < C

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 16: 56.6% accurate, 3.5× speedup?

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

      1. Initial program 73.8%

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

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

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

      if -6.79999999999999968e99 < C < 3.1e-20

      1. Initial program 59.1%

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

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

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

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

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

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

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

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

      if 3.1e-20 < C

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 17: 45.4% accurate, 3.6× speedup?

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

      1. Initial program 49.5%

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

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

      if -1.36000000000000006e-103 < B < 1.1799999999999999e-126

      1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

      if 1.1799999999999999e-126 < B

      1. Initial program 55.8%

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

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

    Alternative 18: 39.8% accurate, 3.8× speedup?

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

      1. Initial program 52.9%

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

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

      if -4.999999999999985e-310 < B

      1. Initial program 51.9%

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

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

    Alternative 19: 21.6% accurate, 4.0× speedup?

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

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

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

    Reproduce

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