ABCF->ab-angle angle

Percentage Accurate: 54.1% → 82.5%
Time: 6.7s
Alternatives: 10
Speedup: 2.0×

Specification

?
\[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} \]
(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]
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}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 54.1% accurate, 1.0× speedup?

\[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} \]
(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]
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}

Alternative 1: 82.5% accurate, 0.5× speedup?

\[\begin{array}{l} t_0 := \frac{1}{\left|B\right|}\\ \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;180 \cdot \frac{\tan^{-1} \left(t\_0 \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {\left(\left|B\right|\right)}^{2}}\right)\right)}{\pi} \leq -5 \cdot 10^{-7}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 \cdot \left(\left(C - A\right) - \mathsf{hypot}\left(C - A, \left|B\right|\right)\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{-0.5 \cdot \left|B\right|}{C}\right) \cdot 180}{\pi}\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (/ 1.0 (fabs B))))
   (*
    (copysign 1.0 B)
    (if (<=
         (*
          180.0
          (/
           (atan
            (*
             t_0
             (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow (fabs B) 2.0))))))
           PI))
         -5e-7)
      (* 180.0 (/ (atan (* t_0 (- (- C A) (hypot (- C A) (fabs B))))) PI))
      (/ (* (atan (/ (* -0.5 (fabs B)) C)) 180.0) PI)))))
double code(double A, double B, double C) {
	double t_0 = 1.0 / fabs(B);
	double tmp;
	if ((180.0 * (atan((t_0 * ((C - A) - sqrt((pow((A - C), 2.0) + pow(fabs(B), 2.0)))))) / ((double) M_PI))) <= -5e-7) {
		tmp = 180.0 * (atan((t_0 * ((C - A) - hypot((C - A), fabs(B))))) / ((double) M_PI));
	} else {
		tmp = (atan(((-0.5 * fabs(B)) / C)) * 180.0) / ((double) M_PI);
	}
	return copysign(1.0, B) * tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 1.0 / Math.abs(B);
	double tmp;
	if ((180.0 * (Math.atan((t_0 * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(Math.abs(B), 2.0)))))) / Math.PI)) <= -5e-7) {
		tmp = 180.0 * (Math.atan((t_0 * ((C - A) - Math.hypot((C - A), Math.abs(B))))) / Math.PI);
	} else {
		tmp = (Math.atan(((-0.5 * Math.abs(B)) / C)) * 180.0) / Math.PI;
	}
	return Math.copySign(1.0, B) * tmp;
}
def code(A, B, C):
	t_0 = 1.0 / math.fabs(B)
	tmp = 0
	if (180.0 * (math.atan((t_0 * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(math.fabs(B), 2.0)))))) / math.pi)) <= -5e-7:
		tmp = 180.0 * (math.atan((t_0 * ((C - A) - math.hypot((C - A), math.fabs(B))))) / math.pi)
	else:
		tmp = (math.atan(((-0.5 * math.fabs(B)) / C)) * 180.0) / math.pi
	return math.copysign(1.0, B) * tmp
function code(A, B, C)
	t_0 = Float64(1.0 / abs(B))
	tmp = 0.0
	if (Float64(180.0 * Float64(atan(Float64(t_0 * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (abs(B) ^ 2.0)))))) / pi)) <= -5e-7)
		tmp = Float64(180.0 * Float64(atan(Float64(t_0 * Float64(Float64(C - A) - hypot(Float64(C - A), abs(B))))) / pi));
	else
		tmp = Float64(Float64(atan(Float64(Float64(-0.5 * abs(B)) / C)) * 180.0) / pi);
	end
	return Float64(copysign(1.0, B) * tmp)
end
function tmp_2 = code(A, B, C)
	t_0 = 1.0 / abs(B);
	tmp = 0.0;
	if ((180.0 * (atan((t_0 * ((C - A) - sqrt((((A - C) ^ 2.0) + (abs(B) ^ 2.0)))))) / pi)) <= -5e-7)
		tmp = 180.0 * (atan((t_0 * ((C - A) - hypot((C - A), abs(B))))) / pi);
	else
		tmp = (atan(((-0.5 * abs(B)) / C)) * 180.0) / pi;
	end
	tmp_2 = (sign(B) * abs(1.0)) * tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(180.0 * N[(N[ArcTan[N[(t$95$0 * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[Abs[B], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], -5e-7], N[(180.0 * N[(N[ArcTan[N[(t$95$0 * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(C - A), $MachinePrecision] ^ 2 + N[Abs[B], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(-0.5 * N[Abs[B], $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_0 := \frac{1}{\left|B\right|}\\
\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
\mathbf{if}\;180 \cdot \frac{\tan^{-1} \left(t\_0 \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {\left(\left|B\right|\right)}^{2}}\right)\right)}{\pi} \leq -5 \cdot 10^{-7}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 \cdot \left(\left(C - A\right) - \mathsf{hypot}\left(C - A, \left|B\right|\right)\right)\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-0.5 \cdot \left|B\right|}{C}\right) \cdot 180}{\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))) < -4.9999999999999998e-7

    1. Initial program 54.1%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. 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. sqrt-fabs-revN/A

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\sqrt{{\left(A - C\right)}^{2} + {B}^{2}} \cdot \color{blue}{\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}}\right)\right)}{\pi} \]
      7. rem-square-sqrtN/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} \]
      8. 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} \]
      9. lift-pow.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + \color{blue}{{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{{\left(A - C\right)}^{2} + \color{blue}{B \cdot B}}\right)\right)}{\pi} \]
      11. 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 \cdot B}\right)\right)}{\pi} \]
      12. 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 \cdot B}\right)\right)}{\pi} \]
      13. sqr-neg-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(A - C\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(A - C\right)\right)\right)} + B \cdot B}\right)\right)}{\pi} \]
      14. lift--.f64N/A

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

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

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

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

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

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

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

    if -4.9999999999999998e-7 < (*.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.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0}{B}\right)\right) \cdot 180}{\pi} \]
      2. div025.7%

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

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

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

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

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

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

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

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

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

Alternative 2: 78.1% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4000000000000006e147 < A < 1.5999999999999999e-150

    1. Initial program 54.1%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. 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. sqrt-fabs-revN/A

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\sqrt{{\left(A - C\right)}^{2} + {B}^{2}} \cdot \color{blue}{\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}}\right)\right)}{\pi} \]
      7. rem-square-sqrtN/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} \]
      8. 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} \]
      9. lift-pow.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + \color{blue}{{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{{\left(A - C\right)}^{2} + \color{blue}{B \cdot B}}\right)\right)}{\pi} \]
      11. 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 \cdot B}\right)\right)}{\pi} \]
      12. 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 \cdot B}\right)\right)}{\pi} \]
      13. sqr-neg-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(A - C\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(A - C\right)\right)\right)} + B \cdot B}\right)\right)}{\pi} \]
      14. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        if 1.5999999999999999e-150 < A

        1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 75.9% accurate, 1.9× speedup?

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

        1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -5.5e66 < A

        1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 75.9% accurate, 1.9× speedup?

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

        1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -5.5e66 < A

        1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 69.0% accurate, 1.8× speedup?

      \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;A \leq -9.4 \cdot 10^{+147}:\\ \;\;\;\;\frac{\tan^{-1} \left(0.5 \cdot \frac{\left|B\right|}{A}\right)}{\pi} \cdot 180\\ \mathbf{elif}\;A \leq 1.7 \cdot 10^{+18}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C}{\left|B\right|} - 1\right)}{\pi} \cdot 180\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C - A}{\left|B\right|}\right)}{\pi} \cdot 180\\ \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (*
        (copysign 1.0 B)
        (if (<= A -9.4e+147)
          (* (/ (atan (* 0.5 (/ (fabs B) A))) PI) 180.0)
          (if (<= A 1.7e+18)
            (* (/ (atan (- (/ C (fabs B)) 1.0)) PI) 180.0)
            (* (/ (atan (/ (- C A) (fabs B))) PI) 180.0)))))
      double code(double A, double B, double C) {
      	double tmp;
      	if (A <= -9.4e+147) {
      		tmp = (atan((0.5 * (fabs(B) / A))) / ((double) M_PI)) * 180.0;
      	} else if (A <= 1.7e+18) {
      		tmp = (atan(((C / fabs(B)) - 1.0)) / ((double) M_PI)) * 180.0;
      	} else {
      		tmp = (atan(((C - A) / fabs(B))) / ((double) M_PI)) * 180.0;
      	}
      	return copysign(1.0, B) * tmp;
      }
      
      public static double code(double A, double B, double C) {
      	double tmp;
      	if (A <= -9.4e+147) {
      		tmp = (Math.atan((0.5 * (Math.abs(B) / A))) / Math.PI) * 180.0;
      	} else if (A <= 1.7e+18) {
      		tmp = (Math.atan(((C / Math.abs(B)) - 1.0)) / Math.PI) * 180.0;
      	} else {
      		tmp = (Math.atan(((C - A) / Math.abs(B))) / Math.PI) * 180.0;
      	}
      	return Math.copySign(1.0, B) * tmp;
      }
      
      def code(A, B, C):
      	tmp = 0
      	if A <= -9.4e+147:
      		tmp = (math.atan((0.5 * (math.fabs(B) / A))) / math.pi) * 180.0
      	elif A <= 1.7e+18:
      		tmp = (math.atan(((C / math.fabs(B)) - 1.0)) / math.pi) * 180.0
      	else:
      		tmp = (math.atan(((C - A) / math.fabs(B))) / math.pi) * 180.0
      	return math.copysign(1.0, B) * tmp
      
      function code(A, B, C)
      	tmp = 0.0
      	if (A <= -9.4e+147)
      		tmp = Float64(Float64(atan(Float64(0.5 * Float64(abs(B) / A))) / pi) * 180.0);
      	elseif (A <= 1.7e+18)
      		tmp = Float64(Float64(atan(Float64(Float64(C / abs(B)) - 1.0)) / pi) * 180.0);
      	else
      		tmp = Float64(Float64(atan(Float64(Float64(C - A) / abs(B))) / pi) * 180.0);
      	end
      	return Float64(copysign(1.0, B) * tmp)
      end
      
      function tmp_2 = code(A, B, C)
      	tmp = 0.0;
      	if (A <= -9.4e+147)
      		tmp = (atan((0.5 * (abs(B) / A))) / pi) * 180.0;
      	elseif (A <= 1.7e+18)
      		tmp = (atan(((C / abs(B)) - 1.0)) / pi) * 180.0;
      	else
      		tmp = (atan(((C - A) / abs(B))) / pi) * 180.0;
      	end
      	tmp_2 = (sign(B) * abs(1.0)) * tmp;
      end
      
      code[A_, B_, C_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[A, -9.4e+147], N[(N[(N[ArcTan[N[(0.5 * N[(N[Abs[B], $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], If[LessEqual[A, 1.7e+18], N[(N[(N[ArcTan[N[(N[(C / N[Abs[B], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(C - A), $MachinePrecision] / N[Abs[B], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]]), $MachinePrecision]
      
      \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
      \mathbf{if}\;A \leq -9.4 \cdot 10^{+147}:\\
      \;\;\;\;\frac{\tan^{-1} \left(0.5 \cdot \frac{\left|B\right|}{A}\right)}{\pi} \cdot 180\\
      
      \mathbf{elif}\;A \leq 1.7 \cdot 10^{+18}:\\
      \;\;\;\;\frac{\tan^{-1} \left(\frac{C}{\left|B\right|} - 1\right)}{\pi} \cdot 180\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\tan^{-1} \left(\frac{C - A}{\left|B\right|}\right)}{\pi} \cdot 180\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if A < -9.4000000000000006e147

        1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -9.4000000000000006e147 < A < 1.7e18

        1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.7e18 < A

          1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 6: 67.0% accurate, 2.0× speedup?

        \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;C \leq 8.8 \cdot 10^{-44}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{C}{\left|B\right|} - 1\right)}{\pi} \cdot 180\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{\left|B\right|}{C}\right) \cdot \frac{180}{\pi}\\ \end{array} \]
        (FPCore (A B C)
         :precision binary64
         (*
          (copysign 1.0 B)
          (if (<= C 8.8e-44)
            (* (/ (atan (- (/ C (fabs B)) 1.0)) PI) 180.0)
            (* (atan (* -0.5 (/ (fabs B) C))) (/ 180.0 PI)))))
        double code(double A, double B, double C) {
        	double tmp;
        	if (C <= 8.8e-44) {
        		tmp = (atan(((C / fabs(B)) - 1.0)) / ((double) M_PI)) * 180.0;
        	} else {
        		tmp = atan((-0.5 * (fabs(B) / C))) * (180.0 / ((double) M_PI));
        	}
        	return copysign(1.0, B) * tmp;
        }
        
        public static double code(double A, double B, double C) {
        	double tmp;
        	if (C <= 8.8e-44) {
        		tmp = (Math.atan(((C / Math.abs(B)) - 1.0)) / Math.PI) * 180.0;
        	} else {
        		tmp = Math.atan((-0.5 * (Math.abs(B) / C))) * (180.0 / Math.PI);
        	}
        	return Math.copySign(1.0, B) * tmp;
        }
        
        def code(A, B, C):
        	tmp = 0
        	if C <= 8.8e-44:
        		tmp = (math.atan(((C / math.fabs(B)) - 1.0)) / math.pi) * 180.0
        	else:
        		tmp = math.atan((-0.5 * (math.fabs(B) / C))) * (180.0 / math.pi)
        	return math.copysign(1.0, B) * tmp
        
        function code(A, B, C)
        	tmp = 0.0
        	if (C <= 8.8e-44)
        		tmp = Float64(Float64(atan(Float64(Float64(C / abs(B)) - 1.0)) / pi) * 180.0);
        	else
        		tmp = Float64(atan(Float64(-0.5 * Float64(abs(B) / C))) * Float64(180.0 / pi));
        	end
        	return Float64(copysign(1.0, B) * tmp)
        end
        
        function tmp_2 = code(A, B, C)
        	tmp = 0.0;
        	if (C <= 8.8e-44)
        		tmp = (atan(((C / abs(B)) - 1.0)) / pi) * 180.0;
        	else
        		tmp = atan((-0.5 * (abs(B) / C))) * (180.0 / pi);
        	end
        	tmp_2 = (sign(B) * abs(1.0)) * tmp;
        end
        
        code[A_, B_, C_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[C, 8.8e-44], N[(N[(N[ArcTan[N[(N[(C / N[Abs[B], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(N[ArcTan[N[(-0.5 * N[(N[Abs[B], $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
        
        \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
        \mathbf{if}\;C \leq 8.8 \cdot 10^{-44}:\\
        \;\;\;\;\frac{\tan^{-1} \left(\frac{C}{\left|B\right|} - 1\right)}{\pi} \cdot 180\\
        
        \mathbf{else}:\\
        \;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{\left|B\right|}{C}\right) \cdot \frac{180}{\pi}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if C < 8.8000000000000005e-44

          1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 8.8000000000000005e-44 < C

            1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 7: 61.1% accurate, 2.0× speedup?

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

            1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 6.2e19 < A

              1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 8: 55.2% accurate, 1.9× speedup?

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

              1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 2.3e20 < B

              1. Initial program 54.1%

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

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

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

              Alternative 9: 48.4% accurate, 2.2× speedup?

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

                1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -2.3999999999999999e-18 < C

                  1. Initial program 54.1%

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

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

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

                  Alternative 10: 39.9% accurate, 3.0× speedup?

                  \[\mathsf{copysign}\left(1, B\right) \cdot \left(180 \cdot \frac{\tan^{-1} -1}{\pi}\right) \]
                  (FPCore (A B C)
                   :precision binary64
                   (* (copysign 1.0 B) (* 180.0 (/ (atan -1.0) PI))))
                  double code(double A, double B, double C) {
                  	return copysign(1.0, B) * (180.0 * (atan(-1.0) / ((double) M_PI)));
                  }
                  
                  public static double code(double A, double B, double C) {
                  	return Math.copySign(1.0, B) * (180.0 * (Math.atan(-1.0) / Math.PI));
                  }
                  
                  def code(A, B, C):
                  	return math.copysign(1.0, B) * (180.0 * (math.atan(-1.0) / math.pi))
                  
                  function code(A, B, C)
                  	return Float64(copysign(1.0, B) * Float64(180.0 * Float64(atan(-1.0) / pi)))
                  end
                  
                  function tmp = code(A, B, C)
                  	tmp = (sign(B) * abs(1.0)) * (180.0 * (atan(-1.0) / pi));
                  end
                  
                  code[A_, B_, C_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \mathsf{copysign}\left(1, B\right) \cdot \left(180 \cdot \frac{\tan^{-1} -1}{\pi}\right)
                  
                  Derivation
                  1. Initial program 54.1%

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

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

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

                    Reproduce

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