ABCF->ab-angle angle

Percentage Accurate: 54.0% → 82.2%
Time: 5.7s
Alternatives: 15
Speedup: 2.3×

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 15 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(A - C, B\_m\right)\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B\_m}{C}, -0.5, \frac{0}{B\_m}\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 (- A C) B_m)))) PI))
    (/ (* 180.0 (atan (fma (/ B_m C) -0.5 (/ 0.0 B_m)))) 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((A - C), B_m)))) / ((double) M_PI));
	} else {
		tmp = (180.0 * atan(fma((B_m / C), -0.5, (0.0 / B_m)))) / ((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(A - C), B_m)))) / pi));
	else
		tmp = Float64(Float64(180.0 * atan(fma(Float64(B_m / C), -0.5, Float64(0.0 / B_m)))) / 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[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B$95$m / C), $MachinePrecision] * -0.5 + N[(0.0 / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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}\;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(A - C, B\_m\right)\right)\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B\_m}{C}, -0.5, \frac{0}{B\_m}\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--.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. 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} \]
      5. sub-flipN/A

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A + \color{blue}{\left(\mathsf{neg}\left(C\right)\right)}\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      9. sub-flipN/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} \]
      10. 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} \]
      11. 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} \]
      12. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \mathsf{hypot}\left(\color{blue}{A - C}, 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(A - C, 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 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. associate--r+N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
      4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 78.0% accurate, 1.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}\;C \leq -1.3 \cdot 10^{-54}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\_m\right) - A}{B\_m}\right)}{\pi}\\ \mathbf{elif}\;C \leq 8.2 \cdot 10^{+160}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-\left(\mathsf{hypot}\left(A, B\_m\right) + A\right)}{B\_m}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B\_m}{C} \cdot -0.5\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.3e-54)
        (/ (* 180.0 (atan (/ (- (- C B_m) A) B_m))) PI)
        (if (<= C 8.2e+160)
          (* 180.0 (/ (atan (/ (- (+ (hypot A B_m) A)) B_m)) PI))
          (* 180.0 (/ (atan (* (/ B_m C) -0.5)) 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.3e-54) {
    		tmp = (180.0 * atan((((C - B_m) - A) / B_m))) / ((double) M_PI);
    	} else if (C <= 8.2e+160) {
    		tmp = 180.0 * (atan((-(hypot(A, B_m) + A) / B_m)) / ((double) M_PI));
    	} else {
    		tmp = 180.0 * (atan(((B_m / C) * -0.5)) / ((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 (C <= -1.3e-54) {
    		tmp = (180.0 * Math.atan((((C - B_m) - A) / B_m))) / Math.PI;
    	} else if (C <= 8.2e+160) {
    		tmp = 180.0 * (Math.atan((-(Math.hypot(A, B_m) + A) / B_m)) / Math.PI);
    	} else {
    		tmp = 180.0 * (Math.atan(((B_m / C) * -0.5)) / 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 C <= -1.3e-54:
    		tmp = (180.0 * math.atan((((C - B_m) - A) / B_m))) / math.pi
    	elif C <= 8.2e+160:
    		tmp = 180.0 * (math.atan((-(math.hypot(A, B_m) + A) / B_m)) / math.pi)
    	else:
    		tmp = 180.0 * (math.atan(((B_m / C) * -0.5)) / 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 (C <= -1.3e-54)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - B_m) - A) / B_m))) / pi);
    	elseif (C <= 8.2e+160)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-Float64(hypot(A, B_m) + A)) / B_m)) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B_m / C) * -0.5)) / 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 (C <= -1.3e-54)
    		tmp = (180.0 * atan((((C - B_m) - A) / B_m))) / pi;
    	elseif (C <= 8.2e+160)
    		tmp = 180.0 * (atan((-(hypot(A, B_m) + A) / B_m)) / pi);
    	else
    		tmp = 180.0 * (atan(((B_m / C) * -0.5)) / 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[C, -1.3e-54], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - B$95$m), $MachinePrecision] - A), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 8.2e+160], N[(180.0 * N[(N[ArcTan[N[((-N[(N[Sqrt[A ^ 2 + B$95$m ^ 2], $MachinePrecision] + A), $MachinePrecision]) / B$95$m), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B$95$m / C), $MachinePrecision] * -0.5), $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.3 \cdot 10^{-54}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\_m\right) - A}{B\_m}\right)}{\pi}\\
    
    \mathbf{elif}\;C \leq 8.2 \cdot 10^{+160}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-\left(\mathsf{hypot}\left(A, B\_m\right) + A\right)}{B\_m}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B\_m}{C} \cdot -0.5\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if C < -1.30000000000000001e-54

      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. associate--r+N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
        4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

      if -1.30000000000000001e-54 < C < 8.19999999999999996e160

      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 0

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

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

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(\sqrt{\mathsf{fma}\left(A, A, {B}^{2}\right)} + A\right)}{B}\right)}{\pi} \]
        10. unpow2N/A

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(\sqrt{A \cdot A + B \cdot B} + A\right)}{B}\right)}{\pi} \]
        4. lower-hypot.f6463.9

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

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

      if 8.19999999999999996e160 < 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 A around 0

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, {B}^{2}\right)}}{B}\right)}{\pi} \]
        7. unpow2N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, B \cdot B\right)}}{B}\right)}{\pi} \]
        8. lower-*.f6444.9

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, B \cdot B\right)}}{B}\right)}{\pi} \]
      4. Applied rewrites44.9%

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

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

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

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

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

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

    Alternative 3: 75.3% accurate, 2.1× 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 4.6 \cdot 10^{+55}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\_m\right) - A}{B\_m}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B\_m}{C}, -0.5, \frac{0}{B\_m}\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 4.6e+55)
        (/ (* 180.0 (atan (/ (- (- C B_m) A) B_m))) PI)
        (/ (* 180.0 (atan (fma (/ B_m C) -0.5 (/ 0.0 B_m)))) 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 <= 4.6e+55) {
    		tmp = (180.0 * atan((((C - B_m) - A) / B_m))) / ((double) M_PI);
    	} else {
    		tmp = (180.0 * atan(fma((B_m / C), -0.5, (0.0 / B_m)))) / ((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 <= 4.6e+55)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - B_m) - A) / B_m))) / pi);
    	else
    		tmp = Float64(Float64(180.0 * atan(fma(Float64(B_m / C), -0.5, Float64(0.0 / B_m)))) / 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, 4.6e+55], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - B$95$m), $MachinePrecision] - A), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B$95$m / C), $MachinePrecision] * -0.5 + N[(0.0 / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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}\;C \leq 4.6 \cdot 10^{+55}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\_m\right) - A}{B\_m}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B\_m}{C}, -0.5, \frac{0}{B\_m}\right)\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if C < 4.59999999999999975e55

      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. associate--r+N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
        4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

      if 4.59999999999999975e55 < 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 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. associate--r+N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
        4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\mathsf{fma}\left(\frac{B}{C}, -0.5, \frac{0}{B}\right)\right)}}{\pi} \]
      12. Recombined 2 regimes into one program.
      13. 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}\;C \leq 4.6 \cdot 10^{+55}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\_m\right) - A}{B\_m}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B\_m}{C} \cdot -0.5\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 4.6e+55)
          (/ (* 180.0 (atan (/ (- (- C B_m) A) B_m))) PI)
          (* 180.0 (/ (atan (* (/ B_m C) -0.5)) 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 <= 4.6e+55) {
      		tmp = (180.0 * atan((((C - B_m) - A) / B_m))) / ((double) M_PI);
      	} else {
      		tmp = 180.0 * (atan(((B_m / C) * -0.5)) / ((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 (C <= 4.6e+55) {
      		tmp = (180.0 * Math.atan((((C - B_m) - A) / B_m))) / Math.PI;
      	} else {
      		tmp = 180.0 * (Math.atan(((B_m / C) * -0.5)) / 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 C <= 4.6e+55:
      		tmp = (180.0 * math.atan((((C - B_m) - A) / B_m))) / math.pi
      	else:
      		tmp = 180.0 * (math.atan(((B_m / C) * -0.5)) / 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 (C <= 4.6e+55)
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - B_m) - A) / B_m))) / pi);
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B_m / C) * -0.5)) / 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 (C <= 4.6e+55)
      		tmp = (180.0 * atan((((C - B_m) - A) / B_m))) / pi;
      	else
      		tmp = 180.0 * (atan(((B_m / C) * -0.5)) / 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[C, 4.6e+55], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - B$95$m), $MachinePrecision] - A), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B$95$m / C), $MachinePrecision] * -0.5), $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 4.6 \cdot 10^{+55}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\_m\right) - A}{B\_m}\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B\_m}{C} \cdot -0.5\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if C < 4.59999999999999975e55

        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. associate--r+N/A

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

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

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

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
          4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

        if 4.59999999999999975e55 < 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 A around 0

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, {B}^{2}\right)}}{B}\right)}{\pi} \]
          7. unpow2N/A

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, B \cdot B\right)}}{B}\right)}{\pi} \]
          8. lower-*.f6444.9

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, B \cdot B\right)}}{B}\right)}{\pi} \]
        4. Applied rewrites44.9%

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

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

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

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

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

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

      Alternative 5: 74.7% accurate, 2.1× 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.35 \cdot 10^{-54}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.6 \cdot 10^{+55}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + B\_m\right)}{B\_m}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B\_m}{C} \cdot -0.5\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.35e-54)
          (/ (* 180.0 (atan (- (/ C B_m) 1.0))) PI)
          (if (<= C 4.6e+55)
            (* 180.0 (/ (atan (/ (- (+ A B_m)) B_m)) PI))
            (* 180.0 (/ (atan (* (/ B_m C) -0.5)) 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.35e-54) {
      		tmp = (180.0 * atan(((C / B_m) - 1.0))) / ((double) M_PI);
      	} else if (C <= 4.6e+55) {
      		tmp = 180.0 * (atan((-(A + B_m) / B_m)) / ((double) M_PI));
      	} else {
      		tmp = 180.0 * (atan(((B_m / C) * -0.5)) / ((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 (C <= -1.35e-54) {
      		tmp = (180.0 * Math.atan(((C / B_m) - 1.0))) / Math.PI;
      	} else if (C <= 4.6e+55) {
      		tmp = 180.0 * (Math.atan((-(A + B_m) / B_m)) / Math.PI);
      	} else {
      		tmp = 180.0 * (Math.atan(((B_m / C) * -0.5)) / 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 C <= -1.35e-54:
      		tmp = (180.0 * math.atan(((C / B_m) - 1.0))) / math.pi
      	elif C <= 4.6e+55:
      		tmp = 180.0 * (math.atan((-(A + B_m) / B_m)) / math.pi)
      	else:
      		tmp = 180.0 * (math.atan(((B_m / C) * -0.5)) / 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 (C <= -1.35e-54)
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B_m) - 1.0))) / pi);
      	elseif (C <= 4.6e+55)
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-Float64(A + B_m)) / B_m)) / pi));
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B_m / C) * -0.5)) / 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 (C <= -1.35e-54)
      		tmp = (180.0 * atan(((C / B_m) - 1.0))) / pi;
      	elseif (C <= 4.6e+55)
      		tmp = 180.0 * (atan((-(A + B_m) / B_m)) / pi);
      	else
      		tmp = 180.0 * (atan(((B_m / C) * -0.5)) / 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[C, -1.35e-54], N[(N[(180.0 * N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 4.6e+55], N[(180.0 * N[(N[ArcTan[N[((-N[(A + B$95$m), $MachinePrecision]) / B$95$m), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B$95$m / C), $MachinePrecision] * -0.5), $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.35 \cdot 10^{-54}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\
      
      \mathbf{elif}\;C \leq 4.6 \cdot 10^{+55}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + B\_m\right)}{B\_m}\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B\_m}{C} \cdot -0.5\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if C < -1.35000000000000013e-54

        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. associate--r+N/A

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

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

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

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
          4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
          7. sub-flipN/A

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
          8. sub-to-mult-revN/A

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

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

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
          12. div-subN/A

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

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

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

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

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

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

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

        if -1.35000000000000013e-54 < C < 4.59999999999999975e55

        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. associate--r+N/A

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

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

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

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
          4. metadata-evalN/A

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1 \cdot \left(A + B\right)}{B}\right)}{\pi} \]
        9. Step-by-step derivation
          1. mul-1-negN/A

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

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

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

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

        if 4.59999999999999975e55 < 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 A around 0

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, {B}^{2}\right)}}{B}\right)}{\pi} \]
          7. unpow2N/A

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, B \cdot B\right)}}{B}\right)}{\pi} \]
          8. lower-*.f6444.9

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, B \cdot B\right)}}{B}\right)}{\pi} \]
        4. Applied rewrites44.9%

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

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

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

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

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

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

      Alternative 6: 74.0% 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}\;C \leq -1.35 \cdot 10^{-54}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.6 \cdot 10^{+55}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(-B\_m\right) - A}{B\_m}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B\_m}{C} \cdot -0.5\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.35e-54)
          (/ (* 180.0 (atan (- (/ C B_m) 1.0))) PI)
          (if (<= C 4.6e+55)
            (/ (* 180.0 (atan (/ (- (- B_m) A) B_m))) PI)
            (* 180.0 (/ (atan (* (/ B_m C) -0.5)) 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.35e-54) {
      		tmp = (180.0 * atan(((C / B_m) - 1.0))) / ((double) M_PI);
      	} else if (C <= 4.6e+55) {
      		tmp = (180.0 * atan(((-B_m - A) / B_m))) / ((double) M_PI);
      	} else {
      		tmp = 180.0 * (atan(((B_m / C) * -0.5)) / ((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 (C <= -1.35e-54) {
      		tmp = (180.0 * Math.atan(((C / B_m) - 1.0))) / Math.PI;
      	} else if (C <= 4.6e+55) {
      		tmp = (180.0 * Math.atan(((-B_m - A) / B_m))) / Math.PI;
      	} else {
      		tmp = 180.0 * (Math.atan(((B_m / C) * -0.5)) / 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 C <= -1.35e-54:
      		tmp = (180.0 * math.atan(((C / B_m) - 1.0))) / math.pi
      	elif C <= 4.6e+55:
      		tmp = (180.0 * math.atan(((-B_m - A) / B_m))) / math.pi
      	else:
      		tmp = 180.0 * (math.atan(((B_m / C) * -0.5)) / 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 (C <= -1.35e-54)
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B_m) - 1.0))) / pi);
      	elseif (C <= 4.6e+55)
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-B_m) - A) / B_m))) / pi);
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B_m / C) * -0.5)) / 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 (C <= -1.35e-54)
      		tmp = (180.0 * atan(((C / B_m) - 1.0))) / pi;
      	elseif (C <= 4.6e+55)
      		tmp = (180.0 * atan(((-B_m - A) / B_m))) / pi;
      	else
      		tmp = 180.0 * (atan(((B_m / C) * -0.5)) / 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[C, -1.35e-54], N[(N[(180.0 * N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 4.6e+55], N[(N[(180.0 * N[ArcTan[N[(N[((-B$95$m) - A), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B$95$m / C), $MachinePrecision] * -0.5), $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.35 \cdot 10^{-54}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\
      
      \mathbf{elif}\;C \leq 4.6 \cdot 10^{+55}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(-B\_m\right) - A}{B\_m}\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B\_m}{C} \cdot -0.5\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if C < -1.35000000000000013e-54

        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. associate--r+N/A

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

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

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

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
          4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
          7. sub-flipN/A

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
          8. sub-to-mult-revN/A

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

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

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
          12. div-subN/A

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

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

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

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

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

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

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

        if -1.35000000000000013e-54 < C < 4.59999999999999975e55

        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. associate--r+N/A

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

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

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

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
          4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{-1 \cdot \left(A + B\right)}{B}\right)}{\pi} \]
        11. Step-by-step derivation
          1. sub-to-mult-revN/A

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

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\mathsf{neg}\left(\left(A - \left(\mathsf{neg}\left(B\right)\right)\right)\right)}{B}\right)}{\pi} \]
          4. mul-1-negN/A

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\mathsf{neg}\left(\left(A - -1 \cdot B\right)\right)}{B}\right)}{\pi} \]
          5. sub-negate-revN/A

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{-1 \cdot B - A}{B}\right)}{\pi} \]
          6. mul-1-negN/A

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(B\right)\right) - A}{B}\right)}{\pi} \]
          8. lower-neg.f6455.7

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

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

        if 4.59999999999999975e55 < 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 A around 0

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, {B}^{2}\right)}}{B}\right)}{\pi} \]
          7. unpow2N/A

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, B \cdot B\right)}}{B}\right)}{\pi} \]
          8. lower-*.f6444.9

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, B \cdot B\right)}}{B}\right)}{\pi} \]
        4. Applied rewrites44.9%

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

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

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

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

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

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

      Alternative 7: 74.0% 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}\;C \leq -1.35 \cdot 10^{-54}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\ \mathbf{elif}\;C \leq 4.6 \cdot 10^{+55}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B\_m}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B\_m}{C} \cdot -0.5\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.35e-54)
          (/ (* 180.0 (atan (- (/ C B_m) 1.0))) PI)
          (if (<= C 4.6e+55)
            (/ (* 180.0 (atan (- -1.0 (/ A B_m)))) PI)
            (* 180.0 (/ (atan (* (/ B_m C) -0.5)) 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.35e-54) {
      		tmp = (180.0 * atan(((C / B_m) - 1.0))) / ((double) M_PI);
      	} else if (C <= 4.6e+55) {
      		tmp = (180.0 * atan((-1.0 - (A / B_m)))) / ((double) M_PI);
      	} else {
      		tmp = 180.0 * (atan(((B_m / C) * -0.5)) / ((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 (C <= -1.35e-54) {
      		tmp = (180.0 * Math.atan(((C / B_m) - 1.0))) / Math.PI;
      	} else if (C <= 4.6e+55) {
      		tmp = (180.0 * Math.atan((-1.0 - (A / B_m)))) / Math.PI;
      	} else {
      		tmp = 180.0 * (Math.atan(((B_m / C) * -0.5)) / 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 C <= -1.35e-54:
      		tmp = (180.0 * math.atan(((C / B_m) - 1.0))) / math.pi
      	elif C <= 4.6e+55:
      		tmp = (180.0 * math.atan((-1.0 - (A / B_m)))) / math.pi
      	else:
      		tmp = 180.0 * (math.atan(((B_m / C) * -0.5)) / 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 (C <= -1.35e-54)
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B_m) - 1.0))) / pi);
      	elseif (C <= 4.6e+55)
      		tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B_m)))) / pi);
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B_m / C) * -0.5)) / 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 (C <= -1.35e-54)
      		tmp = (180.0 * atan(((C / B_m) - 1.0))) / pi;
      	elseif (C <= 4.6e+55)
      		tmp = (180.0 * atan((-1.0 - (A / B_m)))) / pi;
      	else
      		tmp = 180.0 * (atan(((B_m / C) * -0.5)) / 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[C, -1.35e-54], N[(N[(180.0 * N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 4.6e+55], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B$95$m / C), $MachinePrecision] * -0.5), $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.35 \cdot 10^{-54}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\
      
      \mathbf{elif}\;C \leq 4.6 \cdot 10^{+55}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B\_m}\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B\_m}{C} \cdot -0.5\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if C < -1.35000000000000013e-54

        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. associate--r+N/A

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

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

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

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
          4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
          7. sub-flipN/A

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
          8. sub-to-mult-revN/A

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

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

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
          12. div-subN/A

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

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

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

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

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

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

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

        if -1.35000000000000013e-54 < C < 4.59999999999999975e55

        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. associate--r+N/A

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

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

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

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
          4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

          if 4.59999999999999975e55 < 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 A around 0

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

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

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, {B}^{2}\right)}}{B}\right)}{\pi} \]
            7. unpow2N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, B \cdot B\right)}}{B}\right)}{\pi} \]
            8. lower-*.f6444.9

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \sqrt{\mathsf{fma}\left(C, C, B \cdot B\right)}}{B}\right)}{\pi} \]
          4. Applied rewrites44.9%

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

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

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

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

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

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

        Alternative 8: 74.0% 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 -1.7 \cdot 10^{+90}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B\_m}{A} \cdot 0.5\right)}{\pi} \cdot 180\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-34}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B\_m}\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 (<= A -1.7e+90)
            (* (/ (atan (* (/ B_m A) 0.5)) PI) 180.0)
            (if (<= A 5e-34)
              (/ (* 180.0 (atan (- (/ C B_m) 1.0))) PI)
              (/ (* 180.0 (atan (- -1.0 (/ A B_m)))) 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 <= -1.7e+90) {
        		tmp = (atan(((B_m / A) * 0.5)) / ((double) M_PI)) * 180.0;
        	} else if (A <= 5e-34) {
        		tmp = (180.0 * atan(((C / B_m) - 1.0))) / ((double) M_PI);
        	} else {
        		tmp = (180.0 * atan((-1.0 - (A / B_m)))) / ((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 <= -1.7e+90) {
        		tmp = (Math.atan(((B_m / A) * 0.5)) / Math.PI) * 180.0;
        	} else if (A <= 5e-34) {
        		tmp = (180.0 * Math.atan(((C / B_m) - 1.0))) / Math.PI;
        	} else {
        		tmp = (180.0 * Math.atan((-1.0 - (A / B_m)))) / 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 <= -1.7e+90:
        		tmp = (math.atan(((B_m / A) * 0.5)) / math.pi) * 180.0
        	elif A <= 5e-34:
        		tmp = (180.0 * math.atan(((C / B_m) - 1.0))) / math.pi
        	else:
        		tmp = (180.0 * math.atan((-1.0 - (A / B_m)))) / 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 <= -1.7e+90)
        		tmp = Float64(Float64(atan(Float64(Float64(B_m / A) * 0.5)) / pi) * 180.0);
        	elseif (A <= 5e-34)
        		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B_m) - 1.0))) / pi);
        	else
        		tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B_m)))) / 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 <= -1.7e+90)
        		tmp = (atan(((B_m / A) * 0.5)) / pi) * 180.0;
        	elseif (A <= 5e-34)
        		tmp = (180.0 * atan(((C / B_m) - 1.0))) / pi;
        	else
        		tmp = (180.0 * atan((-1.0 - (A / B_m)))) / 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, -1.7e+90], N[(N[(N[ArcTan[N[(N[(B$95$m / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], If[LessEqual[A, 5e-34], N[(N[(180.0 * N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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 -1.7 \cdot 10^{+90}:\\
        \;\;\;\;\frac{\tan^{-1} \left(\frac{B\_m}{A} \cdot 0.5\right)}{\pi} \cdot 180\\
        
        \mathbf{elif}\;A \leq 5 \cdot 10^{-34}:\\
        \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B\_m}\right)}{\pi}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if A < -1.70000000000000009e90

          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. *-commutativeN/A

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

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

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

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

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

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

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

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

              \[\leadsto 180 \cdot \left(\tan^{-1} \left(\frac{B}{A} \cdot \frac{1}{2}\right) \cdot \frac{1}{\pi}\right) \]
            6. pow2N/A

              \[\leadsto 180 \cdot \left(\tan^{-1} \left(\frac{B}{A} \cdot \frac{1}{2}\right) \cdot \mathsf{Rewrite=>}\left(lower-/.f64, \left(\frac{1}{\pi}\right)\right)\right) \]
          6. Applied rewrites26.8%

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

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

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

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

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

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

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

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

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

          if -1.70000000000000009e90 < A < 5.0000000000000003e-34

          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. associate--r+N/A

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

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

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

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

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

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
            4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
            7. sub-flipN/A

              \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
            8. sub-to-mult-revN/A

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

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

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

              \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
            12. div-subN/A

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

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

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

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

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

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

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

          if 5.0000000000000003e-34 < 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. associate--r+N/A

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

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

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

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

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

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
            4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

          Alternative 9: 67.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}\;C \leq -1.35 \cdot 10^{-54}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\ \mathbf{elif}\;C \leq 6.5 \cdot 10^{+167}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B\_m}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\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.35e-54)
              (/ (* 180.0 (atan (- (/ C B_m) 1.0))) PI)
              (if (<= C 6.5e+167)
                (/ (* 180.0 (atan (- -1.0 (/ A B_m)))) PI)
                (* 180.0 (/ (atan 0.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 (C <= -1.35e-54) {
          		tmp = (180.0 * atan(((C / B_m) - 1.0))) / ((double) M_PI);
          	} else if (C <= 6.5e+167) {
          		tmp = (180.0 * atan((-1.0 - (A / B_m)))) / ((double) M_PI);
          	} else {
          		tmp = 180.0 * (atan(0.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 (C <= -1.35e-54) {
          		tmp = (180.0 * Math.atan(((C / B_m) - 1.0))) / Math.PI;
          	} else if (C <= 6.5e+167) {
          		tmp = (180.0 * Math.atan((-1.0 - (A / B_m)))) / Math.PI;
          	} else {
          		tmp = 180.0 * (Math.atan(0.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 C <= -1.35e-54:
          		tmp = (180.0 * math.atan(((C / B_m) - 1.0))) / math.pi
          	elif C <= 6.5e+167:
          		tmp = (180.0 * math.atan((-1.0 - (A / B_m)))) / math.pi
          	else:
          		tmp = 180.0 * (math.atan(0.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 (C <= -1.35e-54)
          		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B_m) - 1.0))) / pi);
          	elseif (C <= 6.5e+167)
          		tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B_m)))) / pi);
          	else
          		tmp = Float64(180.0 * Float64(atan(0.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 (C <= -1.35e-54)
          		tmp = (180.0 * atan(((C / B_m) - 1.0))) / pi;
          	elseif (C <= 6.5e+167)
          		tmp = (180.0 * atan((-1.0 - (A / B_m)))) / pi;
          	else
          		tmp = 180.0 * (atan(0.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[C, -1.35e-54], N[(N[(180.0 * N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 6.5e+167], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[0.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 \begin{array}{l}
          \mathbf{if}\;C \leq -1.35 \cdot 10^{-54}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\
          
          \mathbf{elif}\;C \leq 6.5 \cdot 10^{+167}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B\_m}\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if C < -1.35000000000000013e-54

            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. associate--r+N/A

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

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

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

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

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
              4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
              7. sub-flipN/A

                \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
              8. sub-to-mult-revN/A

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

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

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

                \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi} \]
              12. div-subN/A

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

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

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

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

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

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

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

            if -1.35000000000000013e-54 < C < 6.5e167

            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. associate--r+N/A

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

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

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

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

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
              4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

              if 6.5e167 < 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}\right)}}{\pi} \]
              3. Step-by-step derivation
                1. mul-1-negN/A

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{A + -1 \cdot A}{B}\right)}{\pi} \]
                4. distribute-rgt1-inN/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{\left(-1 + 1\right) \cdot A}{B}\right)}{\pi} \]
                5. metadata-evalN/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{0 \cdot A}{B}\right)}{\pi} \]
                6. lower-*.f6413.5

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} 0}{\pi} \]
              6. Step-by-step derivation
                1. Applied rewrites13.5%

                  \[\leadsto 180 \cdot \frac{\tan^{-1} 0}{\pi} \]
              7. Recombined 3 regimes into one program.
              8. Add Preprocessing

              Alternative 10: 67.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}\;C \leq -1.35 \cdot 10^{-54}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\ \mathbf{elif}\;C \leq 6.5 \cdot 10^{+167}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B\_m}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\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.35e-54)
                  (* 180.0 (/ (atan (- (/ C B_m) 1.0)) PI))
                  (if (<= C 6.5e+167)
                    (/ (* 180.0 (atan (- -1.0 (/ A B_m)))) PI)
                    (* 180.0 (/ (atan 0.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 (C <= -1.35e-54) {
              		tmp = 180.0 * (atan(((C / B_m) - 1.0)) / ((double) M_PI));
              	} else if (C <= 6.5e+167) {
              		tmp = (180.0 * atan((-1.0 - (A / B_m)))) / ((double) M_PI);
              	} else {
              		tmp = 180.0 * (atan(0.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 (C <= -1.35e-54) {
              		tmp = 180.0 * (Math.atan(((C / B_m) - 1.0)) / Math.PI);
              	} else if (C <= 6.5e+167) {
              		tmp = (180.0 * Math.atan((-1.0 - (A / B_m)))) / Math.PI;
              	} else {
              		tmp = 180.0 * (Math.atan(0.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 C <= -1.35e-54:
              		tmp = 180.0 * (math.atan(((C / B_m) - 1.0)) / math.pi)
              	elif C <= 6.5e+167:
              		tmp = (180.0 * math.atan((-1.0 - (A / B_m)))) / math.pi
              	else:
              		tmp = 180.0 * (math.atan(0.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 (C <= -1.35e-54)
              		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B_m) - 1.0)) / pi));
              	elseif (C <= 6.5e+167)
              		tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B_m)))) / pi);
              	else
              		tmp = Float64(180.0 * Float64(atan(0.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 (C <= -1.35e-54)
              		tmp = 180.0 * (atan(((C / B_m) - 1.0)) / pi);
              	elseif (C <= 6.5e+167)
              		tmp = (180.0 * atan((-1.0 - (A / B_m)))) / pi;
              	else
              		tmp = 180.0 * (atan(0.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[C, -1.35e-54], N[(180.0 * N[(N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.5e+167], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[0.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 \begin{array}{l}
              \mathbf{if}\;C \leq -1.35 \cdot 10^{-54}:\\
              \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\
              
              \mathbf{elif}\;C \leq 6.5 \cdot 10^{+167}:\\
              \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B\_m}\right)}{\pi}\\
              
              \mathbf{else}:\\
              \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if C < -1.35000000000000013e-54

                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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

                if -1.35000000000000013e-54 < C < 6.5e167

                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. associate--r+N/A

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

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

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

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

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

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

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

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
                  4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

                  if 6.5e167 < 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}\right)}}{\pi} \]
                  3. Step-by-step derivation
                    1. mul-1-negN/A

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{A + -1 \cdot A}{B}\right)}{\pi} \]
                    4. distribute-rgt1-inN/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{\left(-1 + 1\right) \cdot A}{B}\right)}{\pi} \]
                    5. metadata-evalN/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{0 \cdot A}{B}\right)}{\pi} \]
                    6. lower-*.f6413.5

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} 0}{\pi} \]
                  6. Step-by-step derivation
                    1. Applied rewrites13.5%

                      \[\leadsto 180 \cdot \frac{\tan^{-1} 0}{\pi} \]
                  7. Recombined 3 regimes into one program.
                  8. Add Preprocessing

                  Alternative 11: 63.9% 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.9 \cdot 10^{+223}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{elif}\;A \leq 5.4 \cdot 10^{+137}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B\_m}\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 (<= A -3.9e+223)
                      (* 180.0 (/ (atan 0.0) PI))
                      (if (<= A 5.4e+137)
                        (* 180.0 (/ (atan (- (/ C B_m) 1.0)) PI))
                        (* 180.0 (/ (atan (/ (- A) B_m)) 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.9e+223) {
                  		tmp = 180.0 * (atan(0.0) / ((double) M_PI));
                  	} else if (A <= 5.4e+137) {
                  		tmp = 180.0 * (atan(((C / B_m) - 1.0)) / ((double) M_PI));
                  	} else {
                  		tmp = 180.0 * (atan((-A / B_m)) / ((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.9e+223) {
                  		tmp = 180.0 * (Math.atan(0.0) / Math.PI);
                  	} else if (A <= 5.4e+137) {
                  		tmp = 180.0 * (Math.atan(((C / B_m) - 1.0)) / Math.PI);
                  	} else {
                  		tmp = 180.0 * (Math.atan((-A / B_m)) / 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.9e+223:
                  		tmp = 180.0 * (math.atan(0.0) / math.pi)
                  	elif A <= 5.4e+137:
                  		tmp = 180.0 * (math.atan(((C / B_m) - 1.0)) / math.pi)
                  	else:
                  		tmp = 180.0 * (math.atan((-A / B_m)) / 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.9e+223)
                  		tmp = Float64(180.0 * Float64(atan(0.0) / pi));
                  	elseif (A <= 5.4e+137)
                  		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B_m) - 1.0)) / pi));
                  	else
                  		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B_m)) / 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.9e+223)
                  		tmp = 180.0 * (atan(0.0) / pi);
                  	elseif (A <= 5.4e+137)
                  		tmp = 180.0 * (atan(((C / B_m) - 1.0)) / pi);
                  	else
                  		tmp = 180.0 * (atan((-A / B_m)) / 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.9e+223], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.4e+137], N[(180.0 * N[(N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[((-A) / B$95$m), $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}\;A \leq -3.9 \cdot 10^{+223}:\\
                  \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
                  
                  \mathbf{elif}\;A \leq 5.4 \cdot 10^{+137}:\\
                  \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B\_m}\right)}{\pi}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if A < -3.8999999999999999e223

                    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}\right)}}{\pi} \]
                    3. Step-by-step derivation
                      1. mul-1-negN/A

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

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

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{A + -1 \cdot A}{B}\right)}{\pi} \]
                      4. distribute-rgt1-inN/A

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{\left(-1 + 1\right) \cdot A}{B}\right)}{\pi} \]
                      5. metadata-evalN/A

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{0 \cdot A}{B}\right)}{\pi} \]
                      6. lower-*.f6413.5

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} 0}{\pi} \]
                    6. Step-by-step derivation
                      1. Applied rewrites13.5%

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

                      if -3.8999999999999999e223 < A < 5.40000000000000034e137

                      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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

                      if 5.40000000000000034e137 < 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. associate--r+N/A

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

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

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

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

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

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

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
                        4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

                    Alternative 12: 52.0% accurate, 2.4× 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 -2.4 \cdot 10^{+115}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{elif}\;A \leq 5.8 \cdot 10^{+51}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B\_m}\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 (<= A -2.4e+115)
                        (* 180.0 (/ (atan 0.0) PI))
                        (if (<= A 5.8e+51)
                          (* 180.0 (/ (atan -1.0) PI))
                          (* 180.0 (/ (atan (/ (- A) B_m)) 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 <= -2.4e+115) {
                    		tmp = 180.0 * (atan(0.0) / ((double) M_PI));
                    	} else if (A <= 5.8e+51) {
                    		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
                    	} else {
                    		tmp = 180.0 * (atan((-A / B_m)) / ((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 <= -2.4e+115) {
                    		tmp = 180.0 * (Math.atan(0.0) / Math.PI);
                    	} else if (A <= 5.8e+51) {
                    		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
                    	} else {
                    		tmp = 180.0 * (Math.atan((-A / B_m)) / 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 <= -2.4e+115:
                    		tmp = 180.0 * (math.atan(0.0) / math.pi)
                    	elif A <= 5.8e+51:
                    		tmp = 180.0 * (math.atan(-1.0) / math.pi)
                    	else:
                    		tmp = 180.0 * (math.atan((-A / B_m)) / 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 <= -2.4e+115)
                    		tmp = Float64(180.0 * Float64(atan(0.0) / pi));
                    	elseif (A <= 5.8e+51)
                    		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
                    	else
                    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B_m)) / 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 <= -2.4e+115)
                    		tmp = 180.0 * (atan(0.0) / pi);
                    	elseif (A <= 5.8e+51)
                    		tmp = 180.0 * (atan(-1.0) / pi);
                    	else
                    		tmp = 180.0 * (atan((-A / B_m)) / 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, -2.4e+115], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.8e+51], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[((-A) / B$95$m), $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}\;A \leq -2.4 \cdot 10^{+115}:\\
                    \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
                    
                    \mathbf{elif}\;A \leq 5.8 \cdot 10^{+51}:\\
                    \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B\_m}\right)}{\pi}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if A < -2.4e115

                      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}\right)}}{\pi} \]
                      3. Step-by-step derivation
                        1. mul-1-negN/A

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{A + -1 \cdot A}{B}\right)}{\pi} \]
                        4. distribute-rgt1-inN/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{\left(-1 + 1\right) \cdot A}{B}\right)}{\pi} \]
                        5. metadata-evalN/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{0 \cdot A}{B}\right)}{\pi} \]
                        6. lower-*.f6413.5

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

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

                        \[\leadsto 180 \cdot \frac{\tan^{-1} 0}{\pi} \]
                      6. Step-by-step derivation
                        1. Applied rewrites13.5%

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

                        if -2.4e115 < A < 5.7999999999999997e51

                        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.7999999999999997e51 < 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. associate--r+N/A

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

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

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

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

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

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

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

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

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

                              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
                            4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

                        Alternative 13: 51.4% accurate, 2.8× 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 -3.6 \cdot 10^{-57}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B\_m}\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.3 \cdot 10^{+161}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\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 -3.6e-57)
                            (* 180.0 (/ (atan (/ C B_m)) PI))
                            (if (<= C 1.3e+161)
                              (* 180.0 (/ (atan -1.0) PI))
                              (* 180.0 (/ (atan 0.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 (C <= -3.6e-57) {
                        		tmp = 180.0 * (atan((C / B_m)) / ((double) M_PI));
                        	} else if (C <= 1.3e+161) {
                        		tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
                        	} else {
                        		tmp = 180.0 * (atan(0.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 (C <= -3.6e-57) {
                        		tmp = 180.0 * (Math.atan((C / B_m)) / Math.PI);
                        	} else if (C <= 1.3e+161) {
                        		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
                        	} else {
                        		tmp = 180.0 * (Math.atan(0.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 C <= -3.6e-57:
                        		tmp = 180.0 * (math.atan((C / B_m)) / math.pi)
                        	elif C <= 1.3e+161:
                        		tmp = 180.0 * (math.atan(-1.0) / math.pi)
                        	else:
                        		tmp = 180.0 * (math.atan(0.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 (C <= -3.6e-57)
                        		tmp = Float64(180.0 * Float64(atan(Float64(C / B_m)) / pi));
                        	elseif (C <= 1.3e+161)
                        		tmp = Float64(180.0 * Float64(atan(-1.0) / pi));
                        	else
                        		tmp = Float64(180.0 * Float64(atan(0.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 (C <= -3.6e-57)
                        		tmp = 180.0 * (atan((C / B_m)) / pi);
                        	elseif (C <= 1.3e+161)
                        		tmp = 180.0 * (atan(-1.0) / pi);
                        	else
                        		tmp = 180.0 * (atan(0.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[C, -3.6e-57], N[(180.0 * N[(N[ArcTan[N[(C / B$95$m), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.3e+161], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[0.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 \begin{array}{l}
                        \mathbf{if}\;C \leq -3.6 \cdot 10^{-57}:\\
                        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B\_m}\right)}{\pi}\\
                        
                        \mathbf{elif}\;C \leq 1.3 \cdot 10^{+161}:\\
                        \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if C < -3.6000000000000002e-57

                          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. associate--r+N/A

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

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

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

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

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

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

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

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

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

                              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \left(\mathsf{neg}\left(-1\right)\right) \cdot B\right) - A}{B}\right)}{\pi} \]
                            4. metadata-evalN/A

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

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

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

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

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

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

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

                          if -3.6000000000000002e-57 < C < 1.2999999999999999e161

                          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 1.2999999999999999e161 < 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}\right)}}{\pi} \]
                            3. Step-by-step derivation
                              1. mul-1-negN/A

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

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

                                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{A + -1 \cdot A}{B}\right)}{\pi} \]
                              4. distribute-rgt1-inN/A

                                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{\left(-1 + 1\right) \cdot A}{B}\right)}{\pi} \]
                              5. metadata-evalN/A

                                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{0 \cdot A}{B}\right)}{\pi} \]
                              6. lower-*.f6413.5

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

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

                              \[\leadsto 180 \cdot \frac{\tan^{-1} 0}{\pi} \]
                            6. Step-by-step derivation
                              1. Applied rewrites13.5%

                                \[\leadsto 180 \cdot \frac{\tan^{-1} 0}{\pi} \]
                            7. Recombined 3 regimes into one program.
                            8. Add Preprocessing

                            Alternative 14: 44.9% accurate, 3.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}\;B\_m \leq 9.5 \cdot 10^{-138}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\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 (<= B_m 9.5e-138)
                                (* 180.0 (/ (atan 0.0) PI))
                                (* 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) {
                            	double tmp;
                            	if (B_m <= 9.5e-138) {
                            		tmp = 180.0 * (atan(0.0) / ((double) M_PI));
                            	} else {
                            		tmp = 180.0 * (atan(-1.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 (B_m <= 9.5e-138) {
                            		tmp = 180.0 * (Math.atan(0.0) / Math.PI);
                            	} else {
                            		tmp = 180.0 * (Math.atan(-1.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 B_m <= 9.5e-138:
                            		tmp = 180.0 * (math.atan(0.0) / math.pi)
                            	else:
                            		tmp = 180.0 * (math.atan(-1.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 (B_m <= 9.5e-138)
                            		tmp = Float64(180.0 * Float64(atan(0.0) / pi));
                            	else
                            		tmp = Float64(180.0 * Float64(atan(-1.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 (B_m <= 9.5e-138)
                            		tmp = 180.0 * (atan(0.0) / pi);
                            	else
                            		tmp = 180.0 * (atan(-1.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[B$95$m, 9.5e-138], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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 \begin{array}{l}
                            \mathbf{if}\;B\_m \leq 9.5 \cdot 10^{-138}:\\
                            \;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if B < 9.49999999999999997e-138

                              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}\right)}}{\pi} \]
                              3. Step-by-step derivation
                                1. mul-1-negN/A

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

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

                                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{A + -1 \cdot A}{B}\right)}{\pi} \]
                                4. distribute-rgt1-inN/A

                                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{\left(-1 + 1\right) \cdot A}{B}\right)}{\pi} \]
                                5. metadata-evalN/A

                                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{0 \cdot A}{B}\right)}{\pi} \]
                                6. lower-*.f6413.5

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

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

                                \[\leadsto 180 \cdot \frac{\tan^{-1} 0}{\pi} \]
                              6. Step-by-step derivation
                                1. Applied rewrites13.5%

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

                                if 9.49999999999999997e-138 < B

                                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} \]
                                4. Recombined 2 regimes into one program.
                                5. Add Preprocessing

                                Alternative 15: 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)))