ABCF->ab-angle angle

Percentage Accurate: 53.3% → 81.6%
Time: 4.8s
Alternatives: 15
Speedup: 2.5×

Specification

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 53.3% accurate, 1.0× speedup?

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

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

Alternative 1: 81.6% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}\\
\mathbf{if}\;t\_0 \leq -10:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\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))) < -10 or -0.0 < (*.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 58.7%

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

        \[\leadsto \color{blue}{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. lift-PI.f64N/A

        \[\leadsto 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)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
      3. lift-/.f64N/A

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

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

    if -10 < (*.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))) < -0.0

    1. Initial program 18.2%

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

        \[\leadsto \color{blue}{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. lift-PI.f64N/A

        \[\leadsto 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)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
      3. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\frac{\frac{{B}^{3}}{{A}^{2}} \cdot \frac{1}{8} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot B}{A}\right)}{\pi} \]
      6. metadata-evalN/A

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

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

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\frac{\mathsf{fma}\left(\frac{{B}^{3}}{A \cdot A}, \frac{1}{8}, \frac{-1}{2} \cdot B\right)}{A}\right)}{\pi} \]
      12. lower-*.f6448.6

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\frac{\mathsf{fma}\left(\frac{{B}^{3}}{A \cdot A}, 0.125, -0.5 \cdot B\right)}{A}\right)}{\pi} \]
    9. Applied rewrites48.6%

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

Alternative 2: 68.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\ t_2 := \frac{180 \cdot \tan^{-1} \left(-\frac{B + A}{B}\right)}{\pi}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+70}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq -0.5:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))
        (t_1
         (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
        (t_2 (/ (* 180.0 (atan (- (/ (+ B A) B)))) PI)))
   (if (<= t_1 (- INFINITY))
     t_2
     (if (<= t_1 -1e+70)
       t_0
       (if (<= t_1 -0.5)
         t_2
         (if (<= t_1 0.0) (* 180.0 (/ (atan (* (/ B A) 0.5)) PI)) t_0))))))
double code(double A, double B, double C) {
	double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
	double t_1 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
	double t_2 = (180.0 * atan(-((B + A) / B))) / ((double) M_PI);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 <= -1e+70) {
		tmp = t_0;
	} else if (t_1 <= -0.5) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = 180.0 * (atan(((B / A) * 0.5)) / ((double) M_PI));
	} else {
		tmp = t_0;
	}
	return tmp;
}
public static double code(double A, double B, double C) {
	double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
	double t_1 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
	double t_2 = (180.0 * Math.atan(-((B + A) / B))) / Math.PI;
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else if (t_1 <= -1e+70) {
		tmp = t_0;
	} else if (t_1 <= -0.5) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = 180.0 * (Math.atan(((B / A) * 0.5)) / Math.PI);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(A, B, C):
	t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi)
	t_1 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0))))
	t_2 = (180.0 * math.atan(-((B + A) / B))) / math.pi
	tmp = 0
	if t_1 <= -math.inf:
		tmp = t_2
	elif t_1 <= -1e+70:
		tmp = t_0
	elif t_1 <= -0.5:
		tmp = t_2
	elif t_1 <= 0.0:
		tmp = 180.0 * (math.atan(((B / A) * 0.5)) / math.pi)
	else:
		tmp = t_0
	return tmp
function code(A, B, C)
	t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi))
	t_1 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))
	t_2 = Float64(Float64(180.0 * atan(Float64(-Float64(Float64(B + A) / B)))) / pi)
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_1 <= -1e+70)
		tmp = t_0;
	elseif (t_1 <= -0.5)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / A) * 0.5)) / pi));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(A, B, C)
	t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
	t_1 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0))));
	t_2 = (180.0 * atan(-((B + A) / B))) / pi;
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = t_2;
	elseif (t_1 <= -1e+70)
		tmp = t_0;
	elseif (t_1 <= -0.5)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = 180.0 * (atan(((B / A) * 0.5)) / pi);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(180.0 * N[ArcTan[(-N[(N[(B + A), $MachinePrecision] / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -1e+70], t$95$0, If[LessEqual[t$95$1, -0.5], t$95$2, If[LessEqual[t$95$1, 0.0], N[(180.0 * N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
t_2 := \frac{180 \cdot \tan^{-1} \left(-\frac{B + A}{B}\right)}{\pi}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+70}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_1 \leq -0.5:\\
\;\;\;\;t\_2\\

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

\mathbf{else}:\\
\;\;\;\;t\_0\\


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

    1. Initial program 55.5%

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

        \[\leadsto \color{blue}{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. lift-PI.f64N/A

        \[\leadsto 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)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
      3. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -inf.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -1.00000000000000007e70 or -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64))))))

      1. Initial program 61.3%

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

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

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

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

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

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

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

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

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

      1. Initial program 18.2%

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

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

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

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

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

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

    Alternative 3: 72.3% accurate, 0.4× speedup?

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

      1. Initial program 60.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} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \color{blue}{B}\right)\right)}{\pi} \]
      3. Step-by-step derivation
        1. Applied rewrites76.8%

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

        if -40 < (*.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))) < -0.0

        1. Initial program 18.2%

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

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

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

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

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

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

        if -0.0 < (*.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 57.4%

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

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

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

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

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

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

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

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

      Alternative 4: 61.0% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\ \mathbf{if}\;t\_0 \leq -0.5:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-\frac{B + A}{B}\right)}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \end{array} \]
      (FPCore (A B C)
       :precision binary64
       (let* ((t_0
               (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
         (if (<= t_0 -0.5)
           (/ (* 180.0 (atan (- (/ (+ B A) B)))) PI)
           (if (<= t_0 0.0)
             (* 180.0 (/ (atan (* (/ B A) 0.5)) PI))
             (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))
      double code(double A, double B, double C) {
      	double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
      	double tmp;
      	if (t_0 <= -0.5) {
      		tmp = (180.0 * atan(-((B + A) / B))) / ((double) M_PI);
      	} else if (t_0 <= 0.0) {
      		tmp = 180.0 * (atan(((B / A) * 0.5)) / ((double) M_PI));
      	} else {
      		tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
      	}
      	return tmp;
      }
      
      public static double code(double A, double B, double C) {
      	double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
      	double tmp;
      	if (t_0 <= -0.5) {
      		tmp = (180.0 * Math.atan(-((B + A) / B))) / Math.PI;
      	} else if (t_0 <= 0.0) {
      		tmp = 180.0 * (Math.atan(((B / A) * 0.5)) / Math.PI);
      	} else {
      		tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
      	}
      	return tmp;
      }
      
      def code(A, B, C):
      	t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0))))
      	tmp = 0
      	if t_0 <= -0.5:
      		tmp = (180.0 * math.atan(-((B + A) / B))) / math.pi
      	elif t_0 <= 0.0:
      		tmp = 180.0 * (math.atan(((B / A) * 0.5)) / math.pi)
      	else:
      		tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi)
      	return tmp
      
      function code(A, B, C)
      	t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))
      	tmp = 0.0
      	if (t_0 <= -0.5)
      		tmp = Float64(Float64(180.0 * atan(Float64(-Float64(Float64(B + A) / B)))) / pi);
      	elseif (t_0 <= 0.0)
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / A) * 0.5)) / pi));
      	else
      		tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi));
      	end
      	return tmp
      end
      
      function tmp_2 = code(A, B, C)
      	t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0))));
      	tmp = 0.0;
      	if (t_0 <= -0.5)
      		tmp = (180.0 * atan(-((B + A) / B))) / pi;
      	elseif (t_0 <= 0.0)
      		tmp = 180.0 * (atan(((B / A) * 0.5)) / pi);
      	else
      		tmp = 180.0 * (atan((1.0 - (A / B))) / pi);
      	end
      	tmp_2 = tmp;
      end
      
      code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -0.5], N[(N[(180.0 * N[ArcTan[(-N[(N[(B + A), $MachinePrecision] / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
      \mathbf{if}\;t\_0 \leq -0.5:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-\frac{B + A}{B}\right)}{\pi}\\
      
      \mathbf{elif}\;t\_0 \leq 0:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.5

        1. Initial program 60.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-*.f64N/A

            \[\leadsto \color{blue}{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. lift-PI.f64N/A

            \[\leadsto 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)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
          3. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 18.2%

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

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

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

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

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

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

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

          1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 75.8% accurate, 1.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;C \leq -2.7 \cdot 10^{+15}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.02 \cdot 10^{+92}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-\frac{\mathsf{hypot}\left(B, A\right) + A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, -0.5, \frac{0}{B}\right)\right)}{\pi}\\ \end{array} \end{array} \]
        (FPCore (A B C)
         :precision binary64
         (if (<= C -2.7e+15)
           (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) B))) PI))
           (if (<= C 1.02e+92)
             (/ (* 180.0 (atan (- (/ (+ (hypot B A) A) B)))) PI)
             (/ (* 180.0 (atan (fma (/ B C) -0.5 (/ 0.0 B)))) PI))))
        double code(double A, double B, double C) {
        	double tmp;
        	if (C <= -2.7e+15) {
        		tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - B))) / ((double) M_PI));
        	} else if (C <= 1.02e+92) {
        		tmp = (180.0 * atan(-((hypot(B, A) + A) / B))) / ((double) M_PI);
        	} else {
        		tmp = (180.0 * atan(fma((B / C), -0.5, (0.0 / B)))) / ((double) M_PI);
        	}
        	return tmp;
        }
        
        function code(A, B, C)
        	tmp = 0.0
        	if (C <= -2.7e+15)
        		tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - B))) / pi));
        	elseif (C <= 1.02e+92)
        		tmp = Float64(Float64(180.0 * atan(Float64(-Float64(Float64(hypot(B, A) + A) / B)))) / pi);
        	else
        		tmp = Float64(Float64(180.0 * atan(fma(Float64(B / C), -0.5, Float64(0.0 / B)))) / pi);
        	end
        	return tmp
        end
        
        code[A_, B_, C_] := If[LessEqual[C, -2.7e+15], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.02e+92], N[(N[(180.0 * N[ArcTan[(-N[(N[(N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision] + A), $MachinePrecision] / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5 + N[(0.0 / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;C \leq -2.7 \cdot 10^{+15}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\pi}\\
        
        \mathbf{elif}\;C \leq 1.02 \cdot 10^{+92}:\\
        \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-\frac{\mathsf{hypot}\left(B, A\right) + A}{B}\right)}{\pi}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, -0.5, \frac{0}{B}\right)\right)}{\pi}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if C < -2.7e15

          1. Initial program 76.4%

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

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

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

            if -2.7e15 < C < 1.02000000000000003e92

            1. Initial program 54.3%

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

                \[\leadsto \color{blue}{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. lift-PI.f64N/A

                \[\leadsto 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)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
              3. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.02000000000000003e92 < C

            1. Initial program 18.3%

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

                \[\leadsto \color{blue}{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. lift-PI.f64N/A

                \[\leadsto 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)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
              3. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0 \cdot A}{B}\right)\right)}{\pi} \]
              13. mul0-lft75.9

                \[\leadsto \frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, -0.5, \frac{0}{B}\right)\right)}{\pi} \]
            6. Applied rewrites75.9%

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

          Alternative 6: 75.8% accurate, 1.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;C \leq -2.7 \cdot 10^{+15}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\pi}\\ \mathbf{elif}\;C \leq 1.02 \cdot 10^{+92}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{\mathsf{hypot}\left(A, B\right) + A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, -0.5, \frac{0}{B}\right)\right)}{\pi}\\ \end{array} \end{array} \]
          (FPCore (A B C)
           :precision binary64
           (if (<= C -2.7e+15)
             (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) B))) PI))
             (if (<= C 1.02e+92)
               (* 180.0 (/ (atan (- (/ (+ (hypot A B) A) B))) PI))
               (/ (* 180.0 (atan (fma (/ B C) -0.5 (/ 0.0 B)))) PI))))
          double code(double A, double B, double C) {
          	double tmp;
          	if (C <= -2.7e+15) {
          		tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - B))) / ((double) M_PI));
          	} else if (C <= 1.02e+92) {
          		tmp = 180.0 * (atan(-((hypot(A, B) + A) / B)) / ((double) M_PI));
          	} else {
          		tmp = (180.0 * atan(fma((B / C), -0.5, (0.0 / B)))) / ((double) M_PI);
          	}
          	return tmp;
          }
          
          function code(A, B, C)
          	tmp = 0.0
          	if (C <= -2.7e+15)
          		tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - B))) / pi));
          	elseif (C <= 1.02e+92)
          		tmp = Float64(180.0 * Float64(atan(Float64(-Float64(Float64(hypot(A, B) + A) / B))) / pi));
          	else
          		tmp = Float64(Float64(180.0 * atan(fma(Float64(B / C), -0.5, Float64(0.0 / B)))) / pi);
          	end
          	return tmp
          end
          
          code[A_, B_, C_] := If[LessEqual[C, -2.7e+15], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.02e+92], N[(180.0 * N[(N[ArcTan[(-N[(N[(N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision] + A), $MachinePrecision] / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5 + N[(0.0 / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;C \leq -2.7 \cdot 10^{+15}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\pi}\\
          
          \mathbf{elif}\;C \leq 1.02 \cdot 10^{+92}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{\mathsf{hypot}\left(A, B\right) + A}{B}\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, -0.5, \frac{0}{B}\right)\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if C < -2.7e15

            1. Initial program 76.4%

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

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

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

              if -2.7e15 < C < 1.02000000000000003e92

              1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

              if 1.02000000000000003e92 < C

              1. Initial program 18.3%

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

                  \[\leadsto \color{blue}{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. lift-PI.f64N/A

                  \[\leadsto 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)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
                3. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, \frac{-1}{2}, \frac{0 \cdot A}{B}\right)\right)}{\pi} \]
                13. mul0-lft75.9

                  \[\leadsto \frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, -0.5, \frac{0}{B}\right)\right)}{\pi} \]
              6. Applied rewrites75.9%

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

            Alternative 7: 45.8% accurate, 2.4× speedup?

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

              1. Initial program 46.5%

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

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

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

                if -1.55000000000000014e-11 < B < 2.05000000000000007e-252

                1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 2.05000000000000007e-252 < B < 1.3e44

                1. Initial program 60.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(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}}{\pi} \]
                3. Step-by-step derivation
                  1. associate--l+N/A

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

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

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

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

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

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

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

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

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

                if 1.3e44 < B

                1. Initial program 46.3%

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

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

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

                Alternative 8: 59.0% accurate, 2.5× speedup?

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

                  1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

                    if -3e-175 < C < 3.80000000000000028e69

                    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

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

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

                    if 3.80000000000000028e69 < C

                    1. Initial program 20.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 9: 58.8% accurate, 2.5× speedup?

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

                    1. Initial program 30.8%

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

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

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

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

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

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

                    if -1.2000000000000001e-96 < A < 4.00000000000000007e-87

                    1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

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

                      if 4.00000000000000007e-87 < A

                      1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 10: 51.2% accurate, 2.5× speedup?

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

                      1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

                        if -3e-175 < C < 8.9999999999999993e165

                        1. Initial program 49.1%

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

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

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

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

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

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

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

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

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

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

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

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

                        if 8.9999999999999993e165 < C

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

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

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

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

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

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

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

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

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

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

                        Alternative 11: 50.2% accurate, 2.5× speedup?

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

                          1. Initial program 53.2%

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

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

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

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

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

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

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

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

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

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

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

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

                          if 2.05000000000000007e-252 < B < 1.3e44

                          1. Initial program 60.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(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}}{\pi} \]
                          3. Step-by-step derivation
                            1. associate--l+N/A

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

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

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

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

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

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

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

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

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

                          if 1.3e44 < B

                          1. Initial program 46.3%

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

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

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

                          Alternative 12: 46.5% accurate, 2.5× speedup?

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

                            1. Initial program 49.6%

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

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

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

                              if -8.50000000000000059e-120 < B < 1.3e44

                              1. Initial program 59.8%

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

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

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

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

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

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

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

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

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

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

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

                              if 1.3e44 < B

                              1. Initial program 46.3%

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

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

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

                              Alternative 13: 43.8% accurate, 2.8× speedup?

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

                                1. Initial program 50.1%

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

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

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

                                  if -4.7000000000000003e-214 < B < 8.29999999999999961e-112

                                  1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

                                    if 8.29999999999999961e-112 < B

                                    1. Initial program 52.2%

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

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

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

                                    Alternative 14: 39.9% accurate, 2.9× speedup?

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

                                      1. Initial program 52.0%

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

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

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

                                        if -2.89999999999999988e-305 < B

                                        1. Initial program 54.6%

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

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

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

                                        Alternative 15: 21.0% accurate, 3.1× speedup?

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

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

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

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

                                          Reproduce

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