ABCF->ab-angle angle

Percentage Accurate: 54.3% → 80.3%
Time: 21.8s
Alternatives: 16
Speedup: 3.6×

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 16 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: 80.3% accurate, 1.8× speedup?

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

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

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

\mathbf{elif}\;A \leq -13500000:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -5.0999999999999996e229 or -2.25000000000000002e207 < A < -1.35e7

    1. Initial program 20.6%

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

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

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

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

    if -5.0999999999999996e229 < A < -2.25000000000000002e207

    1. Initial program 21.4%

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

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

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

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

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

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

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

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

    if -1.35e7 < A

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

Alternative 2: 82.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\ t_1 := 180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-86}:\\ \;\;\;\;\frac{t\_1}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{-180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{\mathsf{fma}\left(B, \frac{C}{A}, B\right)}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\pi}{t\_1}}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0
         (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
        (t_1 (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B)))))
   (if (<= t_0 -1e-86)
     (/ t_1 PI)
     (if (<= t_0 0.0)
       (/ (* -180.0 (atan (* -0.5 (/ (fma B (/ C A) B) A)))) PI)
       (/ 1.0 (/ PI t_1))))))
double code(double A, double B, double C) {
	double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
	double t_1 = 180.0 * atan((((C - A) - hypot((A - C), B)) / B));
	double tmp;
	if (t_0 <= -1e-86) {
		tmp = t_1 / ((double) M_PI);
	} else if (t_0 <= 0.0) {
		tmp = (-180.0 * atan((-0.5 * (fma(B, (C / A), B) / A)))) / ((double) M_PI);
	} else {
		tmp = 1.0 / (((double) M_PI) / t_1);
	}
	return tmp;
}
function code(A, B, C)
	t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))
	t_1 = Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))
	tmp = 0.0
	if (t_0 <= -1e-86)
		tmp = Float64(t_1 / pi);
	elseif (t_0 <= 0.0)
		tmp = Float64(Float64(-180.0 * atan(Float64(-0.5 * Float64(fma(B, Float64(C / A), B) / A)))) / pi);
	else
		tmp = Float64(1.0 / Float64(pi / t_1));
	end
	return tmp
end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-86], N[(t$95$1 / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(-180.0 * N[ArcTan[N[(-0.5 * N[(N[(B * N[(C / A), $MachinePrecision] + B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(1.0 / N[(Pi / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
t_1 := 180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-86}:\\
\;\;\;\;\frac{t\_1}{\pi}\\

\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{\mathsf{fma}\left(B, \frac{C}{A}, B\right)}{A}\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\pi}{t\_1}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -1.00000000000000008e-86

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

    if -1.00000000000000008e-86 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0

    1. Initial program 18.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{180 \cdot \left(-\tan^{-1} \left(\frac{-0.5 \cdot \mathsf{fma}\left(B, \frac{C}{A}, B\right)}{A}\right)\right)}{\pi}} \]
    8. Step-by-step derivation
      1. distribute-rgt-neg-out66.1%

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

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

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

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

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

    if -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64))))))

    1. Initial program 54.0%

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

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

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

Alternative 3: 80.2% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -5.8 \cdot 10^{+229} \lor \neg \left(A \leq -2.5 \cdot 10^{+203}\right) \land A \leq -7000000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (or (<= A -5.8e+229) (and (not (<= A -2.5e+203)) (<= A -7000000.0)))
   (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
   (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
	double tmp;
	if ((A <= -5.8e+229) || (!(A <= -2.5e+203) && (A <= -7000000.0))) {
		tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
	} else {
		tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if ((A <= -5.8e+229) || (!(A <= -2.5e+203) && (A <= -7000000.0))) {
		tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
	} else {
		tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if (A <= -5.8e+229) or (not (A <= -2.5e+203) and (A <= -7000000.0)):
		tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
	else:
		tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi)
	return tmp
function code(A, B, C)
	tmp = 0.0
	if ((A <= -5.8e+229) || (!(A <= -2.5e+203) && (A <= -7000000.0)))
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi));
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if ((A <= -5.8e+229) || (~((A <= -2.5e+203)) && (A <= -7000000.0)))
		tmp = 180.0 * (atan(((B * 0.5) / A)) / pi);
	else
		tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[Or[LessEqual[A, -5.8e+229], And[N[Not[LessEqual[A, -2.5e+203]], $MachinePrecision], LessEqual[A, -7000000.0]]], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.8 \cdot 10^{+229} \lor \neg \left(A \leq -2.5 \cdot 10^{+203}\right) \land A \leq -7000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -5.79999999999999963e229 or -2.49999999999999997e203 < A < -7e6

    1. Initial program 20.6%

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

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

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

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

    if -5.79999999999999963e229 < A < -2.49999999999999997e203 or -7e6 < A

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.8 \cdot 10^{+229} \lor \neg \left(A \leq -2.5 \cdot 10^{+203}\right) \land A \leq -7000000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 77.9% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 20.7%

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

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

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

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

    if -1.35e7 < A < 1.05e-33

    1. Initial program 49.2%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Applied egg-rr80.7%

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

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

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

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

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

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

    if 1.05e-33 < A

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{180 \cdot \left(-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)\right)}{\pi}} \]
    8. Step-by-step derivation
      1. distribute-rgt-neg-out88.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 75.4% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 20.7%

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

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

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

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

    if -1.35e7 < A < 1.25e-17

    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. Add Preprocessing
    3. Taylor expanded in A around 0 47.1%

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

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

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

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

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

    if 1.25e-17 < A

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 78.0% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 20.7%

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

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

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

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

    if -1.35e7 < A < 2.25000000000000012e-36

    1. Initial program 49.2%

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

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

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

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

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

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

    if 2.25000000000000012e-36 < A

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{180 \cdot \left(-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)\right)}{\pi}} \]
    8. Step-by-step derivation
      1. distribute-rgt-neg-out88.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 80.8% accurate, 1.9× speedup?

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

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


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

    1. Initial program 20.7%

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

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

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

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

    if -8.5e6 < A

    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. Simplified87.0%

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

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

    Alternative 8: 44.7% accurate, 3.2× speedup?

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

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

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

      if -8.1999999999999995e-63 < B < 9.5000000000000007e-226

      1. Initial program 51.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 9.5000000000000007e-226 < B < 2.69999999999999988e-179

      1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.69999999999999988e-179 < B < 1.04999999999999995e71

      1. Initial program 48.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.04999999999999995e71 < B

      1. Initial program 36.3%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -8.2 \cdot 10^{-63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{-226}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-179}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{+71}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 44.9% accurate, 3.2× speedup?

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

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

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

      if -3.09999999999999999e-59 < B < 2.5e-264

      1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.5e-264 < B < 2.3500000000000001e-184

      1. Initial program 65.4%

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

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

      if 2.3500000000000001e-184 < B < 5.59999999999999964e69

      1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.59999999999999964e69 < B

      1. Initial program 36.3%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.1 \cdot 10^{-59}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-264}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 2.35 \cdot 10^{-184}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.6 \cdot 10^{+69}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 49.6% accurate, 3.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -1.85 \cdot 10^{-96}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -3.2 \cdot 10^{-134}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.1 \cdot 10^{-305}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 3.7 \cdot 10^{-30}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\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 -1.85e-96)
       (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
       (if (<= A -3.2e-134)
         (* 180.0 (/ (atan 1.0) PI))
         (if (<= A 1.1e-305)
           (* 180.0 (/ (atan -1.0) PI))
           (if (<= A 3.7e-30)
             (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
             (* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -1.85e-96) {
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
    	} else if (A <= -3.2e-134) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (A <= 1.1e-305) {
    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
    	} else if (A <= 3.7e-30) {
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / ((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 <= -1.85e-96) {
    		tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
    	} else if (A <= -3.2e-134) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (A <= 1.1e-305) {
    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
    	} else if (A <= 3.7e-30) {
    		tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / 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 <= -1.85e-96:
    		tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
    	elif A <= -3.2e-134:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif A <= 1.1e-305:
    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
    	elif A <= 3.7e-30:
    		tmp = 180.0 * (math.atan((-0.5 * (B / C))) / 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 <= -1.85e-96)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi));
    	elseif (A <= -3.2e-134)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (A <= 1.1e-305)
    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
    	elseif (A <= 3.7e-30)
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / 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 <= -1.85e-96)
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / pi);
    	elseif (A <= -3.2e-134)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (A <= 1.1e-305)
    		tmp = 180.0 * (atan(-1.0) / pi);
    	elseif (A <= 3.7e-30)
    		tmp = 180.0 * (atan((-0.5 * (B / C))) / pi);
    	else
    		tmp = 180.0 * (atan(((A / B) * -2.0)) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[A, -1.85e-96], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.2e-134], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.1e-305], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.7e-30], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $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 -1.85 \cdot 10^{-96}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -3.2 \cdot 10^{-134}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;A \leq 1.1 \cdot 10^{-305}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
    
    \mathbf{elif}\;A \leq 3.7 \cdot 10^{-30}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\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 5 regimes
    2. if A < -1.84999999999999993e-96

      1. Initial program 24.3%

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

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

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

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

      if -1.84999999999999993e-96 < A < -3.2000000000000001e-134

      1. Initial program 42.0%

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

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

      if -3.2000000000000001e-134 < A < 1.09999999999999998e-305

      1. Initial program 63.5%

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

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

      if 1.09999999999999998e-305 < A < 3.7000000000000003e-30

      1. Initial program 45.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.7000000000000003e-30 < A

      1. Initial program 73.4%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.85 \cdot 10^{-96}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -3.2 \cdot 10^{-134}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.1 \cdot 10^{-305}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{elif}\;A \leq 3.7 \cdot 10^{-30}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 52.8% accurate, 3.2× speedup?

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

      1. Initial program 24.3%

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

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

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

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

      if -1.84999999999999993e-96 < A < -3.6999999999999997e-135

      1. Initial program 42.0%

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

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

      if -3.6999999999999997e-135 < A < 3.8e-306

      1. Initial program 63.5%

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

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

      if 3.8e-306 < A < 1.5499999999999999e-88

      1. Initial program 46.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.5499999999999999e-88 < A

      1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{-180 \cdot \tan^{-1} \left(1 - \color{blue}{-1 \cdot \frac{A}{B}}\right)}{\pi} \]
        11. cancel-sign-sub-inv74.7%

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

          \[\leadsto \frac{-180 \cdot \tan^{-1} \left(1 + \color{blue}{1} \cdot \frac{A}{B}\right)}{\pi} \]
        13. *-lft-identity74.7%

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

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

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

    Alternative 12: 44.3% accurate, 3.4× speedup?

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

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

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

      if -3.29999999999999996e-61 < B < 9.9999999999999996e-226 or 1.85000000000000008e-180 < B < 3.25e-44

      1. Initial program 47.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 9.9999999999999996e-226 < B < 1.85000000000000008e-180

      1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.25e-44 < B

      1. Initial program 43.8%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.3 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 10^{-225}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{-180}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.25 \cdot 10^{-44}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 61.7% accurate, 3.6× speedup?

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

      1. Initial program 21.9%

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

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

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

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

      if -0.012500000000000001 < A

      1. Initial program 58.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 14: 44.0% accurate, 3.6× speedup?

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

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

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

      if -4.6e-63 < B < 2.20000000000000005e-42

      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. Add Preprocessing
      3. Step-by-step derivation
        1. +-commutative51.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.20000000000000005e-42 < B

      1. Initial program 43.8%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.6 \cdot 10^{-63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-42}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 15: 28.6% accurate, 3.8× speedup?

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

      1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.25e-44 < B

      1. Initial program 43.8%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.25 \cdot 10^{-44}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 16: 21.2% accurate, 4.0× speedup?

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

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

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

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

    Reproduce

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