ABCF->ab-angle angle

Percentage Accurate: 54.3% → 82.1%
Time: 18.9s
Alternatives: 18
Speedup: 2.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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: 54.3% accurate, 1.0× speedup?

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

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

Alternative 1: 82.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\\ \mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{\frac{{A}^{2}}{C}}\right)\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0
         (atan
          (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))))
   (if (or (<= t_0 -0.5) (not (<= t_0 0.0)))
     (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B))))
     (/ (* 180.0 (atan (* 0.5 (+ (/ B A) (/ B (/ (pow A 2.0) C)))))) PI))))
double code(double A, double B, double C) {
	double t_0 = atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))))));
	double tmp;
	if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
		tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
	} else {
		tmp = (180.0 * atan((0.5 * ((B / A) + (B / (pow(A, 2.0) / C)))))) / ((double) M_PI);
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))))));
	double tmp;
	if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
		tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
	} else {
		tmp = (180.0 * Math.atan((0.5 * ((B / A) + (B / (Math.pow(A, 2.0) / C)))))) / Math.PI;
	}
	return tmp;
}
def code(A, B, C):
	t_0 = math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0))))))
	tmp = 0
	if (t_0 <= -0.5) or not (t_0 <= 0.0):
		tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B)))
	else:
		tmp = (180.0 * math.atan((0.5 * ((B / A) + (B / (math.pow(A, 2.0) / C)))))) / math.pi
	return tmp
function code(A, B, C)
	t_0 = atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))
	tmp = 0.0
	if ((t_0 <= -0.5) || !(t_0 <= 0.0))
		tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))));
	else
		tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(Float64(B / A) + Float64(B / Float64((A ^ 2.0) / C)))))) / pi);
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0))))));
	tmp = 0.0;
	if ((t_0 <= -0.5) || ~((t_0 <= 0.0)))
		tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B)));
	else
		tmp = (180.0 * atan((0.5 * ((B / A) + (B / ((A ^ 2.0) / C)))))) / pi;
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[Or[LessEqual[t$95$0, -0.5], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(B / N[(N[Power[A, 2.0], $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\\
\mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) < -0.5 or -0.0 < (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))

    1. Initial program 58.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. Applied egg-rr89.1%

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

    if -0.5 < (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) < -0.0

    1. Initial program 25.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \leq -0.5 \lor \neg \left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \leq 0\right):\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{\frac{{A}^{2}}{C}}\right)\right)}{\pi}\\ \end{array} \]

Alternative 2: 80.3% accurate, 1.6× speedup?

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

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

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


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

    1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8e9 < A

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

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

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

    Alternative 3: 82.0% accurate, 1.6× speedup?

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

      1. Initial program 17.9%

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.39999999999999971e128 < A

      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. Applied egg-rr83.0%

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

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

    Alternative 4: 75.8% accurate, 1.6× speedup?

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

      1. Initial program 82.8%

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

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

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

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

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

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

        if -7.0999999999999999e28 < C < 1.85000000000000005e132

        1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

        if 1.85000000000000005e132 < C

        1. Initial program 13.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. Applied egg-rr63.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 75.9% accurate, 1.6× speedup?

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

        1. Initial program 82.8%

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

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

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

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

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

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

          if -1.19999999999999991e28 < C < 5.4999999999999997e130

          1. Initial program 51.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. Applied egg-rr75.8%

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

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

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

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

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

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

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

          if 5.4999999999999997e130 < C

          1. Initial program 13.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. Applied egg-rr63.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 6: 52.4% accurate, 2.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -2.1 \cdot 10^{-190}:\\ \;\;\;\;\tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq -6 \cdot 10^{-245}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq -1.75 \cdot 10^{-303}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 5.2 \cdot 10^{-236} \lor \neg \left(A \leq 1.02 \cdot 10^{+39}\right) \land A \leq 4.7 \cdot 10^{+67}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-B\right) - A}{B}\right)}}\\ \end{array} \end{array} \]
        (FPCore (A B C)
         :precision binary64
         (if (<= A -2.1e-190)
           (* (atan (/ B (/ A 0.5))) (/ 180.0 PI))
           (if (<= A -6e-245)
             (* 180.0 (/ (atan 1.0) PI))
             (if (<= A -1.75e-303)
               (* 180.0 (/ (atan -1.0) PI))
               (if (or (<= A 5.2e-236) (and (not (<= A 1.02e+39)) (<= A 4.7e+67)))
                 (/ 180.0 (/ PI (atan (/ (* B -0.5) C))))
                 (/ 180.0 (/ PI (atan (/ (- (- B) A) B)))))))))
        double code(double A, double B, double C) {
        	double tmp;
        	if (A <= -2.1e-190) {
        		tmp = atan((B / (A / 0.5))) * (180.0 / ((double) M_PI));
        	} else if (A <= -6e-245) {
        		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
        	} else if (A <= -1.75e-303) {
        		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
        	} else if ((A <= 5.2e-236) || (!(A <= 1.02e+39) && (A <= 4.7e+67))) {
        		tmp = 180.0 / (((double) M_PI) / atan(((B * -0.5) / C)));
        	} else {
        		tmp = 180.0 / (((double) M_PI) / atan(((-B - A) / B)));
        	}
        	return tmp;
        }
        
        public static double code(double A, double B, double C) {
        	double tmp;
        	if (A <= -2.1e-190) {
        		tmp = Math.atan((B / (A / 0.5))) * (180.0 / Math.PI);
        	} else if (A <= -6e-245) {
        		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
        	} else if (A <= -1.75e-303) {
        		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
        	} else if ((A <= 5.2e-236) || (!(A <= 1.02e+39) && (A <= 4.7e+67))) {
        		tmp = 180.0 / (Math.PI / Math.atan(((B * -0.5) / C)));
        	} else {
        		tmp = 180.0 / (Math.PI / Math.atan(((-B - A) / B)));
        	}
        	return tmp;
        }
        
        def code(A, B, C):
        	tmp = 0
        	if A <= -2.1e-190:
        		tmp = math.atan((B / (A / 0.5))) * (180.0 / math.pi)
        	elif A <= -6e-245:
        		tmp = 180.0 * (math.atan(1.0) / math.pi)
        	elif A <= -1.75e-303:
        		tmp = 180.0 * (math.atan(-1.0) / math.pi)
        	elif (A <= 5.2e-236) or (not (A <= 1.02e+39) and (A <= 4.7e+67)):
        		tmp = 180.0 / (math.pi / math.atan(((B * -0.5) / C)))
        	else:
        		tmp = 180.0 / (math.pi / math.atan(((-B - A) / B)))
        	return tmp
        
        function code(A, B, C)
        	tmp = 0.0
        	if (A <= -2.1e-190)
        		tmp = Float64(atan(Float64(B / Float64(A / 0.5))) * Float64(180.0 / pi));
        	elseif (A <= -6e-245)
        		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
        	elseif (A <= -1.75e-303)
        		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
        	elseif ((A <= 5.2e-236) || (!(A <= 1.02e+39) && (A <= 4.7e+67)))
        		tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B * -0.5) / C))));
        	else
        		tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(-B) - A) / B))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(A, B, C)
        	tmp = 0.0;
        	if (A <= -2.1e-190)
        		tmp = atan((B / (A / 0.5))) * (180.0 / pi);
        	elseif (A <= -6e-245)
        		tmp = 180.0 * (atan(1.0) / pi);
        	elseif (A <= -1.75e-303)
        		tmp = 180.0 * (atan(-1.0) / pi);
        	elseif ((A <= 5.2e-236) || (~((A <= 1.02e+39)) && (A <= 4.7e+67)))
        		tmp = 180.0 / (pi / atan(((B * -0.5) / C)));
        	else
        		tmp = 180.0 / (pi / atan(((-B - A) / B)));
        	end
        	tmp_2 = tmp;
        end
        
        code[A_, B_, C_] := If[LessEqual[A, -2.1e-190], N[(N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6e-245], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.75e-303], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, 5.2e-236], And[N[Not[LessEqual[A, 1.02e+39]], $MachinePrecision], LessEqual[A, 4.7e+67]]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[((-B) - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;A \leq -2.1 \cdot 10^{-190}:\\
        \;\;\;\;\tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right) \cdot \frac{180}{\pi}\\
        
        \mathbf{elif}\;A \leq -6 \cdot 10^{-245}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
        
        \mathbf{elif}\;A \leq -1.75 \cdot 10^{-303}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
        
        \mathbf{elif}\;A \leq 5.2 \cdot 10^{-236} \lor \neg \left(A \leq 1.02 \cdot 10^{+39}\right) \land A \leq 4.7 \cdot 10^{+67}:\\
        \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-B\right) - A}{B}\right)}}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 5 regimes
        2. if A < -2.09999999999999991e-190

          1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

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

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

          if -2.09999999999999991e-190 < A < -6.0000000000000004e-245

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

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

          if -6.0000000000000004e-245 < A < -1.75e-303

          1. Initial program 67.5%

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

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

          if -1.75e-303 < A < 5.2000000000000001e-236 or 1.02e39 < A < 4.70000000000000017e67

          1. Initial program 41.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. Applied egg-rr72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 5.2000000000000001e-236 < A < 1.02e39 or 4.70000000000000017e67 < A

          1. Initial program 77.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. Applied egg-rr92.3%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.1 \cdot 10^{-190}:\\ \;\;\;\;\tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;A \leq -6 \cdot 10^{-245}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq -1.75 \cdot 10^{-303}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 5.2 \cdot 10^{-236} \lor \neg \left(A \leq 1.02 \cdot 10^{+39}\right) \land A \leq 4.7 \cdot 10^{+67}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-B\right) - A}{B}\right)}}\\ \end{array} \]

        Alternative 7: 47.6% accurate, 2.4× speedup?

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

          1. Initial program 83.1%

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

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

          if -1.14999999999999995e-12 < C < -1.95000000000000014e-250 or 4.80000000000000003e-200 < C < 8.59999999999999925e-9

          1. Initial program 52.1%

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

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

          if -1.95000000000000014e-250 < C < 4.80000000000000003e-200

          1. Initial program 46.8%

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

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

          if 8.59999999999999925e-9 < C

          1. Initial program 28.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. Applied egg-rr68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.15 \cdot 10^{-12}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -1.95 \cdot 10^{-250}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.8 \cdot 10^{-200}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq 8.6 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \end{array} \]

        Alternative 8: 47.6% accurate, 2.4× speedup?

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

          1. Initial program 83.1%

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

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

          if -1.4000000000000001e-12 < C < -2.2e-250 or 5.6000000000000004e-197 < C < 9.1999999999999997e-9

          1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

          if -2.2e-250 < C < 5.6000000000000004e-197

          1. Initial program 46.8%

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

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

          if 9.1999999999999997e-9 < C

          1. Initial program 28.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. Applied egg-rr68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.4 \cdot 10^{-12}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;C \leq -2.2 \cdot 10^{-250}:\\ \;\;\;\;\tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;C \leq 5.6 \cdot 10^{-197}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;C \leq 9.2 \cdot 10^{-9}:\\ \;\;\;\;\tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\ \end{array} \]

        Alternative 9: 51.1% accurate, 2.4× speedup?

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

          1. Initial program 50.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. Applied egg-rr72.5%

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

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

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

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

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

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

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

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

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

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

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

          if -9.99999999999999925e-208 < B < 6.4999999999999995e-173

          1. Initial program 52.1%

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

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

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

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

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

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

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

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

          if 6.4999999999999995e-173 < B < 2.50000000000000017e-38

          1. Initial program 61.5%

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

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

          if 2.50000000000000017e-38 < B

          1. Initial program 58.0%

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1 \cdot 10^{-207}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A}{B}\right)}}\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-173}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-38}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

        Alternative 10: 59.0% accurate, 2.4× speedup?

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

          1. Initial program 50.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. Applied egg-rr72.5%

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

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

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

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

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

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

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

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

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

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

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

          if -1.64999999999999987e-209 < B < 1.08e-172

          1. Initial program 52.1%

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

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

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

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

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

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

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

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

          if 1.08e-172 < B

          1. Initial program 58.7%

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

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

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

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

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

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

          Alternative 11: 63.8% accurate, 2.4× speedup?

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

            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. Step-by-step derivation
              1. Simplified70.6%

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

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

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

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

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

              if -2.6000000000000002e-237 < B < 3.50000000000000014e-173

              1. Initial program 52.1%

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

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

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

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

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

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

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

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

              if 3.50000000000000014e-173 < B

              1. Initial program 58.7%

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

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

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

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

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

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

              Alternative 12: 63.7% accurate, 2.4× speedup?

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

                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. Applied egg-rr73.2%

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

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

                if -5.2000000000000001e-236 < B < 3.79999999999999987e-172

                1. Initial program 52.1%

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

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

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

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

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

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

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

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

                if 3.79999999999999987e-172 < B

                1. Initial program 58.7%

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

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

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

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

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

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

                Alternative 13: 63.7% accurate, 2.4× speedup?

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

                  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. Applied egg-rr73.2%

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

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

                  if -9.4999999999999998e-237 < B < 3.79999999999999987e-172

                  1. Initial program 52.1%

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

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

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

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

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

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

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

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

                  if 3.79999999999999987e-172 < B

                  1. Initial program 58.7%

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

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

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

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

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

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

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

                Alternative 14: 46.0% accurate, 2.4× speedup?

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

                  1. Initial program 49.0%

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

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

                  if -6.79999999999999991e-70 < B < -5.4e-207

                  1. Initial program 52.4%

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

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

                  if -5.4e-207 < B < 5.7e-95

                  1. Initial program 55.9%

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

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

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

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

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

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

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

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

                  if 5.7e-95 < B

                  1. Initial program 56.6%

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.8 \cdot 10^{-70}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -5.4 \cdot 10^{-207}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.7 \cdot 10^{-95}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

                Alternative 15: 47.8% accurate, 2.4× speedup?

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

                  1. Initial program 36.0%

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

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

                  if -7.00000000000000034e-213 < A < 6.5e-139

                  1. Initial program 54.9%

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

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

                  if 6.5e-139 < A

                  1. Initial program 73.9%

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7 \cdot 10^{-213}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 6.5 \cdot 10^{-139}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \]

                Alternative 16: 45.5% accurate, 2.5× speedup?

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

                  1. Initial program 49.3%

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

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

                  if -5.79999999999999986e-134 < B < 6.1999999999999998e-96

                  1. Initial program 55.0%

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

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

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

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

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

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

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

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

                  if 6.1999999999999998e-96 < B

                  1. Initial program 56.6%

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

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

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

                Alternative 17: 40.2% accurate, 2.5× speedup?

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

                  1. Initial program 50.3%

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

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

                  if -9.999999999999969e-311 < B

                  1. Initial program 57.3%

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

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

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

                Alternative 18: 21.4% accurate, 2.5× speedup?

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

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

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

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

                Reproduce

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