ABCF->ab-angle angle

Percentage Accurate: 53.9% → 83.1%
Time: 27.9s
Alternatives: 17
Speedup: 3.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

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

\\
\begin{array}{l}
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 -1 \cdot 10^{-7}:\\
\;\;\;\;-1 + \mathsf{fma}\left(\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right), \frac{180}{\pi}, 1\right)\\

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

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


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

    1. Initial program 57.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. associate-*r/57.8%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)} - 1} \]
      3. associate-/l*10.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}}\right)} - 1 \]
      4. associate--l-9.0%

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

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

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

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

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

        \[\leadsto -1 + e^{\color{blue}{\log \left(1 + 180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}{\pi}\right)}} \]
      5. rem-exp-log81.4%

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

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

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

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

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

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

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

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

    1. Initial program 14.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 34.6%

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(0.5 \cdot \left(B \cdot \color{blue}{\log \left(e^{B \cdot \frac{1}{A}}\right)}\right)\right)\right)}{\pi} \]
      2. un-div-inv15.4%

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

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

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

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

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

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

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

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

    1. Initial program 63.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. Applied egg-rr89.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)}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification80.3%

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

Alternative 2: 77.5% accurate, 1.9× speedup?

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

\mathbf{elif}\;A \leq 5.5 \cdot 10^{-70}:\\
\;\;\;\;\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 < -8.50000000000000013e185

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

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

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

    if -8.50000000000000013e185 < A < 5.5000000000000001e-70

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

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

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

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

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

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

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

    if 5.5000000000000001e-70 < A

    1. Initial program 77.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 76.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. mul-1-neg76.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -8.5 \cdot 10^{+185}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\ \mathbf{elif}\;A \leq 5.5 \cdot 10^{-70}:\\ \;\;\;\;\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.7% accurate, 1.9× speedup?

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

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

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

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


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

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

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

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

    if -1.8000000000000001e186 < A < 1.29999999999999996e81

    1. Initial program 49.4%

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

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

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

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

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

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

    if 1.29999999999999996e81 < A

    1. Initial program 88.0%

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

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

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

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

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

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

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

    Alternative 4: 74.8% accurate, 1.9× speedup?

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

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

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

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

      if -8.50000000000000013e185 < A < 3.5000000000000001e78

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

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

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

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

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

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

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

      if 3.5000000000000001e78 < A

      1. Initial program 88.0%

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

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

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

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

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

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

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

      Alternative 5: 79.9% accurate, 1.9× speedup?

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

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

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

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

        if -8.50000000000000013e185 < A

        1. Initial program 56.3%

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

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

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

        Alternative 6: 81.6% accurate, 1.9× speedup?

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

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

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

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

          if -2.0500000000000001e190 < A

          1. Initial program 56.3%

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

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

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

          Alternative 7: 81.6% accurate, 1.9× speedup?

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

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

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

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

            if -2.1999999999999998e186 < A

            1. Initial program 56.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. Applied egg-rr76.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)}}} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification77.8%

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

          Alternative 8: 48.9% accurate, 2.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.6 \cdot 10^{-84}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-296}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9 \cdot 10^{-205}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-139}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 7.8 \cdot 10^{-44}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-10}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
          (FPCore (A B C)
           :precision binary64
           (let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))
                  (t_1 (* 180.0 (/ (atan (* B (/ 0.5 A))) PI))))
             (if (<= B -1.6e-84)
               (* 180.0 (/ (atan 1.0) PI))
               (if (<= B -2.05e-296)
                 t_0
                 (if (<= B 2.3e-256)
                   (* 180.0 (/ (atan (/ 0.0 B)) PI))
                   (if (<= B 9e-205)
                     t_0
                     (if (<= B 1.1e-139)
                       t_1
                       (if (<= B 7.8e-44)
                         (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
                         (if (<= B 3.1e-10) t_1 (* 180.0 (/ (atan -1.0) PI)))))))))))
          double code(double A, double B, double C) {
          	double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
          	double t_1 = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
          	double tmp;
          	if (B <= -1.6e-84) {
          		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
          	} else if (B <= -2.05e-296) {
          		tmp = t_0;
          	} else if (B <= 2.3e-256) {
          		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
          	} else if (B <= 9e-205) {
          		tmp = t_0;
          	} else if (B <= 1.1e-139) {
          		tmp = t_1;
          	} else if (B <= 7.8e-44) {
          		tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
          	} else if (B <= 3.1e-10) {
          		tmp = t_1;
          	} else {
          		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
          	}
          	return tmp;
          }
          
          public static double code(double A, double B, double C) {
          	double t_0 = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
          	double t_1 = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
          	double tmp;
          	if (B <= -1.6e-84) {
          		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
          	} else if (B <= -2.05e-296) {
          		tmp = t_0;
          	} else if (B <= 2.3e-256) {
          		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
          	} else if (B <= 9e-205) {
          		tmp = t_0;
          	} else if (B <= 1.1e-139) {
          		tmp = t_1;
          	} else if (B <= 7.8e-44) {
          		tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
          	} else if (B <= 3.1e-10) {
          		tmp = t_1;
          	} else {
          		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
          	}
          	return tmp;
          }
          
          def code(A, B, C):
          	t_0 = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
          	t_1 = 180.0 * (math.atan((B * (0.5 / A))) / math.pi)
          	tmp = 0
          	if B <= -1.6e-84:
          		tmp = 180.0 * (math.atan(1.0) / math.pi)
          	elif B <= -2.05e-296:
          		tmp = t_0
          	elif B <= 2.3e-256:
          		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
          	elif B <= 9e-205:
          		tmp = t_0
          	elif B <= 1.1e-139:
          		tmp = t_1
          	elif B <= 7.8e-44:
          		tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi)
          	elif B <= 3.1e-10:
          		tmp = t_1
          	else:
          		tmp = 180.0 * (math.atan(-1.0) / math.pi)
          	return tmp
          
          function code(A, B, C)
          	t_0 = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi))
          	t_1 = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi))
          	tmp = 0.0
          	if (B <= -1.6e-84)
          		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
          	elseif (B <= -2.05e-296)
          		tmp = t_0;
          	elseif (B <= 2.3e-256)
          		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
          	elseif (B <= 9e-205)
          		tmp = t_0;
          	elseif (B <= 1.1e-139)
          		tmp = t_1;
          	elseif (B <= 7.8e-44)
          		tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi));
          	elseif (B <= 3.1e-10)
          		tmp = t_1;
          	else
          		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
          	end
          	return tmp
          end
          
          function tmp_2 = code(A, B, C)
          	t_0 = 180.0 * (atan((-2.0 * (A / B))) / pi);
          	t_1 = 180.0 * (atan((B * (0.5 / A))) / pi);
          	tmp = 0.0;
          	if (B <= -1.6e-84)
          		tmp = 180.0 * (atan(1.0) / pi);
          	elseif (B <= -2.05e-296)
          		tmp = t_0;
          	elseif (B <= 2.3e-256)
          		tmp = 180.0 * (atan((0.0 / B)) / pi);
          	elseif (B <= 9e-205)
          		tmp = t_0;
          	elseif (B <= 1.1e-139)
          		tmp = t_1;
          	elseif (B <= 7.8e-44)
          		tmp = 180.0 * (atan((2.0 * (C / B))) / pi);
          	elseif (B <= 3.1e-10)
          		tmp = t_1;
          	else
          		tmp = 180.0 * (atan(-1.0) / pi);
          	end
          	tmp_2 = tmp;
          end
          
          code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.6e-84], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.05e-296], t$95$0, If[LessEqual[B, 2.3e-256], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-205], t$95$0, If[LessEqual[B, 1.1e-139], t$95$1, If[LessEqual[B, 7.8e-44], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-10], t$95$1, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
          t_1 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
          \mathbf{if}\;B \leq -1.6 \cdot 10^{-84}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
          
          \mathbf{elif}\;B \leq -2.05 \cdot 10^{-296}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;B \leq 2.3 \cdot 10^{-256}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
          
          \mathbf{elif}\;B \leq 9 \cdot 10^{-205}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;B \leq 1.1 \cdot 10^{-139}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;B \leq 7.8 \cdot 10^{-44}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
          
          \mathbf{elif}\;B \leq 3.1 \cdot 10^{-10}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{else}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 6 regimes
          2. if B < -1.6e-84

            1. Initial program 54.4%

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

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

            if -1.6e-84 < B < -2.04999999999999997e-296 or 2.3e-256 < B < 8.99999999999999912e-205

            1. Initial program 61.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 46.5%

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

            if -2.04999999999999997e-296 < B < 2.3e-256

            1. Initial program 52.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 64.1%

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

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

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

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

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

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

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

            if 8.99999999999999912e-205 < B < 1.10000000000000005e-139 or 7.8000000000000004e-44 < B < 3.10000000000000015e-10

            1. Initial program 34.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 A around -inf 45.0%

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(0.5 \cdot \color{blue}{\left(B \cdot \left(B \cdot \frac{1}{A}\right)\right)}\right)\right)}{\pi} \]
            6. Step-by-step derivation
              1. add-log-exp28.7%

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(0.5 \cdot \left(B \cdot \color{blue}{\log \left(e^{B \cdot \frac{1}{A}}\right)}\right)\right)\right)}{\pi} \]
              2. un-div-inv28.7%

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

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

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

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

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

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

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

            if 1.10000000000000005e-139 < B < 7.8000000000000004e-44

            1. Initial program 64.4%

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

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

            if 3.10000000000000015e-10 < B

            1. Initial program 45.9%

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.6 \cdot 10^{-84}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-296}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 9 \cdot 10^{-205}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-139}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.8 \cdot 10^{-44}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-10}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 9: 49.0% accurate, 2.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{if}\;B \leq -5.1 \cdot 10^{-85}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -6.8 \cdot 10^{-296}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 1.65 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.8 \cdot 10^{-197}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-140}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-45}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-9}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
          (FPCore (A B C)
           :precision binary64
           (let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))
                  (t_1 (* 180.0 (/ (atan (* B (/ 0.5 A))) PI))))
             (if (<= B -5.1e-85)
               (* 180.0 (/ (atan 1.0) PI))
               (if (<= B -6.8e-296)
                 t_0
                 (if (<= B 1.65e-256)
                   (* 180.0 (/ (atan (/ 0.0 B)) PI))
                   (if (<= B 7.8e-197)
                     t_0
                     (if (<= B 6e-140)
                       t_1
                       (if (<= B 8.5e-45)
                         (/ 180.0 (/ PI (atan (/ (* C 2.0) B))))
                         (if (<= B 1.3e-9) t_1 (* 180.0 (/ (atan -1.0) PI)))))))))))
          double code(double A, double B, double C) {
          	double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
          	double t_1 = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
          	double tmp;
          	if (B <= -5.1e-85) {
          		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
          	} else if (B <= -6.8e-296) {
          		tmp = t_0;
          	} else if (B <= 1.65e-256) {
          		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
          	} else if (B <= 7.8e-197) {
          		tmp = t_0;
          	} else if (B <= 6e-140) {
          		tmp = t_1;
          	} else if (B <= 8.5e-45) {
          		tmp = 180.0 / (((double) M_PI) / atan(((C * 2.0) / B)));
          	} else if (B <= 1.3e-9) {
          		tmp = t_1;
          	} else {
          		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
          	}
          	return tmp;
          }
          
          public static double code(double A, double B, double C) {
          	double t_0 = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
          	double t_1 = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
          	double tmp;
          	if (B <= -5.1e-85) {
          		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
          	} else if (B <= -6.8e-296) {
          		tmp = t_0;
          	} else if (B <= 1.65e-256) {
          		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
          	} else if (B <= 7.8e-197) {
          		tmp = t_0;
          	} else if (B <= 6e-140) {
          		tmp = t_1;
          	} else if (B <= 8.5e-45) {
          		tmp = 180.0 / (Math.PI / Math.atan(((C * 2.0) / B)));
          	} else if (B <= 1.3e-9) {
          		tmp = t_1;
          	} else {
          		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
          	}
          	return tmp;
          }
          
          def code(A, B, C):
          	t_0 = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
          	t_1 = 180.0 * (math.atan((B * (0.5 / A))) / math.pi)
          	tmp = 0
          	if B <= -5.1e-85:
          		tmp = 180.0 * (math.atan(1.0) / math.pi)
          	elif B <= -6.8e-296:
          		tmp = t_0
          	elif B <= 1.65e-256:
          		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
          	elif B <= 7.8e-197:
          		tmp = t_0
          	elif B <= 6e-140:
          		tmp = t_1
          	elif B <= 8.5e-45:
          		tmp = 180.0 / (math.pi / math.atan(((C * 2.0) / B)))
          	elif B <= 1.3e-9:
          		tmp = t_1
          	else:
          		tmp = 180.0 * (math.atan(-1.0) / math.pi)
          	return tmp
          
          function code(A, B, C)
          	t_0 = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi))
          	t_1 = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi))
          	tmp = 0.0
          	if (B <= -5.1e-85)
          		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
          	elseif (B <= -6.8e-296)
          		tmp = t_0;
          	elseif (B <= 1.65e-256)
          		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
          	elseif (B <= 7.8e-197)
          		tmp = t_0;
          	elseif (B <= 6e-140)
          		tmp = t_1;
          	elseif (B <= 8.5e-45)
          		tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C * 2.0) / B))));
          	elseif (B <= 1.3e-9)
          		tmp = t_1;
          	else
          		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
          	end
          	return tmp
          end
          
          function tmp_2 = code(A, B, C)
          	t_0 = 180.0 * (atan((-2.0 * (A / B))) / pi);
          	t_1 = 180.0 * (atan((B * (0.5 / A))) / pi);
          	tmp = 0.0;
          	if (B <= -5.1e-85)
          		tmp = 180.0 * (atan(1.0) / pi);
          	elseif (B <= -6.8e-296)
          		tmp = t_0;
          	elseif (B <= 1.65e-256)
          		tmp = 180.0 * (atan((0.0 / B)) / pi);
          	elseif (B <= 7.8e-197)
          		tmp = t_0;
          	elseif (B <= 6e-140)
          		tmp = t_1;
          	elseif (B <= 8.5e-45)
          		tmp = 180.0 / (pi / atan(((C * 2.0) / B)));
          	elseif (B <= 1.3e-9)
          		tmp = t_1;
          	else
          		tmp = 180.0 * (atan(-1.0) / pi);
          	end
          	tmp_2 = tmp;
          end
          
          code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.1e-85], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.8e-296], t$95$0, If[LessEqual[B, 1.65e-256], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.8e-197], t$95$0, If[LessEqual[B, 6e-140], t$95$1, If[LessEqual[B, 8.5e-45], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e-9], t$95$1, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
          t_1 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
          \mathbf{if}\;B \leq -5.1 \cdot 10^{-85}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
          
          \mathbf{elif}\;B \leq -6.8 \cdot 10^{-296}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;B \leq 1.65 \cdot 10^{-256}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
          
          \mathbf{elif}\;B \leq 7.8 \cdot 10^{-197}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;B \leq 6 \cdot 10^{-140}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;B \leq 8.5 \cdot 10^{-45}:\\
          \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}}\\
          
          \mathbf{elif}\;B \leq 1.3 \cdot 10^{-9}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{else}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 6 regimes
          2. if B < -5.1000000000000002e-85

            1. Initial program 54.4%

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

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

            if -5.1000000000000002e-85 < B < -6.79999999999999993e-296 or 1.65e-256 < B < 7.7999999999999998e-197

            1. Initial program 61.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 46.5%

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

            if -6.79999999999999993e-296 < B < 1.65e-256

            1. Initial program 52.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 64.1%

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

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

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

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

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

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

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

            if 7.7999999999999998e-197 < B < 6.00000000000000037e-140 or 8.50000000000000041e-45 < B < 1.3000000000000001e-9

            1. Initial program 34.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 A around -inf 45.0%

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(0.5 \cdot \color{blue}{\left(B \cdot \left(B \cdot \frac{1}{A}\right)\right)}\right)\right)}{\pi} \]
            6. Step-by-step derivation
              1. add-log-exp28.7%

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(0.5 \cdot \left(B \cdot \color{blue}{\log \left(e^{B \cdot \frac{1}{A}}\right)}\right)\right)\right)}{\pi} \]
              2. un-div-inv28.7%

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

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

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

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

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

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

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

            if 6.00000000000000037e-140 < B < 8.50000000000000041e-45

            1. Initial program 64.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. Applied egg-rr69.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)}}} \]
            4. Taylor expanded in C around -inf 50.2%

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

            if 1.3000000000000001e-9 < B

            1. Initial program 45.9%

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.1 \cdot 10^{-85}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -6.8 \cdot 10^{-296}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.65 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.8 \cdot 10^{-197}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-140}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-45}:\\ \;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-9}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 10: 61.3% accurate, 3.1× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{if}\;B \leq -1500000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -4 \cdot 10^{-61}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq -2.9 \cdot 10^{-84}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;B \leq -6.8 \cdot 10^{-299} \lor \neg \left(B \leq 1.04 \cdot 10^{-256}\right):\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \end{array} \end{array} \]
          (FPCore (A B C)
           :precision binary64
           (let* ((t_0 (* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))
                  (t_1 (* 180.0 (/ (atan 1.0) PI))))
             (if (<= B -1500000.0)
               t_1
               (if (<= B -4e-61)
                 t_0
                 (if (<= B -2.9e-84)
                   t_1
                   (if (or (<= B -6.8e-299) (not (<= B 1.04e-256)))
                     t_0
                     (* 180.0 (/ (atan (/ 0.0 B)) PI))))))))
          double code(double A, double B, double C) {
          	double t_0 = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
          	double t_1 = 180.0 * (atan(1.0) / ((double) M_PI));
          	double tmp;
          	if (B <= -1500000.0) {
          		tmp = t_1;
          	} else if (B <= -4e-61) {
          		tmp = t_0;
          	} else if (B <= -2.9e-84) {
          		tmp = t_1;
          	} else if ((B <= -6.8e-299) || !(B <= 1.04e-256)) {
          		tmp = t_0;
          	} else {
          		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
          	}
          	return tmp;
          }
          
          public static double code(double A, double B, double C) {
          	double t_0 = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
          	double t_1 = 180.0 * (Math.atan(1.0) / Math.PI);
          	double tmp;
          	if (B <= -1500000.0) {
          		tmp = t_1;
          	} else if (B <= -4e-61) {
          		tmp = t_0;
          	} else if (B <= -2.9e-84) {
          		tmp = t_1;
          	} else if ((B <= -6.8e-299) || !(B <= 1.04e-256)) {
          		tmp = t_0;
          	} else {
          		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
          	}
          	return tmp;
          }
          
          def code(A, B, C):
          	t_0 = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi)
          	t_1 = 180.0 * (math.atan(1.0) / math.pi)
          	tmp = 0
          	if B <= -1500000.0:
          		tmp = t_1
          	elif B <= -4e-61:
          		tmp = t_0
          	elif B <= -2.9e-84:
          		tmp = t_1
          	elif (B <= -6.8e-299) or not (B <= 1.04e-256):
          		tmp = t_0
          	else:
          		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
          	return tmp
          
          function code(A, B, C)
          	t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi))
          	t_1 = Float64(180.0 * Float64(atan(1.0) / pi))
          	tmp = 0.0
          	if (B <= -1500000.0)
          		tmp = t_1;
          	elseif (B <= -4e-61)
          		tmp = t_0;
          	elseif (B <= -2.9e-84)
          		tmp = t_1;
          	elseif ((B <= -6.8e-299) || !(B <= 1.04e-256))
          		tmp = t_0;
          	else
          		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
          	end
          	return tmp
          end
          
          function tmp_2 = code(A, B, C)
          	t_0 = 180.0 * (atan(((C - (B + A)) / B)) / pi);
          	t_1 = 180.0 * (atan(1.0) / pi);
          	tmp = 0.0;
          	if (B <= -1500000.0)
          		tmp = t_1;
          	elseif (B <= -4e-61)
          		tmp = t_0;
          	elseif (B <= -2.9e-84)
          		tmp = t_1;
          	elseif ((B <= -6.8e-299) || ~((B <= 1.04e-256)))
          		tmp = t_0;
          	else
          		tmp = 180.0 * (atan((0.0 / B)) / pi);
          	end
          	tmp_2 = tmp;
          end
          
          code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1500000.0], t$95$1, If[LessEqual[B, -4e-61], t$95$0, If[LessEqual[B, -2.9e-84], t$95$1, If[Or[LessEqual[B, -6.8e-299], N[Not[LessEqual[B, 1.04e-256]], $MachinePrecision]], t$95$0, N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
          t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
          \mathbf{if}\;B \leq -1500000:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;B \leq -4 \cdot 10^{-61}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;B \leq -2.9 \cdot 10^{-84}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;B \leq -6.8 \cdot 10^{-299} \lor \neg \left(B \leq 1.04 \cdot 10^{-256}\right):\\
          \;\;\;\;t\_0\\
          
          \mathbf{else}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if B < -1.5e6 or -4.0000000000000002e-61 < B < -2.90000000000000019e-84

            1. Initial program 52.9%

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

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

            if -1.5e6 < B < -4.0000000000000002e-61 or -2.90000000000000019e-84 < B < -6.7999999999999996e-299 or 1.04e-256 < B

            1. Initial program 53.3%

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

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

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

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

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

              if -6.7999999999999996e-299 < B < 1.04e-256

              1. Initial program 52.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 64.1%

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

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

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

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1500000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4 \cdot 10^{-61}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.9 \cdot 10^{-84}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -6.8 \cdot 10^{-299} \lor \neg \left(B \leq 1.04 \cdot 10^{-256}\right):\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 11: 49.5% accurate, 3.1× speedup?

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

              1. Initial program 54.4%

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

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

              if -7.0000000000000002e-84 < B < -1.59999999999999986e-297 or 2.2000000000000001e-256 < B < 1.15000000000000006e-124

              1. Initial program 55.0%

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

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

              if -1.59999999999999986e-297 < B < 2.2000000000000001e-256

              1. Initial program 52.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 64.1%

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

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

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

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

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

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

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

              if 1.15000000000000006e-124 < B < 4.99999999999999964e-35

              1. Initial program 61.4%

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

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

              if 4.99999999999999964e-35 < B

              1. Initial program 46.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 56.4%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -7 \cdot 10^{-84}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-297}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.15 \cdot 10^{-124}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-35}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 12: 49.2% accurate, 3.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -2.3 \cdot 10^{-85}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -7 \cdot 10^{-296}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 2.15 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.6 \cdot 10^{-65}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
            (FPCore (A B C)
             :precision binary64
             (let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
               (if (<= B -2.3e-85)
                 (* 180.0 (/ (atan 1.0) PI))
                 (if (<= B -7e-296)
                   t_0
                   (if (<= B 2.15e-256)
                     (* 180.0 (/ (atan (/ 0.0 B)) PI))
                     (if (<= B 7.6e-65) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
            double code(double A, double B, double C) {
            	double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
            	double tmp;
            	if (B <= -2.3e-85) {
            		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
            	} else if (B <= -7e-296) {
            		tmp = t_0;
            	} else if (B <= 2.15e-256) {
            		tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
            	} else if (B <= 7.6e-65) {
            		tmp = t_0;
            	} else {
            		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
            	}
            	return tmp;
            }
            
            public static double code(double A, double B, double C) {
            	double t_0 = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
            	double tmp;
            	if (B <= -2.3e-85) {
            		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
            	} else if (B <= -7e-296) {
            		tmp = t_0;
            	} else if (B <= 2.15e-256) {
            		tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
            	} else if (B <= 7.6e-65) {
            		tmp = t_0;
            	} else {
            		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
            	}
            	return tmp;
            }
            
            def code(A, B, C):
            	t_0 = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi)
            	tmp = 0
            	if B <= -2.3e-85:
            		tmp = 180.0 * (math.atan(1.0) / math.pi)
            	elif B <= -7e-296:
            		tmp = t_0
            	elif B <= 2.15e-256:
            		tmp = 180.0 * (math.atan((0.0 / B)) / math.pi)
            	elif B <= 7.6e-65:
            		tmp = t_0
            	else:
            		tmp = 180.0 * (math.atan(-1.0) / math.pi)
            	return tmp
            
            function code(A, B, C)
            	t_0 = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi))
            	tmp = 0.0
            	if (B <= -2.3e-85)
            		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
            	elseif (B <= -7e-296)
            		tmp = t_0;
            	elseif (B <= 2.15e-256)
            		tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi));
            	elseif (B <= 7.6e-65)
            		tmp = t_0;
            	else
            		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
            	end
            	return tmp
            end
            
            function tmp_2 = code(A, B, C)
            	t_0 = 180.0 * (atan((-2.0 * (A / B))) / pi);
            	tmp = 0.0;
            	if (B <= -2.3e-85)
            		tmp = 180.0 * (atan(1.0) / pi);
            	elseif (B <= -7e-296)
            		tmp = t_0;
            	elseif (B <= 2.15e-256)
            		tmp = 180.0 * (atan((0.0 / B)) / pi);
            	elseif (B <= 7.6e-65)
            		tmp = t_0;
            	else
            		tmp = 180.0 * (atan(-1.0) / pi);
            	end
            	tmp_2 = tmp;
            end
            
            code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.3e-85], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7e-296], t$95$0, If[LessEqual[B, 2.15e-256], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.6e-65], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
            \mathbf{if}\;B \leq -2.3 \cdot 10^{-85}:\\
            \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
            
            \mathbf{elif}\;B \leq -7 \cdot 10^{-296}:\\
            \;\;\;\;t\_0\\
            
            \mathbf{elif}\;B \leq 2.15 \cdot 10^{-256}:\\
            \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
            
            \mathbf{elif}\;B \leq 7.6 \cdot 10^{-65}:\\
            \;\;\;\;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.3e-85

              1. Initial program 54.4%

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

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

              if -2.3e-85 < B < -6.9999999999999998e-296 or 2.1500000000000001e-256 < B < 7.6000000000000003e-65

              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.8%

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

              if -6.9999999999999998e-296 < B < 2.1500000000000001e-256

              1. Initial program 52.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 64.1%

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

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

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

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

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

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

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

              if 7.6000000000000003e-65 < B

              1. Initial program 49.1%

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.3 \cdot 10^{-85}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -7 \cdot 10^{-296}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.15 \cdot 10^{-256}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7.6 \cdot 10^{-65}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 13: 67.4% accurate, 3.5× speedup?

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

              1. Initial program 56.4%

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

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

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

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

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

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

                if -6.7999999999999996e-299 < B < 1.10000000000000005e-256

                1. Initial program 52.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 64.1%

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

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

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

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

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

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

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

                if 1.10000000000000005e-256 < B

                1. Initial program 50.0%

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

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

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

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

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

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

                Alternative 14: 67.4% accurate, 3.5× speedup?

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

                  1. Initial program 56.4%

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

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

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

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

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

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

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

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

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

                  if -9.2000000000000003e-299 < B < 1.10000000000000005e-256

                  1. Initial program 52.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 64.1%

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

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

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

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

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

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

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

                  if 1.10000000000000005e-256 < B

                  1. Initial program 50.0%

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

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

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

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

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

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

                  Alternative 15: 46.2% accurate, 3.6× speedup?

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

                    1. Initial program 56.6%

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

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

                    if -7.5999999999999999e-106 < B < 1.59999999999999993e-161

                    1. Initial program 53.4%

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

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

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

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

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

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

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

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

                    if 1.59999999999999993e-161 < B

                    1. Initial program 50.1%

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -7.6 \cdot 10^{-106}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{-161}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 16: 41.4% accurate, 3.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1.02 \cdot 10^{-305}:\\ \;\;\;\;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 -1.02e-305)
                     (* 180.0 (/ (atan 1.0) PI))
                     (* 180.0 (/ (atan -1.0) PI))))
                  double code(double A, double B, double C) {
                  	double tmp;
                  	if (B <= -1.02e-305) {
                  		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 <= -1.02e-305) {
                  		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 <= -1.02e-305:
                  		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 <= -1.02e-305)
                  		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 <= -1.02e-305)
                  		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, -1.02e-305], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;B \leq -1.02 \cdot 10^{-305}:\\
                  \;\;\;\;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 < -1.01999999999999994e-305

                    1. Initial program 56.6%

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

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

                    if -1.01999999999999994e-305 < B

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

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

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

                  Alternative 17: 21.8% 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 53.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.5%

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

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

                  Reproduce

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