ABCF->ab-angle angle

Percentage Accurate: 53.5% → 88.4%
Time: 18.0s
Alternatives: 17
Speedup: 2.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 53.5% accurate, 1.0× speedup?

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

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

Alternative 1: 88.4% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

    if -4.00000000000000002e-41 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0

    1. Initial program 27.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. Simplified19.5%

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

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

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

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

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

Alternative 2: 81.9% accurate, 1.6× speedup?

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

\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.7999999999999999e30

    1. Initial program 20.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. Simplified30.9%

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

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

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

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

    if -8.7999999999999999e30 < 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. Step-by-step derivation
      1. Simplified86.8%

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

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

    Alternative 3: 81.9% accurate, 1.6× speedup?

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

      1. Initial program 20.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. Simplified30.9%

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

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

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

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

      if -8.7999999999999999e30 < 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. Simplified86.8%

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

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

    Alternative 4: 76.3% accurate, 1.7× speedup?

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

      1. Initial program 20.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. Simplified30.9%

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

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

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

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

      if -8.7999999999999999e30 < A < 4.4999999999999998e-7

      1. Initial program 66.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. Simplified66.1%

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

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

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

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

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

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

      if 4.4999999999999998e-7 < A

      1. Initial program 70.6%

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

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

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

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

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

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

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

    Alternative 5: 76.3% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -8.8 \cdot 10^{+30}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{elif}\;A \leq 6.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\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 -8.8e+30)
       (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
       (if (<= A 6.5e-8)
         (* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
         (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -8.8e+30) {
    		tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
    	} else if (A <= 6.5e-8) {
    		tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
    	} 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 <= -8.8e+30) {
    		tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
    	} else if (A <= 6.5e-8) {
    		tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
    	} else {
    		tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	tmp = 0
    	if A <= -8.8e+30:
    		tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A)))
    	elif A <= 6.5e-8:
    		tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B))
    	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 <= -8.8e+30)
    		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A))));
    	elseif (A <= 6.5e-8)
    		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B)));
    	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 <= -8.8e+30)
    		tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A)));
    	elseif (A <= 6.5e-8)
    		tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B));
    	else
    		tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[A, -8.8e+30], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.5e-8], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $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 -8.8 \cdot 10^{+30}:\\
    \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
    
    \mathbf{elif}\;A \leq 6.5 \cdot 10^{-8}:\\
    \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\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 3 regimes
    2. if A < -8.7999999999999999e30

      1. Initial program 20.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. Simplified30.9%

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

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

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

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

      if -8.7999999999999999e30 < A < 6.49999999999999997e-8

      1. Initial program 66.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. Simplified84.1%

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.49999999999999997e-8 < A

      1. Initial program 70.6%

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

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

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

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

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

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

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

    Alternative 6: 57.6% accurate, 2.4× speedup?

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

      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. Simplified60.2%

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \left(A + \sqrt{{\left(A - C\right)}^{2} + B \cdot B}\right)\right)\right)}{\pi}} \]
      3. Taylor expanded in B around -inf 82.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+82.9%

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

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

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

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

      if -1.17999999999999993e-107 < B < 1.75e-289 or 7.20000000000000011e81 < B < 6.20000000000000033e104

      1. Initial program 52.9%

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

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right)} \]
      3. Step-by-step derivation
        1. clear-num57.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.75e-289 < B < 7.20000000000000011e81 or 6.20000000000000033e104 < B

      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-*r/60.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.18 \cdot 10^{-107}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.75 \cdot 10^{-289} \lor \neg \left(B \leq 7.2 \cdot 10^{+81}\right) \land B \leq 6.2 \cdot 10^{+104}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \end{array} \]

    Alternative 7: 60.9% accurate, 2.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -2.55 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 8.6 \cdot 10^{-290} \lor \neg \left(B \leq 2.8 \cdot 10^{+81}\right) \land B \leq 9.8 \cdot 10^{+101}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (if (<= B -2.55e-256)
       (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
       (if (or (<= B 8.6e-290) (and (not (<= B 2.8e+81)) (<= B 9.8e+101)))
         (* 180.0 (/ (atan (* B (/ 0.5 (- A C)))) PI))
         (/ (* 180.0 (atan (/ (- C B) B))) PI))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (B <= -2.55e-256) {
    		tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
    	} else if ((B <= 8.6e-290) || (!(B <= 2.8e+81) && (B <= 9.8e+101))) {
    		tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / ((double) M_PI));
    	} else {
    		tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double tmp;
    	if (B <= -2.55e-256) {
    		tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
    	} else if ((B <= 8.6e-290) || (!(B <= 2.8e+81) && (B <= 9.8e+101))) {
    		tmp = 180.0 * (Math.atan((B * (0.5 / (A - C)))) / Math.PI);
    	} else {
    		tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	tmp = 0
    	if B <= -2.55e-256:
    		tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi)
    	elif (B <= 8.6e-290) or (not (B <= 2.8e+81) and (B <= 9.8e+101)):
    		tmp = 180.0 * (math.atan((B * (0.5 / (A - C)))) / math.pi)
    	else:
    		tmp = (180.0 * math.atan(((C - B) / B))) / math.pi
    	return tmp
    
    function code(A, B, C)
    	tmp = 0.0
    	if (B <= -2.55e-256)
    		tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi));
    	elseif ((B <= 8.6e-290) || (!(B <= 2.8e+81) && (B <= 9.8e+101)))
    		tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) / pi));
    	else
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi);
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	tmp = 0.0;
    	if (B <= -2.55e-256)
    		tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
    	elseif ((B <= 8.6e-290) || (~((B <= 2.8e+81)) && (B <= 9.8e+101)))
    		tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / pi);
    	else
    		tmp = (180.0 * atan(((C - B) / B))) / pi;
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[B, -2.55e-256], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 8.6e-290], And[N[Not[LessEqual[B, 2.8e+81]], $MachinePrecision], LessEqual[B, 9.8e+101]]], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;B \leq -2.55 \cdot 10^{-256}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
    
    \mathbf{elif}\;B \leq 8.6 \cdot 10^{-290} \lor \neg \left(B \leq 2.8 \cdot 10^{+81}\right) \land B \leq 9.8 \cdot 10^{+101}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if B < -2.55000000000000005e-256

      1. Initial program 60.1%

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

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

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

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

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

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

      if -2.55000000000000005e-256 < B < 8.6000000000000004e-290 or 2.79999999999999995e81 < B < 9.79999999999999965e101

      1. Initial program 45.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 8.6000000000000004e-290 < B < 2.79999999999999995e81 or 9.79999999999999965e101 < B

      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-*r/60.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.55 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 8.6 \cdot 10^{-290} \lor \neg \left(B \leq 2.8 \cdot 10^{+81}\right) \land B \leq 9.8 \cdot 10^{+101}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \end{array} \]

    Alternative 8: 45.6% accurate, 2.4× speedup?

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

      1. Initial program 58.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. Simplified58.3%

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

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

      if -5.3999999999999998e-28 < B < -5.9999999999999996e-256 or 4.5e-290 < B < 2.19999999999999982e-217

      1. Initial program 67.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. Simplified65.4%

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

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

      if -5.9999999999999996e-256 < B < 4.5e-290

      1. Initial program 49.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. Simplified44.7%

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

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

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

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

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

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

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

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

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

      if 2.19999999999999982e-217 < B

      1. Initial program 55.1%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.4 \cdot 10^{-28}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -6 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.5 \cdot 10^{-290}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-217}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

    Alternative 9: 50.1% accurate, 2.4× speedup?

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

      1. Initial program 60.1%

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

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

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

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

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

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

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

      if -5.20000000000000002e-259 < B < 1.12e-290

      1. Initial program 49.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. Simplified44.7%

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

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

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

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

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

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

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

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

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

      if 1.12e-290 < B < 2.19999999999999982e-217

      1. Initial program 89.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. Simplified78.5%

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

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

      if 2.19999999999999982e-217 < B

      1. Initial program 55.1%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.2 \cdot 10^{-259}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.12 \cdot 10^{-290}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-217}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

    Alternative 10: 51.7% accurate, 2.4× speedup?

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

      1. Initial program 60.1%

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

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

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

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

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

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

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

      if -1.3e-256 < B < -1.5500000000000001e-281

      1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

      if -1.5500000000000001e-281 < B < 9e-47

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

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

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

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

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

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

      if 9e-47 < B

      1. Initial program 52.2%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.3 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.55 \cdot 10^{-281}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9 \cdot 10^{-47}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]

    Alternative 11: 66.1% accurate, 2.4× speedup?

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

      1. Initial program 60.1%

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

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

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

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

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

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

      if -1.2000000000000001e-258 < B < -2.0999999999999999e-281

      1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.0999999999999999e-281 < B

      1. Initial program 58.2%

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

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

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

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

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

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

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

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

    Alternative 12: 66.2% accurate, 2.4× speedup?

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

      1. Initial program 60.1%

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

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

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

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

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

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

      if -4.20000000000000005e-256 < B < -1.49999999999999987e-281

      1. Initial program 34.6%

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

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

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

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

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

      if -1.49999999999999987e-281 < B

      1. Initial program 58.2%

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.2 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.5 \cdot 10^{-281}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]

    Alternative 13: 66.2% accurate, 2.4× speedup?

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

      1. Initial program 60.1%

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

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

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

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

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

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

      if -1.5199999999999999e-257 < B < -1.34999999999999995e-281

      1. Initial program 34.6%

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

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

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

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

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

      if -1.34999999999999995e-281 < B

      1. Initial program 58.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.52 \cdot 10^{-257}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.35 \cdot 10^{-281}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\ \end{array} \]

    Alternative 14: 55.9% accurate, 2.4× speedup?

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

      1. Initial program 60.1%

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

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

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

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

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

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

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

      if -1.79999999999999989e-258 < B < 9.6000000000000002e-290

      1. Initial program 49.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. Simplified44.7%

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

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

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

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

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

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

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

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

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

      if 9.6000000000000002e-290 < B

      1. Initial program 58.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.8 \cdot 10^{-258}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9.6 \cdot 10^{-290}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\ \end{array} \]

    Alternative 15: 44.4% accurate, 2.5× speedup?

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

      1. Initial program 58.5%

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

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

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

      if -3.90000000000000015e-144 < B < 8.50000000000000018e-227

      1. Initial program 63.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. Simplified58.9%

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

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

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

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

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

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

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

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

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

      if 8.50000000000000018e-227 < B

      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. Simplified56.1%

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

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

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

    Alternative 16: 40.1% accurate, 2.5× speedup?

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

      1. Initial program 59.9%

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

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

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

      if -9.999999999999969e-311 < B

      1. Initial program 56.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. Simplified55.6%

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

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

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

    Alternative 17: 20.6% accurate, 2.5× speedup?

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

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

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

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

    Reproduce

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