ABCF->ab-angle angle

Percentage Accurate: 54.0% → 82.2%
Time: 4.4s
Alternatives: 10
Speedup: 2.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}

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 10 alternatives:

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

Initial Program: 54.0% 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: 82.2% accurate, 0.6× speedup?

\[\begin{array}{l} B\_m = \left|B\right| \\ B\_s = \mathsf{copysign}\left(1, B\right) \\ B\_s \cdot \begin{array}{l} \mathbf{if}\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B\_m} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B\_m}^{2}}\right)\right)}{\pi} \leq -20:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B\_m} \cdot \left(\left(C - A\right) - \mathsf{hypot}\left(C - A, B\_m\right)\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B\_m}, -0.5 \cdot \frac{B\_m}{C}\right)\right)}{\pi}\\ \end{array} \end{array} \]
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
 :precision binary64
 (*
  B_s
  (if (<=
       (*
        180.0
        (/
         (atan
          (*
           (/ 1.0 B_m)
           (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B_m 2.0))))))
         PI))
       -20.0)
    (* 180.0 (/ (atan (* (/ 1.0 B_m) (- (- C A) (hypot (- C A) B_m)))) PI))
    (*
     180.0
     (/ (atan (fma -1.0 (/ (+ A (* -1.0 A)) B_m) (* -0.5 (/ B_m C)))) PI)))))
B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
	double tmp;
	if ((180.0 * (atan(((1.0 / B_m) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B_m, 2.0)))))) / ((double) M_PI))) <= -20.0) {
		tmp = 180.0 * (atan(((1.0 / B_m) * ((C - A) - hypot((C - A), B_m)))) / ((double) M_PI));
	} else {
		tmp = 180.0 * (atan(fma(-1.0, ((A + (-1.0 * A)) / B_m), (-0.5 * (B_m / C)))) / ((double) M_PI));
	}
	return B_s * tmp;
}
B\_m = abs(B)
B\_s = copysign(1.0, B)
function code(B_s, A, B_m, C)
	tmp = 0.0
	if (Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B_m) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B_m ^ 2.0)))))) / pi)) <= -20.0)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B_m) * Float64(Float64(C - A) - hypot(Float64(C - A), B_m)))) / pi));
	else
		tmp = Float64(180.0 * Float64(atan(fma(-1.0, Float64(Float64(A + Float64(-1.0 * A)) / B_m), Float64(-0.5 * Float64(B_m / C)))) / pi));
	end
	return Float64(B_s * tmp)
end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B$95$m), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], -20.0], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B$95$m), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(C - A), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 * N[(N[(A + N[(-1.0 * A), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision] + N[(-0.5 * N[(B$95$m / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)

\\
B\_s \cdot \begin{array}{l}
\mathbf{if}\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B\_m} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B\_m}^{2}}\right)\right)}{\pi} \leq -20:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B\_m} \cdot \left(\left(C - A\right) - \mathsf{hypot}\left(C - A, B\_m\right)\right)\right)}{\pi}\\

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


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

    1. Initial program 54.0%

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\color{blue}{\left(\mathsf{neg}\left(\left(C - A\right)\right)\right)} \cdot \left(A - C\right) + {B}^{2}}\right)\right)}{\pi} \]
      7. lift--.f64N/A

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\left(\mathsf{neg}\left(\left(C - A\right)\right)\right) \cdot \color{blue}{\left(A - C\right)} + {B}^{2}}\right)\right)}{\pi} \]
      9. sub-negate-revN/A

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

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

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

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

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

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

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

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

    1. Initial program 54.0%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B} + \frac{-1}{2} \cdot \frac{B}{C}\right)}}{\pi} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \color{blue}{\frac{A + -1 \cdot A}{B}}, \frac{-1}{2} \cdot \frac{B}{C}\right)\right)}{\pi} \]
      2. lower-/.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{\color{blue}{B}}, \frac{-1}{2} \cdot \frac{B}{C}\right)\right)}{\pi} \]
      3. lower-+.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B}, \frac{-1}{2} \cdot \frac{B}{C}\right)\right)}{\pi} \]
      4. lower-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B}, \frac{-1}{2} \cdot \frac{B}{C}\right)\right)}{\pi} \]
      5. lower-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B}, \frac{-1}{2} \cdot \frac{B}{C}\right)\right)}{\pi} \]
      6. lower-/.f6425.1

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B}, -0.5 \cdot \frac{B}{C}\right)\right)}{\pi} \]
    4. Applied rewrites25.1%

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

Alternative 2: 75.9% accurate, 1.6× speedup?

\[\begin{array}{l} B\_m = \left|B\right| \\ B\_s = \mathsf{copysign}\left(1, B\right) \\ B\_s \cdot \begin{array}{l} \mathbf{if}\;C \leq 1.32 \cdot 10^{+56}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{\left(C - B\_m\right) - A}{B\_m}\right)}{\pi} \cdot 180\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B\_m}, -0.5 \cdot \frac{B\_m}{C}\right)\right)}{\pi}\\ \end{array} \end{array} \]
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
 :precision binary64
 (*
  B_s
  (if (<= C 1.32e+56)
    (* (/ (atan (/ (- (- C B_m) A) B_m)) PI) 180.0)
    (*
     180.0
     (/ (atan (fma -1.0 (/ (+ A (* -1.0 A)) B_m) (* -0.5 (/ B_m C)))) PI)))))
B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
	double tmp;
	if (C <= 1.32e+56) {
		tmp = (atan((((C - B_m) - A) / B_m)) / ((double) M_PI)) * 180.0;
	} else {
		tmp = 180.0 * (atan(fma(-1.0, ((A + (-1.0 * A)) / B_m), (-0.5 * (B_m / C)))) / ((double) M_PI));
	}
	return B_s * tmp;
}
B\_m = abs(B)
B\_s = copysign(1.0, B)
function code(B_s, A, B_m, C)
	tmp = 0.0
	if (C <= 1.32e+56)
		tmp = Float64(Float64(atan(Float64(Float64(Float64(C - B_m) - A) / B_m)) / pi) * 180.0);
	else
		tmp = Float64(180.0 * Float64(atan(fma(-1.0, Float64(Float64(A + Float64(-1.0 * A)) / B_m), Float64(-0.5 * Float64(B_m / C)))) / pi));
	end
	return Float64(B_s * tmp)
end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[C, 1.32e+56], N[(N[(N[ArcTan[N[(N[(N[(C - B$95$m), $MachinePrecision] - A), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 * N[(N[(A + N[(-1.0 * A), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision] + N[(-0.5 * N[(B$95$m / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)

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

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


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

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(1 \cdot B + A\right)}{B}\right)}{\pi} \]
      9. *-lft-identityN/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi} \]
      10. +-commutativeN/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi} \]
      11. lower-+.f6466.7

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi} \]
      2. lift-+.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi} \]
      3. +-commutativeN/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi} \]
      4. associate--r+N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi} \]
      5. lower--.f64N/A

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

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

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

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

    if 1.32e56 < C

    1. Initial program 54.0%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B} + \frac{-1}{2} \cdot \frac{B}{C}\right)}}{\pi} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \color{blue}{\frac{A + -1 \cdot A}{B}}, \frac{-1}{2} \cdot \frac{B}{C}\right)\right)}{\pi} \]
      2. lower-/.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{\color{blue}{B}}, \frac{-1}{2} \cdot \frac{B}{C}\right)\right)}{\pi} \]
      3. lower-+.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B}, \frac{-1}{2} \cdot \frac{B}{C}\right)\right)}{\pi} \]
      4. lower-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B}, \frac{-1}{2} \cdot \frac{B}{C}\right)\right)}{\pi} \]
      5. lower-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B}, \frac{-1}{2} \cdot \frac{B}{C}\right)\right)}{\pi} \]
      6. lower-/.f6425.1

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{fma}\left(-1, \frac{A + -1 \cdot A}{B}, -0.5 \cdot \frac{B}{C}\right)\right)}{\pi} \]
    4. Applied rewrites25.1%

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

Alternative 3: 75.9% accurate, 2.3× speedup?

\[\begin{array}{l} B\_m = \left|B\right| \\ B\_s = \mathsf{copysign}\left(1, B\right) \\ B\_s \cdot \begin{array}{l} \mathbf{if}\;A \leq -3.2 \cdot 10^{+88}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B\_m}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C - A}{B\_m} - 1\right) \cdot 180}{\pi}\\ \end{array} \end{array} \]
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
 :precision binary64
 (*
  B_s
  (if (<= A -3.2e+88)
    (* 180.0 (/ (atan (* 0.5 (/ B_m A))) PI))
    (/ (* (atan (- (/ (- C A) B_m) 1.0)) 180.0) PI))))
B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
	double tmp;
	if (A <= -3.2e+88) {
		tmp = 180.0 * (atan((0.5 * (B_m / A))) / ((double) M_PI));
	} else {
		tmp = (atan((((C - A) / B_m) - 1.0)) * 180.0) / ((double) M_PI);
	}
	return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
	double tmp;
	if (A <= -3.2e+88) {
		tmp = 180.0 * (Math.atan((0.5 * (B_m / A))) / Math.PI);
	} else {
		tmp = (Math.atan((((C - A) / B_m) - 1.0)) * 180.0) / Math.PI;
	}
	return B_s * tmp;
}
B\_m = math.fabs(B)
B\_s = math.copysign(1.0, B)
def code(B_s, A, B_m, C):
	tmp = 0
	if A <= -3.2e+88:
		tmp = 180.0 * (math.atan((0.5 * (B_m / A))) / math.pi)
	else:
		tmp = (math.atan((((C - A) / B_m) - 1.0)) * 180.0) / math.pi
	return B_s * tmp
B\_m = abs(B)
B\_s = copysign(1.0, B)
function code(B_s, A, B_m, C)
	tmp = 0.0
	if (A <= -3.2e+88)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B_m / A))) / pi));
	else
		tmp = Float64(Float64(atan(Float64(Float64(Float64(C - A) / B_m) - 1.0)) * 180.0) / pi);
	end
	return Float64(B_s * tmp)
end
B\_m = abs(B);
B\_s = sign(B) * abs(1.0);
function tmp_2 = code(B_s, A, B_m, C)
	tmp = 0.0;
	if (A <= -3.2e+88)
		tmp = 180.0 * (atan((0.5 * (B_m / A))) / pi);
	else
		tmp = (atan((((C - A) / B_m) - 1.0)) * 180.0) / pi;
	end
	tmp_2 = B_s * tmp;
end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, -3.2e+88], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B$95$m / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)

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

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


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

    1. Initial program 54.0%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}}{\pi} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

    if -3.1999999999999999e88 < A

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 75.3% accurate, 2.3× speedup?

\[\begin{array}{l} B\_m = \left|B\right| \\ B\_s = \mathsf{copysign}\left(1, B\right) \\ B\_s \cdot \begin{array}{l} \mathbf{if}\;A \leq -3.2 \cdot 10^{+88}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B\_m}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C - A}{B\_m} - 1\right)}{\pi} \cdot 180\\ \end{array} \end{array} \]
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
 :precision binary64
 (*
  B_s
  (if (<= A -3.2e+88)
    (* 180.0 (/ (atan (* 0.5 (/ B_m A))) PI))
    (* (/ (atan (- (/ (- C A) B_m) 1.0)) PI) 180.0))))
B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
	double tmp;
	if (A <= -3.2e+88) {
		tmp = 180.0 * (atan((0.5 * (B_m / A))) / ((double) M_PI));
	} else {
		tmp = (atan((((C - A) / B_m) - 1.0)) / ((double) M_PI)) * 180.0;
	}
	return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
	double tmp;
	if (A <= -3.2e+88) {
		tmp = 180.0 * (Math.atan((0.5 * (B_m / A))) / Math.PI);
	} else {
		tmp = (Math.atan((((C - A) / B_m) - 1.0)) / Math.PI) * 180.0;
	}
	return B_s * tmp;
}
B\_m = math.fabs(B)
B\_s = math.copysign(1.0, B)
def code(B_s, A, B_m, C):
	tmp = 0
	if A <= -3.2e+88:
		tmp = 180.0 * (math.atan((0.5 * (B_m / A))) / math.pi)
	else:
		tmp = (math.atan((((C - A) / B_m) - 1.0)) / math.pi) * 180.0
	return B_s * tmp
B\_m = abs(B)
B\_s = copysign(1.0, B)
function code(B_s, A, B_m, C)
	tmp = 0.0
	if (A <= -3.2e+88)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B_m / A))) / pi));
	else
		tmp = Float64(Float64(atan(Float64(Float64(Float64(C - A) / B_m) - 1.0)) / pi) * 180.0);
	end
	return Float64(B_s * tmp)
end
B\_m = abs(B);
B\_s = sign(B) * abs(1.0);
function tmp_2 = code(B_s, A, B_m, C)
	tmp = 0.0;
	if (A <= -3.2e+88)
		tmp = 180.0 * (atan((0.5 * (B_m / A))) / pi);
	else
		tmp = (atan((((C - A) / B_m) - 1.0)) / pi) * 180.0;
	end
	tmp_2 = B_s * tmp;
end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, -3.2e+88], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B$95$m / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)

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

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


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

    1. Initial program 54.0%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}}{\pi} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

    if -3.1999999999999999e88 < A

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 70.8% accurate, 2.2× speedup?

\[\begin{array}{l} B\_m = \left|B\right| \\ B\_s = \mathsf{copysign}\left(1, B\right) \\ B\_s \cdot \begin{array}{l} \mathbf{if}\;A \leq -3.2 \cdot 10^{+88}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B\_m}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.3 \cdot 10^{+136}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right) \cdot 180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{A}{B\_m} \cdot -2\right)}{\pi} \cdot 180\\ \end{array} \end{array} \]
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
 :precision binary64
 (*
  B_s
  (if (<= A -3.2e+88)
    (* 180.0 (/ (atan (* 0.5 (/ B_m A))) PI))
    (if (<= A 1.3e+136)
      (/ (* (atan (- (/ C B_m) 1.0)) 180.0) PI)
      (* (/ (atan (* (/ A B_m) -2.0)) PI) 180.0)))))
B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
	double tmp;
	if (A <= -3.2e+88) {
		tmp = 180.0 * (atan((0.5 * (B_m / A))) / ((double) M_PI));
	} else if (A <= 1.3e+136) {
		tmp = (atan(((C / B_m) - 1.0)) * 180.0) / ((double) M_PI);
	} else {
		tmp = (atan(((A / B_m) * -2.0)) / ((double) M_PI)) * 180.0;
	}
	return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
	double tmp;
	if (A <= -3.2e+88) {
		tmp = 180.0 * (Math.atan((0.5 * (B_m / A))) / Math.PI);
	} else if (A <= 1.3e+136) {
		tmp = (Math.atan(((C / B_m) - 1.0)) * 180.0) / Math.PI;
	} else {
		tmp = (Math.atan(((A / B_m) * -2.0)) / Math.PI) * 180.0;
	}
	return B_s * tmp;
}
B\_m = math.fabs(B)
B\_s = math.copysign(1.0, B)
def code(B_s, A, B_m, C):
	tmp = 0
	if A <= -3.2e+88:
		tmp = 180.0 * (math.atan((0.5 * (B_m / A))) / math.pi)
	elif A <= 1.3e+136:
		tmp = (math.atan(((C / B_m) - 1.0)) * 180.0) / math.pi
	else:
		tmp = (math.atan(((A / B_m) * -2.0)) / math.pi) * 180.0
	return B_s * tmp
B\_m = abs(B)
B\_s = copysign(1.0, B)
function code(B_s, A, B_m, C)
	tmp = 0.0
	if (A <= -3.2e+88)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B_m / A))) / pi));
	elseif (A <= 1.3e+136)
		tmp = Float64(Float64(atan(Float64(Float64(C / B_m) - 1.0)) * 180.0) / pi);
	else
		tmp = Float64(Float64(atan(Float64(Float64(A / B_m) * -2.0)) / pi) * 180.0);
	end
	return Float64(B_s * tmp)
end
B\_m = abs(B);
B\_s = sign(B) * abs(1.0);
function tmp_2 = code(B_s, A, B_m, C)
	tmp = 0.0;
	if (A <= -3.2e+88)
		tmp = 180.0 * (atan((0.5 * (B_m / A))) / pi);
	elseif (A <= 1.3e+136)
		tmp = (atan(((C / B_m) - 1.0)) * 180.0) / pi;
	else
		tmp = (atan(((A / B_m) * -2.0)) / pi) * 180.0;
	end
	tmp_2 = B_s * tmp;
end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, -3.2e+88], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B$95$m / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.3e+136], N[(N[(N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(A / B$95$m), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)

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

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

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


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

    1. Initial program 54.0%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}}{\pi} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

    if -3.1999999999999999e88 < A < 1.3000000000000001e136

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\tan^{-1} \left(\frac{C}{B} - 1\right) \cdot 180}{\pi} \]
    8. Step-by-step derivation
      1. Applied rewrites56.1%

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

      if 1.3000000000000001e136 < A

      1. Initial program 54.0%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-2 \cdot \frac{A}{B}\right)}}{\pi} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-2 \cdot \frac{A}{B}\right)}}{\pi} \]
      5. Step-by-step derivation
        1. lift-*.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi} \cdot 180} \]
        4. lift-*.f64N/A

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

          \[\leadsto \frac{\tan^{-1} \left(\frac{A}{B} \cdot \color{blue}{-2}\right)}{\pi} \cdot 180 \]
        6. lower-*.f6423.4

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

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

    Alternative 6: 61.7% accurate, 2.5× speedup?

    \[\begin{array}{l} B\_m = \left|B\right| \\ B\_s = \mathsf{copysign}\left(1, B\right) \\ B\_s \cdot \begin{array}{l} \mathbf{if}\;A \leq 1.3 \cdot 10^{+136}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right) \cdot 180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{A}{B\_m} \cdot -2\right)}{\pi} \cdot 180\\ \end{array} \end{array} \]
    B\_m = (fabs.f64 B)
    B\_s = (copysign.f64 #s(literal 1 binary64) B)
    (FPCore (B_s A B_m C)
     :precision binary64
     (*
      B_s
      (if (<= A 1.3e+136)
        (/ (* (atan (- (/ C B_m) 1.0)) 180.0) PI)
        (* (/ (atan (* (/ A B_m) -2.0)) PI) 180.0))))
    B\_m = fabs(B);
    B\_s = copysign(1.0, B);
    double code(double B_s, double A, double B_m, double C) {
    	double tmp;
    	if (A <= 1.3e+136) {
    		tmp = (atan(((C / B_m) - 1.0)) * 180.0) / ((double) M_PI);
    	} else {
    		tmp = (atan(((A / B_m) * -2.0)) / ((double) M_PI)) * 180.0;
    	}
    	return B_s * tmp;
    }
    
    B\_m = Math.abs(B);
    B\_s = Math.copySign(1.0, B);
    public static double code(double B_s, double A, double B_m, double C) {
    	double tmp;
    	if (A <= 1.3e+136) {
    		tmp = (Math.atan(((C / B_m) - 1.0)) * 180.0) / Math.PI;
    	} else {
    		tmp = (Math.atan(((A / B_m) * -2.0)) / Math.PI) * 180.0;
    	}
    	return B_s * tmp;
    }
    
    B\_m = math.fabs(B)
    B\_s = math.copysign(1.0, B)
    def code(B_s, A, B_m, C):
    	tmp = 0
    	if A <= 1.3e+136:
    		tmp = (math.atan(((C / B_m) - 1.0)) * 180.0) / math.pi
    	else:
    		tmp = (math.atan(((A / B_m) * -2.0)) / math.pi) * 180.0
    	return B_s * tmp
    
    B\_m = abs(B)
    B\_s = copysign(1.0, B)
    function code(B_s, A, B_m, C)
    	tmp = 0.0
    	if (A <= 1.3e+136)
    		tmp = Float64(Float64(atan(Float64(Float64(C / B_m) - 1.0)) * 180.0) / pi);
    	else
    		tmp = Float64(Float64(atan(Float64(Float64(A / B_m) * -2.0)) / pi) * 180.0);
    	end
    	return Float64(B_s * tmp)
    end
    
    B\_m = abs(B);
    B\_s = sign(B) * abs(1.0);
    function tmp_2 = code(B_s, A, B_m, C)
    	tmp = 0.0;
    	if (A <= 1.3e+136)
    		tmp = (atan(((C / B_m) - 1.0)) * 180.0) / pi;
    	else
    		tmp = (atan(((A / B_m) * -2.0)) / pi) * 180.0;
    	end
    	tmp_2 = B_s * tmp;
    end
    
    B\_m = N[Abs[B], $MachinePrecision]
    B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, 1.3e+136], N[(N[(N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(A / B$95$m), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    B\_m = \left|B\right|
    \\
    B\_s = \mathsf{copysign}\left(1, B\right)
    
    \\
    B\_s \cdot \begin{array}{l}
    \mathbf{if}\;A \leq 1.3 \cdot 10^{+136}:\\
    \;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right) \cdot 180}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\tan^{-1} \left(\frac{A}{B\_m} \cdot -2\right)}{\pi} \cdot 180\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if A < 1.3000000000000001e136

      1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\tan^{-1} \left(\frac{C}{B} - 1\right) \cdot 180}{\pi} \]
      8. Step-by-step derivation
        1. Applied rewrites56.1%

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

        if 1.3000000000000001e136 < A

        1. Initial program 54.0%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-2 \cdot \frac{A}{B}\right)}}{\pi} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-2 \cdot \frac{A}{B}\right)}}{\pi} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

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

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

            \[\leadsto \color{blue}{\frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi} \cdot 180} \]
          4. lift-*.f64N/A

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

            \[\leadsto \frac{\tan^{-1} \left(\frac{A}{B} \cdot \color{blue}{-2}\right)}{\pi} \cdot 180 \]
          6. lower-*.f6423.4

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

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

      Alternative 7: 61.7% accurate, 2.5× speedup?

      \[\begin{array}{l} B\_m = \left|B\right| \\ B\_s = \mathsf{copysign}\left(1, B\right) \\ B\_s \cdot \begin{array}{l} \mathbf{if}\;A \leq 1.3 \cdot 10^{+136}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right) \cdot 180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{-A}{B\_m}\right)}{\pi} \cdot 180\\ \end{array} \end{array} \]
      B\_m = (fabs.f64 B)
      B\_s = (copysign.f64 #s(literal 1 binary64) B)
      (FPCore (B_s A B_m C)
       :precision binary64
       (*
        B_s
        (if (<= A 1.3e+136)
          (/ (* (atan (- (/ C B_m) 1.0)) 180.0) PI)
          (* (/ (atan (/ (- A) B_m)) PI) 180.0))))
      B\_m = fabs(B);
      B\_s = copysign(1.0, B);
      double code(double B_s, double A, double B_m, double C) {
      	double tmp;
      	if (A <= 1.3e+136) {
      		tmp = (atan(((C / B_m) - 1.0)) * 180.0) / ((double) M_PI);
      	} else {
      		tmp = (atan((-A / B_m)) / ((double) M_PI)) * 180.0;
      	}
      	return B_s * tmp;
      }
      
      B\_m = Math.abs(B);
      B\_s = Math.copySign(1.0, B);
      public static double code(double B_s, double A, double B_m, double C) {
      	double tmp;
      	if (A <= 1.3e+136) {
      		tmp = (Math.atan(((C / B_m) - 1.0)) * 180.0) / Math.PI;
      	} else {
      		tmp = (Math.atan((-A / B_m)) / Math.PI) * 180.0;
      	}
      	return B_s * tmp;
      }
      
      B\_m = math.fabs(B)
      B\_s = math.copysign(1.0, B)
      def code(B_s, A, B_m, C):
      	tmp = 0
      	if A <= 1.3e+136:
      		tmp = (math.atan(((C / B_m) - 1.0)) * 180.0) / math.pi
      	else:
      		tmp = (math.atan((-A / B_m)) / math.pi) * 180.0
      	return B_s * tmp
      
      B\_m = abs(B)
      B\_s = copysign(1.0, B)
      function code(B_s, A, B_m, C)
      	tmp = 0.0
      	if (A <= 1.3e+136)
      		tmp = Float64(Float64(atan(Float64(Float64(C / B_m) - 1.0)) * 180.0) / pi);
      	else
      		tmp = Float64(Float64(atan(Float64(Float64(-A) / B_m)) / pi) * 180.0);
      	end
      	return Float64(B_s * tmp)
      end
      
      B\_m = abs(B);
      B\_s = sign(B) * abs(1.0);
      function tmp_2 = code(B_s, A, B_m, C)
      	tmp = 0.0;
      	if (A <= 1.3e+136)
      		tmp = (atan(((C / B_m) - 1.0)) * 180.0) / pi;
      	else
      		tmp = (atan((-A / B_m)) / pi) * 180.0;
      	end
      	tmp_2 = B_s * tmp;
      end
      
      B\_m = N[Abs[B], $MachinePrecision]
      B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, 1.3e+136], N[(N[(N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(N[ArcTan[N[((-A) / B$95$m), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      B\_m = \left|B\right|
      \\
      B\_s = \mathsf{copysign}\left(1, B\right)
      
      \\
      B\_s \cdot \begin{array}{l}
      \mathbf{if}\;A \leq 1.3 \cdot 10^{+136}:\\
      \;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right) \cdot 180}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\tan^{-1} \left(\frac{-A}{B\_m}\right)}{\pi} \cdot 180\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if A < 1.3000000000000001e136

        1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\tan^{-1} \left(\frac{C}{B} - 1\right) \cdot 180}{\pi} \]
        8. Step-by-step derivation
          1. Applied rewrites56.1%

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

          if 1.3000000000000001e136 < A

          1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \frac{A}{B}\right)}{\pi} \]
          7. Applied rewrites23.3%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\frac{A}{B}}\right)}{\pi} \]
          8. Step-by-step derivation
            1. lift-*.f64N/A

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

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

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

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

        Alternative 8: 61.7% accurate, 2.5× speedup?

        \[\begin{array}{l} B\_m = \left|B\right| \\ B\_s = \mathsf{copysign}\left(1, B\right) \\ B\_s \cdot \begin{array}{l} \mathbf{if}\;A \leq 1.3 \cdot 10^{+136}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi} \cdot 180\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{-A}{B\_m}\right)}{\pi} \cdot 180\\ \end{array} \end{array} \]
        B\_m = (fabs.f64 B)
        B\_s = (copysign.f64 #s(literal 1 binary64) B)
        (FPCore (B_s A B_m C)
         :precision binary64
         (*
          B_s
          (if (<= A 1.3e+136)
            (* (/ (atan (- (/ C B_m) 1.0)) PI) 180.0)
            (* (/ (atan (/ (- A) B_m)) PI) 180.0))))
        B\_m = fabs(B);
        B\_s = copysign(1.0, B);
        double code(double B_s, double A, double B_m, double C) {
        	double tmp;
        	if (A <= 1.3e+136) {
        		tmp = (atan(((C / B_m) - 1.0)) / ((double) M_PI)) * 180.0;
        	} else {
        		tmp = (atan((-A / B_m)) / ((double) M_PI)) * 180.0;
        	}
        	return B_s * tmp;
        }
        
        B\_m = Math.abs(B);
        B\_s = Math.copySign(1.0, B);
        public static double code(double B_s, double A, double B_m, double C) {
        	double tmp;
        	if (A <= 1.3e+136) {
        		tmp = (Math.atan(((C / B_m) - 1.0)) / Math.PI) * 180.0;
        	} else {
        		tmp = (Math.atan((-A / B_m)) / Math.PI) * 180.0;
        	}
        	return B_s * tmp;
        }
        
        B\_m = math.fabs(B)
        B\_s = math.copysign(1.0, B)
        def code(B_s, A, B_m, C):
        	tmp = 0
        	if A <= 1.3e+136:
        		tmp = (math.atan(((C / B_m) - 1.0)) / math.pi) * 180.0
        	else:
        		tmp = (math.atan((-A / B_m)) / math.pi) * 180.0
        	return B_s * tmp
        
        B\_m = abs(B)
        B\_s = copysign(1.0, B)
        function code(B_s, A, B_m, C)
        	tmp = 0.0
        	if (A <= 1.3e+136)
        		tmp = Float64(Float64(atan(Float64(Float64(C / B_m) - 1.0)) / pi) * 180.0);
        	else
        		tmp = Float64(Float64(atan(Float64(Float64(-A) / B_m)) / pi) * 180.0);
        	end
        	return Float64(B_s * tmp)
        end
        
        B\_m = abs(B);
        B\_s = sign(B) * abs(1.0);
        function tmp_2 = code(B_s, A, B_m, C)
        	tmp = 0.0;
        	if (A <= 1.3e+136)
        		tmp = (atan(((C / B_m) - 1.0)) / pi) * 180.0;
        	else
        		tmp = (atan((-A / B_m)) / pi) * 180.0;
        	end
        	tmp_2 = B_s * tmp;
        end
        
        B\_m = N[Abs[B], $MachinePrecision]
        B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, 1.3e+136], N[(N[(N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(N[(N[ArcTan[N[((-A) / B$95$m), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]), $MachinePrecision]
        
        \begin{array}{l}
        B\_m = \left|B\right|
        \\
        B\_s = \mathsf{copysign}\left(1, B\right)
        
        \\
        B\_s \cdot \begin{array}{l}
        \mathbf{if}\;A \leq 1.3 \cdot 10^{+136}:\\
        \;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi} \cdot 180\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\tan^{-1} \left(\frac{-A}{B\_m}\right)}{\pi} \cdot 180\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if A < 1.3000000000000001e136

          1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \cdot 180 \]
          8. Step-by-step derivation
            1. Applied rewrites56.1%

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

            if 1.3000000000000001e136 < A

            1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \frac{A}{B}\right)}{\pi} \]
            7. Applied rewrites23.3%

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\frac{A}{B}}\right)}{\pi} \]
            8. Step-by-step derivation
              1. lift-*.f64N/A

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

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

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

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

          Alternative 9: 49.1% accurate, 2.7× speedup?

          \[\begin{array}{l} B\_m = \left|B\right| \\ B\_s = \mathsf{copysign}\left(1, B\right) \\ B\_s \cdot \begin{array}{l} \mathbf{if}\;A \leq 5.8 \cdot 10^{+53}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{-A}{B\_m}\right)}{\pi} \cdot 180\\ \end{array} \end{array} \]
          B\_m = (fabs.f64 B)
          B\_s = (copysign.f64 #s(literal 1 binary64) B)
          (FPCore (B_s A B_m C)
           :precision binary64
           (*
            B_s
            (if (<= A 5.8e+53)
              (* 180.0 (/ (atan -1.0) PI))
              (* (/ (atan (/ (- A) B_m)) PI) 180.0))))
          B\_m = fabs(B);
          B\_s = copysign(1.0, B);
          double code(double B_s, double A, double B_m, double C) {
          	double tmp;
          	if (A <= 5.8e+53) {
          		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
          	} else {
          		tmp = (atan((-A / B_m)) / ((double) M_PI)) * 180.0;
          	}
          	return B_s * tmp;
          }
          
          B\_m = Math.abs(B);
          B\_s = Math.copySign(1.0, B);
          public static double code(double B_s, double A, double B_m, double C) {
          	double tmp;
          	if (A <= 5.8e+53) {
          		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
          	} else {
          		tmp = (Math.atan((-A / B_m)) / Math.PI) * 180.0;
          	}
          	return B_s * tmp;
          }
          
          B\_m = math.fabs(B)
          B\_s = math.copysign(1.0, B)
          def code(B_s, A, B_m, C):
          	tmp = 0
          	if A <= 5.8e+53:
          		tmp = 180.0 * (math.atan(-1.0) / math.pi)
          	else:
          		tmp = (math.atan((-A / B_m)) / math.pi) * 180.0
          	return B_s * tmp
          
          B\_m = abs(B)
          B\_s = copysign(1.0, B)
          function code(B_s, A, B_m, C)
          	tmp = 0.0
          	if (A <= 5.8e+53)
          		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
          	else
          		tmp = Float64(Float64(atan(Float64(Float64(-A) / B_m)) / pi) * 180.0);
          	end
          	return Float64(B_s * tmp)
          end
          
          B\_m = abs(B);
          B\_s = sign(B) * abs(1.0);
          function tmp_2 = code(B_s, A, B_m, C)
          	tmp = 0.0;
          	if (A <= 5.8e+53)
          		tmp = 180.0 * (atan(-1.0) / pi);
          	else
          		tmp = (atan((-A / B_m)) / pi) * 180.0;
          	end
          	tmp_2 = B_s * tmp;
          end
          
          B\_m = N[Abs[B], $MachinePrecision]
          B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, 5.8e+53], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[((-A) / B$95$m), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]), $MachinePrecision]
          
          \begin{array}{l}
          B\_m = \left|B\right|
          \\
          B\_s = \mathsf{copysign}\left(1, B\right)
          
          \\
          B\_s \cdot \begin{array}{l}
          \mathbf{if}\;A \leq 5.8 \cdot 10^{+53}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\tan^{-1} \left(\frac{-A}{B\_m}\right)}{\pi} \cdot 180\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if A < 5.8000000000000004e53

            1. Initial program 54.0%

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
            3. Step-by-step derivation
              1. Applied rewrites39.9%

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

              if 5.8000000000000004e53 < A

              1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \frac{A}{B}\right)}{\pi} \]
              7. Applied rewrites23.3%

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\frac{A}{B}}\right)}{\pi} \]
              8. Step-by-step derivation
                1. lift-*.f64N/A

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

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

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

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

            Alternative 10: 39.9% accurate, 4.1× speedup?

            \[\begin{array}{l} B\_m = \left|B\right| \\ B\_s = \mathsf{copysign}\left(1, B\right) \\ B\_s \cdot \left(180 \cdot \frac{\tan^{-1} -1}{\pi}\right) \end{array} \]
            B\_m = (fabs.f64 B)
            B\_s = (copysign.f64 #s(literal 1 binary64) B)
            (FPCore (B_s A B_m C) :precision binary64 (* B_s (* 180.0 (/ (atan -1.0) PI))))
            B\_m = fabs(B);
            B\_s = copysign(1.0, B);
            double code(double B_s, double A, double B_m, double C) {
            	return B_s * (180.0 * (atan(-1.0) / ((double) M_PI)));
            }
            
            B\_m = Math.abs(B);
            B\_s = Math.copySign(1.0, B);
            public static double code(double B_s, double A, double B_m, double C) {
            	return B_s * (180.0 * (Math.atan(-1.0) / Math.PI));
            }
            
            B\_m = math.fabs(B)
            B\_s = math.copysign(1.0, B)
            def code(B_s, A, B_m, C):
            	return B_s * (180.0 * (math.atan(-1.0) / math.pi))
            
            B\_m = abs(B)
            B\_s = copysign(1.0, B)
            function code(B_s, A, B_m, C)
            	return Float64(B_s * Float64(180.0 * Float64(atan(-1.0) / pi)))
            end
            
            B\_m = abs(B);
            B\_s = sign(B) * abs(1.0);
            function tmp = code(B_s, A, B_m, C)
            	tmp = B_s * (180.0 * (atan(-1.0) / pi));
            end
            
            B\_m = N[Abs[B], $MachinePrecision]
            B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
            
            \begin{array}{l}
            B\_m = \left|B\right|
            \\
            B\_s = \mathsf{copysign}\left(1, B\right)
            
            \\
            B\_s \cdot \left(180 \cdot \frac{\tan^{-1} -1}{\pi}\right)
            \end{array}
            
            Derivation
            1. Initial program 54.0%

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
            3. Step-by-step derivation
              1. Applied rewrites39.9%

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

              Reproduce

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