ABCF->ab-angle angle

Percentage Accurate: 53.5% → 81.4%
Time: 17.4s
Alternatives: 20
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 20 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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 81.4% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

    if 6.20000000000000008e105 < C

    1. Initial program 12.1%

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

      \[\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 A around inf 83.5%

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

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

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

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

Alternative 2: 78.4% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 68.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 0 68.3%

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

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

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

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

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

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

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

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

    if -1.09999999999999998e-28 < C < 1.05e95

    1. Initial program 50.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 C around 0 47.8%

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

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

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

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

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

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

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

    if 1.05e95 < C

    1. Initial program 16.2%

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

      \[\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 A around inf 82.1%

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

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

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

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

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

Alternative 3: 74.9% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 21.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3999999999999999e49 < A < 1.99999999999999997e67

    1. Initial program 52.0%

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

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

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

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

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

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

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

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

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

    if 1.99999999999999997e67 < A

    1. Initial program 81.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 0 81.3%

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

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

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

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

Alternative 4: 75.1% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 21.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.24999999999999992e54 < A < 7.50000000000000006e65

    1. Initial program 52.0%

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

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

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

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

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

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

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

    if 7.50000000000000006e65 < A

    1. Initial program 81.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 0 81.3%

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

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

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

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

Alternative 5: 80.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -2.8 \cdot 10^{+66}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\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.8e+66)
   (* 180.0 (/ (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- A))) 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.8e+66) {
		tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / ((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.8e+66) {
		tmp = 180.0 * (Math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / 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.8e+66:
		tmp = 180.0 * (math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / 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.8e+66)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-A))) / 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.8e+66)
		tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / 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.8e+66], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / 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.8 \cdot 10^{+66}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\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.8000000000000001e66

    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. *-commutative20.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000001e66 < A

    1. Initial program 59.0%

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

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

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

    Alternative 6: 64.8% accurate, 3.3× speedup?

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

      1. Initial program 48.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 70.7%

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

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

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

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

      if -2.30000000000000021e-118 < B < -5.99999999999999973e-213

      1. Initial program 40.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.99999999999999973e-213 < B

      1. Initial program 51.2%

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

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

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

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

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

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

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

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

    Alternative 7: 47.6% accurate, 3.4× speedup?

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

      1. Initial program 37.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 A around -inf 55.3%

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

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

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

      if -1.95000000000000002e-143 < A < 2.79999999999999989e-101

      1. Initial program 47.6%

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

        \[\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 A around inf 39.6%

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

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

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

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

      if 2.79999999999999989e-101 < A < 4.09999999999999995e33

      1. Initial program 48.4%

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

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

      if 4.09999999999999995e33 < A

      1. Initial program 79.6%

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}}{B}\right)}{\pi} \]
        6. hypot-define98.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. Simplified98.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
      5. Taylor expanded in A around inf 76.5%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.95 \cdot 10^{-143}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.8 \cdot 10^{-101}:\\ \;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq 4.1 \cdot 10^{+33}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 47.6% accurate, 3.4× speedup?

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

      1. Initial program 37.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 A around -inf 55.3%

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

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

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

      if -2.59999999999999987e-143 < A < 1.4499999999999999e-103

      1. Initial program 47.6%

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

        \[\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 A around inf 39.6%

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

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

      if 1.4499999999999999e-103 < A < 4.2000000000000001e33

      1. Initial program 48.4%

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

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

      if 4.2000000000000001e33 < A

      1. Initial program 79.6%

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}}{B}\right)}{\pi} \]
        6. hypot-define98.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. Simplified98.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
      5. Taylor expanded in A around inf 76.5%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.6 \cdot 10^{-143}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.45 \cdot 10^{-103}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)\\ \mathbf{elif}\;A \leq 4.2 \cdot 10^{+33}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 47.6% accurate, 3.4× speedup?

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

      1. Initial program 37.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 A around -inf 55.3%

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

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

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

      if -1.42e-143 < A < 3.90000000000000015e-101

      1. Initial program 47.6%

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

        \[\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 A around inf 39.6%

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

      if 3.90000000000000015e-101 < A < 4.09999999999999995e33

      1. Initial program 48.4%

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

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

      if 4.09999999999999995e33 < A

      1. Initial program 79.6%

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}}{B}\right)}{\pi} \]
        6. hypot-define98.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. Simplified98.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
      5. Taylor expanded in A around inf 76.5%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.42 \cdot 10^{-143}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-101}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.1 \cdot 10^{+33}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 47.5% accurate, 3.4× speedup?

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

      1. Initial program 37.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 A around -inf 55.3%

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

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

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

      if -1.4999999999999999e-144 < A < 7.6000000000000001e-103

      1. Initial program 47.6%

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

        \[\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 A around inf 39.6%

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

      if 7.6000000000000001e-103 < A < 5.1999999999999995e33

      1. Initial program 48.4%

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

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

      if 5.1999999999999995e33 < A

      1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

    Alternative 11: 65.5% accurate, 3.5× speedup?

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

      1. Initial program 53.3%

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

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

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

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

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

      if 1.9000000000000001e-268 < B < 3.49999999999999997e-238

      1. Initial program 37.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 C around inf 84.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 A around inf 84.0%

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

      if 3.49999999999999997e-238 < B

      1. Initial program 46.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 0 46.4%

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

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

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

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

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

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

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

    Alternative 12: 59.4% accurate, 3.5× speedup?

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

      1. Initial program 55.1%

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

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

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

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

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

      if 1.64999999999999994e-140 < B < 2.39999999999999987e34

      1. Initial program 39.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 A around -inf 47.9%

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

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

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

      if 2.39999999999999987e34 < B

      1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 58.6% accurate, 3.5× speedup?

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

      1. Initial program 23.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -8.5e19 < A < 9.0000000000000002e-167

      1. Initial program 53.8%

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

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

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

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

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

      if 9.0000000000000002e-167 < A

      1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

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

    Alternative 14: 58.6% accurate, 3.5× speedup?

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

      1. Initial program 23.1%

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

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

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

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

      if -6e19 < A < 5.3999999999999995e-165

      1. Initial program 53.8%

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

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

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

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

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

      if 5.3999999999999995e-165 < A

      1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 15: 52.4% accurate, 3.5× speedup?

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

      1. Initial program 37.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 A around -inf 55.3%

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

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

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

      if -1.02e-143 < A < 1.01999999999999998e-103

      1. Initial program 47.6%

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

        \[\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 A around inf 39.6%

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

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

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

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

      if 1.01999999999999998e-103 < A

      1. Initial program 70.6%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 16: 47.3% accurate, 3.5× speedup?

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

      1. Initial program 68.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 0 68.3%

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

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

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

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

      if -6.60000000000000055e-29 < C < 1.30000000000000007e-91

      1. Initial program 53.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 32.2%

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

      if 1.30000000000000007e-91 < C

      1. Initial program 29.8%

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

        \[\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 A around inf 59.9%

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

    Alternative 17: 46.6% accurate, 3.6× speedup?

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

      1. Initial program 47.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.8%

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

      if -2.55000000000000012e-87 < B < 2.4999999999999999e-122

      1. Initial program 60.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 0 57.8%

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

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

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

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

      if 2.4999999999999999e-122 < B

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

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

    Alternative 18: 44.7% accurate, 3.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -2.5 \cdot 10^{-79}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{-206}:\\ \;\;\;\;180 \cdot \frac{\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 -2.5e-79)
       (* 180.0 (/ (atan 1.0) PI))
       (if (<= B 2.4e-206)
         (* 180.0 (/ (atan 0.0) PI))
         (* 180.0 (/ (atan -1.0) PI)))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (B <= -2.5e-79) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= 2.4e-206) {
    		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 <= -2.5e-79) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= 2.4e-206) {
    		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 <= -2.5e-79:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= 2.4e-206:
    		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 <= -2.5e-79)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= 2.4e-206)
    		tmp = Float64(180.0 * Float64(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 <= -2.5e-79)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= 2.4e-206)
    		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, -2.5e-79], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-206], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;B \leq -2.5 \cdot 10^{-79}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq 2.4 \cdot 10^{-206}:\\
    \;\;\;\;180 \cdot \frac{\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 < -2.5e-79

      1. Initial program 48.4%

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

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

      if -2.5e-79 < B < 2.4e-206

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
      6. Simplified27.8%

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

      if 2.4e-206 < B

      1. Initial program 45.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 45.0%

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

    Alternative 19: 29.2% accurate, 3.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 1.9 \cdot 10^{-206}:\\ \;\;\;\;180 \cdot \frac{\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.9e-206) (* 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.9e-206) {
    		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.9e-206) {
    		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.9e-206:
    		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.9e-206)
    		tmp = Float64(180.0 * Float64(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.9e-206)
    		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.9e-206], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;B \leq 1.9 \cdot 10^{-206}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if B < 1.90000000000000001e-206

      1. Initial program 52.6%

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
      6. Simplified15.4%

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

      if 1.90000000000000001e-206 < B

      1. Initial program 45.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 45.0%

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

    Alternative 20: 21.3% 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 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 22.2%

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

    Reproduce

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