ABCF->ab-angle angle

Percentage Accurate: 53.4% → 89.1%
Time: 15.5s
Alternatives: 21
Speedup: 3.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 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.4% 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: 89.1% 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 -0.5 \lor \neg \left(t\_0 \leq 0\right):\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\ \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 -0.5) (not (<= t_0 0.0)))
     (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B))))
     (* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI)))))
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 <= -0.5) || !(t_0 <= 0.0)) {
		tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
	} else {
		tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / ((double) M_PI));
	}
	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 <= -0.5) || !(t_0 <= 0.0)) {
		tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
	} else {
		tmp = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
	}
	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 <= -0.5) or not (t_0 <= 0.0):
		tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B)))
	else:
		tmp = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi)
	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 <= -0.5) || !(t_0 <= 0.0))
		tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))));
	else
		tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / pi));
	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 <= -0.5) || ~((t_0 <= 0.0)))
		tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B)));
	else
		tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / pi);
	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, -0.5], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $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 -0.5 \lor \neg \left(t\_0 \leq 0\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\

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


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

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 24.8%

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

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

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

    \[\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 -0.5 \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}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 76.6% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -2.8000000000000001e-76

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

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

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

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

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

    if -2.8000000000000001e-76 < A < 2.79999999999999995e-22

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.79999999999999995e-22 < A

    1. Initial program 79.5%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 74.0% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -3.3999999999999999e-76

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

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

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

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

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

    if -3.3999999999999999e-76 < A < 3.1999999999999999e-18

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.1999999999999999e-18 < A

    1. Initial program 80.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. Simplified94.4%

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

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

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

Alternative 4: 73.9% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -4.20000000000000031e-77

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

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

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

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

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

    if -4.20000000000000031e-77 < A < 5.4000000000000002e-17

    1. Initial program 67.0%

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

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

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

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

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

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

    if 5.4000000000000002e-17 < A

    1. Initial program 80.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. Simplified94.4%

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

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

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

Alternative 5: 79.5% accurate, 1.9× speedup?

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

\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 < -1.2499999999999999e-76

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

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

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

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

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

    if -1.2499999999999999e-76 < A

    1. Initial program 71.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. Simplified88.5%

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

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

Alternative 6: 62.2% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\ t_1 := t\_0 \cdot \frac{180}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -6 \cdot 10^{-87}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;B \leq -1.7 \cdot 10^{-185}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{-274}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;B \leq 3.6 \cdot 10^{-119}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 1.95 \cdot 10^{-32} \lor \neg \left(B \leq 950\right):\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot t\_0}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (atan (* -0.5 (/ B (- C A)))))
        (t_1 (* t_0 (/ 180.0 PI)))
        (t_2 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
   (if (<= B -6e-87)
     t_2
     (if (<= B -1.7e-185)
       t_1
       (if (<= B 9.5e-274)
         t_2
         (if (<= B 3.6e-119)
           t_1
           (if (or (<= B 1.95e-32) (not (<= B 950.0)))
             (/ 180.0 (/ PI (atan (/ (- C B) B))))
             (/ (* 180.0 t_0) PI))))))))
double code(double A, double B, double C) {
	double t_0 = atan((-0.5 * (B / (C - A))));
	double t_1 = t_0 * (180.0 / ((double) M_PI));
	double t_2 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
	double tmp;
	if (B <= -6e-87) {
		tmp = t_2;
	} else if (B <= -1.7e-185) {
		tmp = t_1;
	} else if (B <= 9.5e-274) {
		tmp = t_2;
	} else if (B <= 3.6e-119) {
		tmp = t_1;
	} else if ((B <= 1.95e-32) || !(B <= 950.0)) {
		tmp = 180.0 / (((double) M_PI) / atan(((C - B) / B)));
	} else {
		tmp = (180.0 * t_0) / ((double) M_PI);
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = Math.atan((-0.5 * (B / (C - A))));
	double t_1 = t_0 * (180.0 / Math.PI);
	double t_2 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
	double tmp;
	if (B <= -6e-87) {
		tmp = t_2;
	} else if (B <= -1.7e-185) {
		tmp = t_1;
	} else if (B <= 9.5e-274) {
		tmp = t_2;
	} else if (B <= 3.6e-119) {
		tmp = t_1;
	} else if ((B <= 1.95e-32) || !(B <= 950.0)) {
		tmp = 180.0 / (Math.PI / Math.atan(((C - B) / B)));
	} else {
		tmp = (180.0 * t_0) / Math.PI;
	}
	return tmp;
}
def code(A, B, C):
	t_0 = math.atan((-0.5 * (B / (C - A))))
	t_1 = t_0 * (180.0 / math.pi)
	t_2 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi)
	tmp = 0
	if B <= -6e-87:
		tmp = t_2
	elif B <= -1.7e-185:
		tmp = t_1
	elif B <= 9.5e-274:
		tmp = t_2
	elif B <= 3.6e-119:
		tmp = t_1
	elif (B <= 1.95e-32) or not (B <= 950.0):
		tmp = 180.0 / (math.pi / math.atan(((C - B) / B)))
	else:
		tmp = (180.0 * t_0) / math.pi
	return tmp
function code(A, B, C)
	t_0 = atan(Float64(-0.5 * Float64(B / Float64(C - A))))
	t_1 = Float64(t_0 * Float64(180.0 / pi))
	t_2 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi))
	tmp = 0.0
	if (B <= -6e-87)
		tmp = t_2;
	elseif (B <= -1.7e-185)
		tmp = t_1;
	elseif (B <= 9.5e-274)
		tmp = t_2;
	elseif (B <= 3.6e-119)
		tmp = t_1;
	elseif ((B <= 1.95e-32) || !(B <= 950.0))
		tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - B) / B))));
	else
		tmp = Float64(Float64(180.0 * t_0) / pi);
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = atan((-0.5 * (B / (C - A))));
	t_1 = t_0 * (180.0 / pi);
	t_2 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
	tmp = 0.0;
	if (B <= -6e-87)
		tmp = t_2;
	elseif (B <= -1.7e-185)
		tmp = t_1;
	elseif (B <= 9.5e-274)
		tmp = t_2;
	elseif (B <= 3.6e-119)
		tmp = t_1;
	elseif ((B <= 1.95e-32) || ~((B <= 950.0)))
		tmp = 180.0 / (pi / atan(((C - B) / B)));
	else
		tmp = (180.0 * t_0) / pi;
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6e-87], t$95$2, If[LessEqual[B, -1.7e-185], t$95$1, If[LessEqual[B, 9.5e-274], t$95$2, If[LessEqual[B, 3.6e-119], t$95$1, If[Or[LessEqual[B, 1.95e-32], N[Not[LessEqual[B, 950.0]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;B \leq -1.7 \cdot 10^{-185}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;B \leq 9.5 \cdot 10^{-274}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;B \leq 3.6 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;B \leq 1.95 \cdot 10^{-32} \lor \neg \left(B \leq 950\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot t\_0}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < -6.00000000000000033e-87 or -1.6999999999999999e-185 < B < 9.5000000000000009e-274

    1. Initial program 69.0%

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

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

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

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

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

    if -6.00000000000000033e-87 < B < -1.6999999999999999e-185 or 9.5000000000000009e-274 < B < 3.6e-119

    1. Initial program 41.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. Simplified50.2%

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

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

    if 3.6e-119 < B < 1.9500000000000001e-32 or 950 < B

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9500000000000001e-32 < B < 950

    1. Initial program 19.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. Simplified20.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6 \cdot 10^{-87}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.7 \cdot 10^{-185}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{-274}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.6 \cdot 10^{-119}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 1.95 \cdot 10^{-32} \lor \neg \left(B \leq 950\right):\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 62.2% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -6.6 \cdot 10^{-88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -1.3 \cdot 10^{-183}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.02 \cdot 10^{-273}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-117} \lor \neg \left(B \leq 4.9 \cdot 10^{-33}\right) \land B \leq 700:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI)))
        (t_1 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
   (if (<= B -6.6e-88)
     t_1
     (if (<= B -1.3e-183)
       t_0
       (if (<= B 1.02e-273)
         t_1
         (if (or (<= B 2.1e-117) (and (not (<= B 4.9e-33)) (<= B 700.0)))
           t_0
           (/ 180.0 (/ PI (atan (/ (- C B) B))))))))))
double code(double A, double B, double C) {
	double t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / ((double) M_PI));
	double t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
	double tmp;
	if (B <= -6.6e-88) {
		tmp = t_1;
	} else if (B <= -1.3e-183) {
		tmp = t_0;
	} else if (B <= 1.02e-273) {
		tmp = t_1;
	} else if ((B <= 2.1e-117) || (!(B <= 4.9e-33) && (B <= 700.0))) {
		tmp = t_0;
	} else {
		tmp = 180.0 / (((double) M_PI) / atan(((C - B) / B)));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
	double t_1 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
	double tmp;
	if (B <= -6.6e-88) {
		tmp = t_1;
	} else if (B <= -1.3e-183) {
		tmp = t_0;
	} else if (B <= 1.02e-273) {
		tmp = t_1;
	} else if ((B <= 2.1e-117) || (!(B <= 4.9e-33) && (B <= 700.0))) {
		tmp = t_0;
	} else {
		tmp = 180.0 / (Math.PI / Math.atan(((C - B) / B)));
	}
	return tmp;
}
def code(A, B, C):
	t_0 = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi)
	t_1 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi)
	tmp = 0
	if B <= -6.6e-88:
		tmp = t_1
	elif B <= -1.3e-183:
		tmp = t_0
	elif B <= 1.02e-273:
		tmp = t_1
	elif (B <= 2.1e-117) or (not (B <= 4.9e-33) and (B <= 700.0)):
		tmp = t_0
	else:
		tmp = 180.0 / (math.pi / math.atan(((C - B) / B)))
	return tmp
function code(A, B, C)
	t_0 = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / pi))
	t_1 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi))
	tmp = 0.0
	if (B <= -6.6e-88)
		tmp = t_1;
	elseif (B <= -1.3e-183)
		tmp = t_0;
	elseif (B <= 1.02e-273)
		tmp = t_1;
	elseif ((B <= 2.1e-117) || (!(B <= 4.9e-33) && (B <= 700.0)))
		tmp = t_0;
	else
		tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - B) / B))));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / pi);
	t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
	tmp = 0.0;
	if (B <= -6.6e-88)
		tmp = t_1;
	elseif (B <= -1.3e-183)
		tmp = t_0;
	elseif (B <= 1.02e-273)
		tmp = t_1;
	elseif ((B <= 2.1e-117) || (~((B <= 4.9e-33)) && (B <= 700.0)))
		tmp = t_0;
	else
		tmp = 180.0 / (pi / atan(((C - B) / B)));
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6.6e-88], t$95$1, If[LessEqual[B, -1.3e-183], t$95$0, If[LessEqual[B, 1.02e-273], t$95$1, If[Or[LessEqual[B, 2.1e-117], And[N[Not[LessEqual[B, 4.9e-33]], $MachinePrecision], LessEqual[B, 700.0]]], t$95$0, N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -6.6 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;B \leq -1.3 \cdot 10^{-183}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;B \leq 1.02 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;B \leq 2.1 \cdot 10^{-117} \lor \neg \left(B \leq 4.9 \cdot 10^{-33}\right) \land B \leq 700:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -6.59999999999999987e-88 or -1.2999999999999999e-183 < B < 1.0200000000000001e-273

    1. Initial program 69.0%

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

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

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

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

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

    if -6.59999999999999987e-88 < B < -1.2999999999999999e-183 or 1.0200000000000001e-273 < B < 2.0999999999999999e-117 or 4.8999999999999998e-33 < B < 700

    1. Initial program 39.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. Simplified47.5%

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

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

    if 2.0999999999999999e-117 < B < 4.8999999999999998e-33 or 700 < B

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.6 \cdot 10^{-88}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.3 \cdot 10^{-183}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{elif}\;B \leq 1.02 \cdot 10^{-273}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-117} \lor \neg \left(B \leq 4.9 \cdot 10^{-33}\right) \land B \leq 700:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 47.0% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.1 \cdot 10^{-33}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.45 \cdot 10^{-93}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-137}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -4.5 \cdot 10^{-238}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{-51}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 28500:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))
        (t_1 (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))))
   (if (<= B -1.1e-33)
     (* 180.0 (/ (atan 1.0) PI))
     (if (<= B -1.45e-93)
       t_0
       (if (<= B -2.05e-137)
         t_1
         (if (<= B -4.5e-238)
           t_0
           (if (<= B 2.3e-51)
             t_1
             (if (<= B 28500.0) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
	double t_1 = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
	double tmp;
	if (B <= -1.1e-33) {
		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
	} else if (B <= -1.45e-93) {
		tmp = t_0;
	} else if (B <= -2.05e-137) {
		tmp = t_1;
	} else if (B <= -4.5e-238) {
		tmp = t_0;
	} else if (B <= 2.3e-51) {
		tmp = t_1;
	} else if (B <= 28500.0) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
	double t_1 = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
	double tmp;
	if (B <= -1.1e-33) {
		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
	} else if (B <= -1.45e-93) {
		tmp = t_0;
	} else if (B <= -2.05e-137) {
		tmp = t_1;
	} else if (B <= -4.5e-238) {
		tmp = t_0;
	} else if (B <= 2.3e-51) {
		tmp = t_1;
	} else if (B <= 28500.0) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
	t_1 = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
	tmp = 0
	if B <= -1.1e-33:
		tmp = 180.0 * (math.atan(1.0) / math.pi)
	elif B <= -1.45e-93:
		tmp = t_0
	elif B <= -2.05e-137:
		tmp = t_1
	elif B <= -4.5e-238:
		tmp = t_0
	elif B <= 2.3e-51:
		tmp = t_1
	elif B <= 28500.0:
		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(-0.5 * Float64(B / C))) / pi))
	t_1 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi))
	tmp = 0.0
	if (B <= -1.1e-33)
		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
	elseif (B <= -1.45e-93)
		tmp = t_0;
	elseif (B <= -2.05e-137)
		tmp = t_1;
	elseif (B <= -4.5e-238)
		tmp = t_0;
	elseif (B <= 2.3e-51)
		tmp = t_1;
	elseif (B <= 28500.0)
		tmp = t_0;
	else
		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan((-0.5 * (B / C))) / pi);
	t_1 = 180.0 * (atan((0.5 * (B / A))) / pi);
	tmp = 0.0;
	if (B <= -1.1e-33)
		tmp = 180.0 * (atan(1.0) / pi);
	elseif (B <= -1.45e-93)
		tmp = t_0;
	elseif (B <= -2.05e-137)
		tmp = t_1;
	elseif (B <= -4.5e-238)
		tmp = t_0;
	elseif (B <= 2.3e-51)
		tmp = t_1;
	elseif (B <= 28500.0)
		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[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.1e-33], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.45e-93], t$95$0, If[LessEqual[B, -2.05e-137], t$95$1, If[LessEqual[B, -4.5e-238], t$95$0, If[LessEqual[B, 2.3e-51], t$95$1, If[LessEqual[B, 28500.0], 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(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.1 \cdot 10^{-33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;B \leq -1.45 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;B \leq -2.05 \cdot 10^{-137}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;B \leq -4.5 \cdot 10^{-238}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;B \leq 2.3 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;B \leq 28500:\\
\;\;\;\;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 < -1.10000000000000003e-33

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

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

    if -1.10000000000000003e-33 < B < -1.4499999999999999e-93 or -2.0499999999999999e-137 < B < -4.49999999999999996e-238 or 2.30000000000000002e-51 < B < 28500

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.4499999999999999e-93 < B < -2.0499999999999999e-137 or -4.49999999999999996e-238 < B < 2.30000000000000002e-51

    1. Initial program 62.0%

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

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

    if 28500 < B

    1. Initial program 59.0%

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

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

Alternative 9: 65.4% accurate, 3.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1.1 \cdot 10^{-88}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -7.8 \cdot 10^{-187} \lor \neg \left(B \leq 1.05 \cdot 10^{-273}\right) \land B \leq 1.45 \cdot 10^{-140}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + B \cdot \left(-1 - \frac{A}{B}\right)}{B}\right)\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (if (<= B -1.1e-88)
   (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
   (if (or (<= B -7.8e-187) (and (not (<= B 1.05e-273)) (<= B 1.45e-140)))
     (* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI))
     (* (/ 180.0 PI) (atan (/ (+ C (* B (- -1.0 (/ A B)))) B))))))
double code(double A, double B, double C) {
	double tmp;
	if (B <= -1.1e-88) {
		tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
	} else if ((B <= -7.8e-187) || (!(B <= 1.05e-273) && (B <= 1.45e-140))) {
		tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / ((double) M_PI));
	} else {
		tmp = (180.0 / ((double) M_PI)) * atan(((C + (B * (-1.0 - (A / B)))) / B));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double tmp;
	if (B <= -1.1e-88) {
		tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
	} else if ((B <= -7.8e-187) || (!(B <= 1.05e-273) && (B <= 1.45e-140))) {
		tmp = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(((C + (B * (-1.0 - (A / B)))) / B));
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if B <= -1.1e-88:
		tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi)
	elif (B <= -7.8e-187) or (not (B <= 1.05e-273) and (B <= 1.45e-140)):
		tmp = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi)
	else:
		tmp = (180.0 / math.pi) * math.atan(((C + (B * (-1.0 - (A / B)))) / B))
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (B <= -1.1e-88)
		tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi));
	elseif ((B <= -7.8e-187) || (!(B <= 1.05e-273) && (B <= 1.45e-140)))
		tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / pi));
	else
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B * Float64(-1.0 - Float64(A / B)))) / B)));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	tmp = 0.0;
	if (B <= -1.1e-88)
		tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
	elseif ((B <= -7.8e-187) || (~((B <= 1.05e-273)) && (B <= 1.45e-140)))
		tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / pi);
	else
		tmp = (180.0 / pi) * atan(((C + (B * (-1.0 - (A / B)))) / B));
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[B, -1.1e-88], 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, -7.8e-187], And[N[Not[LessEqual[B, 1.05e-273]], $MachinePrecision], LessEqual[B, 1.45e-140]]], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B * N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;B \leq -7.8 \cdot 10^{-187} \lor \neg \left(B \leq 1.05 \cdot 10^{-273}\right) \land B \leq 1.45 \cdot 10^{-140}:\\
\;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -1.10000000000000002e-88

    1. Initial program 63.2%

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

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

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

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

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

    if -1.10000000000000002e-88 < B < -7.7999999999999998e-187 or 1.0500000000000001e-273 < B < 1.44999999999999999e-140

    1. Initial program 40.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. Simplified49.9%

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

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

    if -7.7999999999999998e-187 < B < 1.0500000000000001e-273 or 1.44999999999999999e-140 < B

    1. Initial program 65.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. Simplified76.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.1 \cdot 10^{-88}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -7.8 \cdot 10^{-187} \lor \neg \left(B \leq 1.05 \cdot 10^{-273}\right) \land B \leq 1.45 \cdot 10^{-140}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + B \cdot \left(-1 - \frac{A}{B}\right)}{B}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 65.7% accurate, 3.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -2.2 \cdot 10^{-88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-184}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 9 \cdot 10^{-274}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 1.45 \cdot 10^{-140}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI)))
        (t_1 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
   (if (<= B -2.2e-88)
     t_1
     (if (<= B -2.05e-184)
       t_0
       (if (<= B 9e-274)
         t_1
         (if (<= B 1.45e-140)
           t_0
           (/ 180.0 (/ PI (atan (+ (/ C B) (- -1.0 (/ A B))))))))))))
double code(double A, double B, double C) {
	double t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / ((double) M_PI));
	double t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
	double tmp;
	if (B <= -2.2e-88) {
		tmp = t_1;
	} else if (B <= -2.05e-184) {
		tmp = t_0;
	} else if (B <= 9e-274) {
		tmp = t_1;
	} else if (B <= 1.45e-140) {
		tmp = t_0;
	} else {
		tmp = 180.0 / (((double) M_PI) / atan(((C / B) + (-1.0 - (A / B)))));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
	double t_1 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
	double tmp;
	if (B <= -2.2e-88) {
		tmp = t_1;
	} else if (B <= -2.05e-184) {
		tmp = t_0;
	} else if (B <= 9e-274) {
		tmp = t_1;
	} else if (B <= 1.45e-140) {
		tmp = t_0;
	} else {
		tmp = 180.0 / (Math.PI / Math.atan(((C / B) + (-1.0 - (A / B)))));
	}
	return tmp;
}
def code(A, B, C):
	t_0 = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi)
	t_1 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi)
	tmp = 0
	if B <= -2.2e-88:
		tmp = t_1
	elif B <= -2.05e-184:
		tmp = t_0
	elif B <= 9e-274:
		tmp = t_1
	elif B <= 1.45e-140:
		tmp = t_0
	else:
		tmp = 180.0 / (math.pi / math.atan(((C / B) + (-1.0 - (A / B)))))
	return tmp
function code(A, B, C)
	t_0 = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / pi))
	t_1 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi))
	tmp = 0.0
	if (B <= -2.2e-88)
		tmp = t_1;
	elseif (B <= -2.05e-184)
		tmp = t_0;
	elseif (B <= 9e-274)
		tmp = t_1;
	elseif (B <= 1.45e-140)
		tmp = t_0;
	else
		tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B))))));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / pi);
	t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
	tmp = 0.0;
	if (B <= -2.2e-88)
		tmp = t_1;
	elseif (B <= -2.05e-184)
		tmp = t_0;
	elseif (B <= 9e-274)
		tmp = t_1;
	elseif (B <= 1.45e-140)
		tmp = t_0;
	else
		tmp = 180.0 / (pi / atan(((C / B) + (-1.0 - (A / B)))));
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.2e-88], t$95$1, If[LessEqual[B, -2.05e-184], t$95$0, If[LessEqual[B, 9e-274], t$95$1, If[LessEqual[B, 1.45e-140], t$95$0, N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.2 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;B \leq -2.05 \cdot 10^{-184}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;B \leq 9 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;B \leq 1.45 \cdot 10^{-140}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -2.20000000000000005e-88 or -2.05e-184 < B < 8.99999999999999982e-274

    1. Initial program 69.0%

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

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

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

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

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

    if -2.20000000000000005e-88 < B < -2.05e-184 or 8.99999999999999982e-274 < B < 1.44999999999999999e-140

    1. Initial program 40.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. Simplified49.9%

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

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

    if 1.44999999999999999e-140 < B

    1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 65.7% accurate, 3.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -2.8 \cdot 10^{-87}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -1.92 \cdot 10^{-184}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.18 \cdot 10^{-273}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{-141}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI)))
        (t_1 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
   (if (<= B -2.8e-87)
     t_1
     (if (<= B -1.92e-184)
       t_0
       (if (<= B 1.18e-273)
         t_1
         (if (<= B 9.5e-141)
           t_0
           (* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))))))))
double code(double A, double B, double C) {
	double t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / ((double) M_PI));
	double t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
	double tmp;
	if (B <= -2.8e-87) {
		tmp = t_1;
	} else if (B <= -1.92e-184) {
		tmp = t_0;
	} else if (B <= 1.18e-273) {
		tmp = t_1;
	} else if (B <= 9.5e-141) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
	double t_1 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
	double tmp;
	if (B <= -2.8e-87) {
		tmp = t_1;
	} else if (B <= -1.92e-184) {
		tmp = t_0;
	} else if (B <= 1.18e-273) {
		tmp = t_1;
	} else if (B <= 9.5e-141) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi)
	t_1 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi)
	tmp = 0
	if B <= -2.8e-87:
		tmp = t_1
	elif B <= -1.92e-184:
		tmp = t_0
	elif B <= 1.18e-273:
		tmp = t_1
	elif B <= 9.5e-141:
		tmp = t_0
	else:
		tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi)
	return tmp
function code(A, B, C)
	t_0 = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / pi))
	t_1 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi))
	tmp = 0.0
	if (B <= -2.8e-87)
		tmp = t_1;
	elseif (B <= -1.92e-184)
		tmp = t_0;
	elseif (B <= 1.18e-273)
		tmp = t_1;
	elseif (B <= 9.5e-141)
		tmp = t_0;
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / pi);
	t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
	tmp = 0.0;
	if (B <= -2.8e-87)
		tmp = t_1;
	elseif (B <= -1.92e-184)
		tmp = t_0;
	elseif (B <= 1.18e-273)
		tmp = t_1;
	elseif (B <= 9.5e-141)
		tmp = t_0;
	else
		tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi);
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.8e-87], t$95$1, If[LessEqual[B, -1.92e-184], t$95$0, If[LessEqual[B, 1.18e-273], t$95$1, If[LessEqual[B, 9.5e-141], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.8 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;B \leq -1.92 \cdot 10^{-184}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;B \leq 1.18 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;B \leq 9.5 \cdot 10^{-141}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -2.8000000000000001e-87 or -1.9200000000000001e-184 < B < 1.17999999999999991e-273

    1. Initial program 69.0%

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

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

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

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

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

    if -2.8000000000000001e-87 < B < -1.9200000000000001e-184 or 1.17999999999999991e-273 < B < 9.49999999999999996e-141

    1. Initial program 40.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. Simplified49.9%

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

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

    if 9.49999999999999996e-141 < B

    1. Initial program 58.8%

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

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

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

Alternative 12: 47.5% accurate, 3.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{if}\;B \leq -2.6 \cdot 10^{-37}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.35 \cdot 10^{-236}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.04 \cdot 10^{-193}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4700:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
   (if (<= B -2.6e-37)
     (* 180.0 (/ (atan 1.0) PI))
     (if (<= B -2.35e-236)
       t_0
       (if (<= B 1.04e-193)
         (* 180.0 (/ (atan (/ 0.0 B)) PI))
         (if (<= B 4700.0) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
	double tmp;
	if (B <= -2.6e-37) {
		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
	} else if (B <= -2.35e-236) {
		tmp = t_0;
	} else if (B <= 1.04e-193) {
		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
	} else if (B <= 4700.0) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
	double tmp;
	if (B <= -2.6e-37) {
		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
	} else if (B <= -2.35e-236) {
		tmp = t_0;
	} else if (B <= 1.04e-193) {
		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
	} else if (B <= 4700.0) {
		tmp = t_0;
	} else {
		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
	tmp = 0
	if B <= -2.6e-37:
		tmp = 180.0 * (math.atan(1.0) / math.pi)
	elif B <= -2.35e-236:
		tmp = t_0
	elif B <= 1.04e-193:
		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
	elif B <= 4700.0:
		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(-0.5 * Float64(B / C))) / pi))
	tmp = 0.0
	if (B <= -2.6e-37)
		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
	elseif (B <= -2.35e-236)
		tmp = t_0;
	elseif (B <= 1.04e-193)
		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
	elseif (B <= 4700.0)
		tmp = t_0;
	else
		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan((-0.5 * (B / C))) / pi);
	tmp = 0.0;
	if (B <= -2.6e-37)
		tmp = 180.0 * (atan(1.0) / pi);
	elseif (B <= -2.35e-236)
		tmp = t_0;
	elseif (B <= 1.04e-193)
		tmp = 180.0 * (atan((0.0 / B)) / pi);
	elseif (B <= 4700.0)
		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[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.6e-37], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.35e-236], t$95$0, If[LessEqual[B, 1.04e-193], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4700.0], 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(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.6 \cdot 10^{-37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\

\mathbf{elif}\;B \leq -2.35 \cdot 10^{-236}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;B \leq 1.04 \cdot 10^{-193}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\

\mathbf{elif}\;B \leq 4700:\\
\;\;\;\;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 < -2.5999999999999998e-37

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

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

    if -2.5999999999999998e-37 < B < -2.35000000000000013e-236 or 1.04000000000000001e-193 < B < 4700

    1. Initial program 50.5%

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

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

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

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

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

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

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

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

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

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

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

    if -2.35000000000000013e-236 < B < 1.04000000000000001e-193

    1. Initial program 72.2%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. Add Preprocessing
    3. Taylor expanded in C around inf 40.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. associate-*r/40.0%

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

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

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

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

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

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

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

    if 4700 < B

    1. Initial program 59.0%

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

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

Alternative 13: 59.2% accurate, 3.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.75 \cdot 10^{-32}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\

\mathbf{elif}\;C \leq 1.15 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\

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


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

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7499999999999999e-32 < C < 1.15e31

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e31 < C

    1. Initial program 24.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 59.1% accurate, 3.5× speedup?

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

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

\mathbf{elif}\;C \leq 1.2 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\

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


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

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3e-165 < C < 1.19999999999999991e31

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.19999999999999991e31 < C

    1. Initial program 24.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 56.8% accurate, 3.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.5 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -1.49999999999999993e80

    1. Initial program 86.0%

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

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

    if -1.49999999999999993e80 < C < 7.5e31

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.5e31 < C

    1. Initial program 24.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 57.0% accurate, 3.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.2 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\

\mathbf{elif}\;C \leq 1.75 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -1.1999999999999999e80

    1. Initial program 86.0%

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

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

    if -1.1999999999999999e80 < C < 1.75e31

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.75e31 < C

    1. Initial program 24.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 48.2% accurate, 3.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;C \leq -7 \cdot 10^{-153}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\

\mathbf{elif}\;C \leq 7.8 \cdot 10^{-207}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\

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


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

    1. Initial program 79.8%

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

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

    if -6.99999999999999961e-153 < C < 7.80000000000000042e-207

    1. Initial program 55.6%

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

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

    if 7.80000000000000042e-207 < C

    1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 45.3% accurate, 3.6× speedup?

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

\mathbf{elif}\;B \leq 1.8 \cdot 10^{-189}:\\
\;\;\;\;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 < -9.00000000000000031e-84

    1. Initial program 63.2%

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

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

    if -9.00000000000000031e-84 < B < 1.80000000000000008e-189

    1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

    if 1.80000000000000008e-189 < B

    1. Initial program 56.8%

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

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

Alternative 19: 60.9% accurate, 3.6× speedup?

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

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

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


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

    1. Initial program 69.6%

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

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

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

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

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

    if 1.6e31 < C

    1. Initial program 24.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 40.7% accurate, 3.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -5 \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 -5e-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 <= -5e-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 <= -5e-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 <= -5e-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 <= -5e-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 <= -5e-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, -5e-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 -5 \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 < -4.999999999999985e-310

    1. Initial program 59.3%

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

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

    if -4.999999999999985e-310 < B

    1. Initial program 58.8%

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

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

Alternative 21: 20.7% accurate, 4.0× speedup?

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

\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Derivation
  1. Initial program 59.1%

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

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

Reproduce

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