ABCF->ab-angle angle

Percentage Accurate: 54.2% → 81.9%
Time: 16.5s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 54.2% accurate, 1.0× speedup?

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

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

Alternative 1: 81.9% accurate, 1.9× speedup?

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

    1. Initial program 4.4%

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

      \[\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. associate-*r/87.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7500000000000001e151 < A

    1. Initial program 60.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.75 \cdot 10^{+151}:\\ \;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B + C \cdot \frac{B}{A}}{A}\right) \cdot \frac{180}{\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 2: 78.2% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 11.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 86.9%

      \[\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. associate-*r/86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.80000000000000013e141 < A < 4.10000000000000002e-141

    1. Initial program 50.3%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Taylor expanded in A around 0 50.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. +-commutative50.6%

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

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

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

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

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

    if 4.10000000000000002e-141 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 73.5% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 11.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 86.9%

      \[\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. associate-*r/86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.10000000000000022e141 < A < 7.0000000000000004e-157

    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 A around 0 50.2%

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

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

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

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

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

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

    if 7.0000000000000004e-157 < A

    1. Initial program 74.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. *-commutative74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 81.6% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 17.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 -inf 79.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. associate-*r/79.2%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-\left(-0.5 \cdot B + -0.5 \cdot \frac{B \cdot C}{A}\right)}}{A}\right)}{\pi} \]
      3. distribute-lft-out79.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. *-commutative79.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.9000000000000002e74 < A

    1. Initial program 62.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. Step-by-step derivation
      1. Simplified81.4%

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

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

    Alternative 5: 61.3% accurate, 3.5× speedup?

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

      1. Initial program 26.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 65.3%

        \[\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. associate-*r/65.3%

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

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

          \[\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. *-commutative65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.14999999999999997e-141 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 61.2% accurate, 3.5× speedup?

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

      1. Initial program 26.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 65.3%

        \[\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. associate-*r/65.3%

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

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

          \[\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. *-commutative65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.1000000000000001e-142 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 60.8% accurate, 3.5× speedup?

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

      1. Initial program 26.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 65.3%

        \[\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. associate-*r/65.3%

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

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

          \[\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. *-commutative65.3%

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

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

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

      if -1.6999999999999999e-141 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 49.3% accurate, 3.5× speedup?

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

      1. Initial program 35.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 62.0%

        \[\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. associate-*r/62.0%

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

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

          \[\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. *-commutative62.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -8.19999999999999975e-274 < A < 1.44999999999999986e-51

      1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.44999999999999986e-51 < A

      1. Initial program 80.0%

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

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

          \[\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. +-commutative80.0%

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

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

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

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

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

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

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

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

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

    Alternative 9: 49.5% accurate, 3.5× speedup?

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

      1. Initial program 35.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 62.0%

        \[\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. associate-*r/62.0%

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

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

          \[\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. *-commutative62.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.25000000000000009e-286 < A < 4.4e-51

      1. Initial program 53.7%

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

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

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

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

      if 4.4e-51 < A

      1. Initial program 80.0%

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

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

          \[\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. +-commutative80.0%

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

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

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

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

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

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

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

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

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

    Alternative 10: 49.5% accurate, 3.5× speedup?

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

      1. Initial program 35.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 62.0%

        \[\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. associate-*r/62.0%

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

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

          \[\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. *-commutative62.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.3999999999999997e-285 < A < 1.31999999999999998e-51

      1. Initial program 53.7%

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

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

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

      if 1.31999999999999998e-51 < A

      1. Initial program 80.0%

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

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

          \[\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. +-commutative80.0%

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

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

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

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

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

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

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

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

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

    Alternative 11: 49.5% accurate, 3.5× speedup?

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

      1. Initial program 35.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 61.7%

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

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

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

      if -9.89999999999999979e-287 < A < 7.0000000000000001e-52

      1. Initial program 53.7%

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

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

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

      if 7.0000000000000001e-52 < A

      1. Initial program 80.0%

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

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

          \[\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. +-commutative80.0%

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

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

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

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

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

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

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

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

    Alternative 12: 45.2% accurate, 3.5× speedup?

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

      1. Initial program 45.7%

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

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

      if -1e71 < B < 5.79999999999999981e86

      1. Initial program 56.0%

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

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

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

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

      if 5.79999999999999981e86 < B

      1. Initial program 41.7%

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

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

    Alternative 13: 46.2% accurate, 3.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1.65 \cdot 10^{+69}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{-55}:\\ \;\;\;\;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 -1.65e+69)
       (* 180.0 (/ (atan 1.0) PI))
       (if (<= B 4.4e-55)
         (* 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 <= -1.65e+69) {
    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
    	} else if (B <= 4.4e-55) {
    		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 <= -1.65e+69) {
    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
    	} else if (B <= 4.4e-55) {
    		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 <= -1.65e+69:
    		tmp = 180.0 * (math.atan(1.0) / math.pi)
    	elif B <= 4.4e-55:
    		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 <= -1.65e+69)
    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
    	elseif (B <= 4.4e-55)
    		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 <= -1.65e+69)
    		tmp = 180.0 * (atan(1.0) / pi);
    	elseif (B <= 4.4e-55)
    		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, -1.65e+69], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.4e-55], 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 -1.65 \cdot 10^{+69}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
    
    \mathbf{elif}\;B \leq 4.4 \cdot 10^{-55}:\\
    \;\;\;\;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 3 regimes
    2. if B < -1.6499999999999999e69

      1. Initial program 44.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 66.6%

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

      if -1.6499999999999999e69 < B < 4.3999999999999999e-55

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

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

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

      if 4.3999999999999999e-55 < B

      1. Initial program 53.2%

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

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

    Alternative 14: 60.2% accurate, 3.6× speedup?

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

      1. Initial program 26.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 65.3%

        \[\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. associate-*r/65.3%

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

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

          \[\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. *-commutative65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.5e-141 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 15: 60.2% accurate, 3.6× speedup?

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

      1. Initial program 26.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 65.3%

        \[\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. associate-*r/65.3%

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

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

          \[\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. *-commutative65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.5e-141 < A

      1. Initial program 67.7%

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

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

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

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

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

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

    Alternative 16: 44.5% accurate, 3.6× speedup?

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

      1. Initial program 49.1%

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

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

      if -1.24999999999999991e-105 < B < 3.9999999999999999e-197

      1. Initial program 55.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 inf 36.4%

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

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

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

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

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

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

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

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

      if 3.9999999999999999e-197 < B

      1. Initial program 51.6%

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

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

    Alternative 17: 28.9% accurate, 3.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 4 \cdot 10^{-197}:\\ \;\;\;\;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 4e-197) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (B <= 4e-197) {
    		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 <= 4e-197) {
    		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 <= 4e-197:
    		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 <= 4e-197)
    		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 <= 4e-197)
    		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, 4e-197], 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 \cdot 10^{-197}:\\
    \;\;\;\;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.9999999999999999e-197

      1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

      if 3.9999999999999999e-197 < B

      1. Initial program 51.6%

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

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

    Alternative 18: 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 51.7%

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

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

    Reproduce

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