ABCF->ab-angle angle

Percentage Accurate: 54.1% → 88.4%
Time: 5.5s
Alternatives: 16
Speedup: 1.6×

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

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

Initial Program: 54.1% accurate, 1.0× speedup?

\[\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: 88.4% accurate, 0.4× 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)\\ t_1 := \left(-A\right) + C\\ \mathbf{if}\;t\_0 \leq -0.05:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C - A} \cdot -0.5\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{t\_1 - \mathsf{hypot}\left(t\_1, B\right)}{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))))))
        (t_1 (+ (- A) C)))
   (if (<= t_0 -0.05)
     (/ (* 180.0 (atan (/ (- (- C A) (hypot (- C A) B)) B))) PI)
     (if (<= t_0 0.0)
       (* 180.0 (/ (atan (* (/ B (- C A)) -0.5)) PI))
       (* 180.0 (/ (atan (/ (- t_1 (hypot t_1 B)) 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 t_1 = -A + C;
	double tmp;
	if (t_0 <= -0.05) {
		tmp = (180.0 * atan((((C - A) - hypot((C - A), B)) / B))) / ((double) M_PI);
	} else if (t_0 <= 0.0) {
		tmp = 180.0 * (atan(((B / (C - A)) * -0.5)) / ((double) M_PI));
	} else {
		tmp = 180.0 * (atan(((t_1 - hypot(t_1, B)) / 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 t_1 = -A + C;
	double tmp;
	if (t_0 <= -0.05) {
		tmp = (180.0 * Math.atan((((C - A) - Math.hypot((C - A), B)) / B))) / Math.PI;
	} else if (t_0 <= 0.0) {
		tmp = 180.0 * (Math.atan(((B / (C - A)) * -0.5)) / Math.PI);
	} else {
		tmp = 180.0 * (Math.atan(((t_1 - Math.hypot(t_1, B)) / 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))))
	t_1 = -A + C
	tmp = 0
	if t_0 <= -0.05:
		tmp = (180.0 * math.atan((((C - A) - math.hypot((C - A), B)) / B))) / math.pi
	elif t_0 <= 0.0:
		tmp = 180.0 * (math.atan(((B / (C - A)) * -0.5)) / math.pi)
	else:
		tmp = 180.0 * (math.atan(((t_1 - math.hypot(t_1, B)) / 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)))))
	t_1 = Float64(Float64(-A) + C)
	tmp = 0.0
	if (t_0 <= -0.05)
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(C - A), B)) / B))) / pi);
	elseif (t_0 <= 0.0)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / Float64(C - A)) * -0.5)) / pi));
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(t_1 - hypot(t_1, B)) / 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))));
	t_1 = -A + C;
	tmp = 0.0;
	if (t_0 <= -0.05)
		tmp = (180.0 * atan((((C - A) - hypot((C - A), B)) / B))) / pi;
	elseif (t_0 <= 0.0)
		tmp = 180.0 * (atan(((B / (C - A)) * -0.5)) / pi);
	else
		tmp = 180.0 * (atan(((t_1 - hypot(t_1, B)) / 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]}, Block[{t$95$1 = N[((-A) + C), $MachinePrecision]}, If[LessEqual[t$95$0, -0.05], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(C - A), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(t$95$1 - N[Sqrt[t$95$1 ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $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)\\
t_1 := \left(-A\right) + C\\
\mathbf{if}\;t\_0 \leq -0.05:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi}\\

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

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{t\_1 - \mathsf{hypot}\left(t\_1, B\right)}{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.050000000000000003

    1. Initial program 58.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 A around -inf

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
    8. Step-by-step derivation
      1. lift--.f6486.3

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

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
    11. Step-by-step derivation
      1. lift--.f6486.3

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

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

    if -0.050000000000000003 < (*.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.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 A around -inf

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

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

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

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{B}{C - 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 59.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 A around -inf

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

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

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

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

Alternative 2: 88.4% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 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.050000000000000003 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 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 A around -inf

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
    8. Step-by-step derivation
      1. lift--.f6487.1

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

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
    11. Step-by-step derivation
      1. lift--.f6487.1

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

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

    if -0.050000000000000003 < (*.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.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 A around -inf

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

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

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

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

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

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

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

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

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

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

Alternative 3: 79.0% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;C \leq -5.2 \cdot 10^{+36}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -5.2000000000000003e36

    1. Initial program 78.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{\color{blue}{\tan^{-1} \left(\frac{\left(C + -1 \cdot A\right) - \sqrt{{B}^{2} + {\left(C + -1 \cdot A\right)}^{2}}}{B}\right)}}{\pi} \]
    3. Step-by-step derivation
      1. lower-atan.f64N/A

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
    8. Step-by-step derivation
      1. lift--.f6494.1

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

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
    11. Step-by-step derivation
      1. lift--.f6494.1

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

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
    14. Step-by-step derivation
      1. Applied rewrites90.9%

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

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

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

        if -5.2000000000000003e36 < C < 1.4200000000000001e-101

        1. Initial program 58.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 A around -inf

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(\mathsf{neg}\left(A\right)\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
          2. lift-neg.f6482.7

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(\mathsf{neg}\left(A\right), B\right)}{B}\right)}{\pi} \]
          2. lift-neg.f6478.9

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

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

        if 1.4200000000000001e-101 < C

        1. Initial program 31.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 A around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 79.0% accurate, 1.6× speedup?

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

        1. Initial program 19.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{\color{blue}{\tan^{-1} \left(\frac{\left(C + -1 \cdot A\right) - \sqrt{{B}^{2} + {\left(C + -1 \cdot A\right)}^{2}}}{B}\right)}}{\pi} \]
        3. Step-by-step derivation
          1. lower-atan.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.70000000000000005e97 < A < 3.4e9

        1. Initial program 55.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{\color{blue}{\tan^{-1} \left(\frac{\left(C + -1 \cdot A\right) - \sqrt{{B}^{2} + {\left(C + -1 \cdot A\right)}^{2}}}{B}\right)}}{\pi} \]
        3. Step-by-step derivation
          1. lower-atan.f64N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
        8. Step-by-step derivation
          1. lift--.f6478.6

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

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
        11. Step-by-step derivation
          1. lift--.f6478.6

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

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

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

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

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

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

            if 3.4e9 < A

            1. Initial program 75.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{\color{blue}{\tan^{-1} \left(\frac{\left(C + -1 \cdot A\right) - \sqrt{{B}^{2} + {\left(C + -1 \cdot A\right)}^{2}}}{B}\right)}}{\pi} \]
            3. Step-by-step derivation
              1. lower-atan.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 5: 76.7% accurate, 1.6× speedup?

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

            1. Initial program 19.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{\color{blue}{\tan^{-1} \left(\frac{\left(C + -1 \cdot A\right) - \sqrt{{B}^{2} + {\left(C + -1 \cdot A\right)}^{2}}}{B}\right)}}{\pi} \]
            3. Step-by-step derivation
              1. lower-atan.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1.70000000000000005e97 < A < 3.4e9

            1. Initial program 55.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{\color{blue}{\tan^{-1} \left(\frac{\left(C + -1 \cdot A\right) - \sqrt{{B}^{2} + {\left(C + -1 \cdot A\right)}^{2}}}{B}\right)}}{\pi} \]
            3. Step-by-step derivation
              1. lower-atan.f64N/A

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
            6. Step-by-step derivation
              1. Applied rewrites77.7%

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

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

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

                if 3.4e9 < A

                1. Initial program 75.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{\color{blue}{\tan^{-1} \left(\frac{\left(C + -1 \cdot A\right) - \sqrt{{B}^{2} + {\left(C + -1 \cdot A\right)}^{2}}}{B}\right)}}{\pi} \]
                3. Step-by-step derivation
                  1. lower-atan.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 6: 76.7% 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 -5:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - B}{B}\right)}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C - A} \cdot -0.5\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \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 -5.0)
                   (/ (* 180.0 (atan (/ (- (- C A) B) B))) PI)
                   (if (<= t_0 0.0)
                     (* 180.0 (/ (atan (* (/ B (- C 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 <= -5.0) {
              		tmp = (180.0 * atan((((C - A) - B) / B))) / ((double) M_PI);
              	} else if (t_0 <= 0.0) {
              		tmp = 180.0 * (atan(((B / (C - 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 <= -5.0) {
              		tmp = (180.0 * Math.atan((((C - A) - B) / B))) / Math.PI;
              	} else if (t_0 <= 0.0) {
              		tmp = 180.0 * (Math.atan(((B / (C - 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 <= -5.0:
              		tmp = (180.0 * math.atan((((C - A) - B) / B))) / math.pi
              	elif t_0 <= 0.0:
              		tmp = 180.0 * (math.atan(((B / (C - 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 <= -5.0)
              		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - B) / B))) / pi);
              	elseif (t_0 <= 0.0)
              		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / Float64(C - A)) * -0.5)) / pi));
              	else
              		tmp = Float64(Float64(180.0 * 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 <= -5.0)
              		tmp = (180.0 * atan((((C - A) - B) / B))) / pi;
              	elseif (t_0 <= 0.0)
              		tmp = 180.0 * (atan(((B / (C - 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, -5.0], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -5:\\
              \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - B}{B}\right)}{\pi}\\
              
              \mathbf{elif}\;t\_0 \leq 0:\\
              \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C - A} \cdot -0.5\right)}{\pi}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{180 \cdot \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))) < -5

                1. Initial program 58.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 A around -inf

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
                8. Step-by-step derivation
                  1. lift--.f6486.3

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

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

                  \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
                11. Step-by-step derivation
                  1. lift--.f6486.3

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

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

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

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

                  if -5 < (*.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.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 A around -inf

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

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

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

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

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

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

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

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{B}{C - 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 59.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 A around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 7: 76.6% 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 -5:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - B}{B}\right)}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C - A} \cdot -0.5\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \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 -5.0)
                     (/ (* 180.0 (atan (/ (- (- C A) B) B))) PI)
                     (if (<= t_0 0.0)
                       (/ (* 180.0 (atan (* (/ B (- C 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 <= -5.0) {
                		tmp = (180.0 * atan((((C - A) - B) / B))) / ((double) M_PI);
                	} else if (t_0 <= 0.0) {
                		tmp = (180.0 * atan(((B / (C - 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 <= -5.0) {
                		tmp = (180.0 * Math.atan((((C - A) - B) / B))) / Math.PI;
                	} else if (t_0 <= 0.0) {
                		tmp = (180.0 * Math.atan(((B / (C - 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 <= -5.0:
                		tmp = (180.0 * math.atan((((C - A) - B) / B))) / math.pi
                	elif t_0 <= 0.0:
                		tmp = (180.0 * math.atan(((B / (C - 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 <= -5.0)
                		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - B) / B))) / pi);
                	elseif (t_0 <= 0.0)
                		tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / Float64(C - A)) * -0.5))) / pi);
                	else
                		tmp = Float64(Float64(180.0 * 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 <= -5.0)
                		tmp = (180.0 * atan((((C - A) - B) / B))) / pi;
                	elseif (t_0 <= 0.0)
                		tmp = (180.0 * atan(((B / (C - 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, -5.0], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(180.0 * N[ArcTan[N[(N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -5:\\
                \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - B}{B}\right)}{\pi}\\
                
                \mathbf{elif}\;t\_0 \leq 0:\\
                \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C - A} \cdot -0.5\right)}{\pi}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{180 \cdot \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))) < -5

                  1. Initial program 58.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 A around -inf

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
                  8. Step-by-step derivation
                    1. lift--.f6486.3

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

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

                    \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
                  11. Step-by-step derivation
                    1. lift--.f6486.3

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

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

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

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

                    if -5 < (*.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.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 A around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{B}{C - 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 59.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 A around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 8: 73.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 -5:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - B}{B}\right)}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \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 -5.0)
                       (/ (* 180.0 (atan (/ (- (- C A) B) B))) PI)
                       (if (<= t_0 0.0)
                         (* (/ (atan (* (/ B A) 0.5)) PI) 180.0)
                         (/ (* 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 <= -5.0) {
                  		tmp = (180.0 * atan((((C - A) - B) / B))) / ((double) M_PI);
                  	} else if (t_0 <= 0.0) {
                  		tmp = (atan(((B / A) * 0.5)) / ((double) M_PI)) * 180.0;
                  	} 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 <= -5.0) {
                  		tmp = (180.0 * Math.atan((((C - A) - B) / B))) / Math.PI;
                  	} else if (t_0 <= 0.0) {
                  		tmp = (Math.atan(((B / A) * 0.5)) / Math.PI) * 180.0;
                  	} 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 <= -5.0:
                  		tmp = (180.0 * math.atan((((C - A) - B) / B))) / math.pi
                  	elif t_0 <= 0.0:
                  		tmp = (math.atan(((B / A) * 0.5)) / math.pi) * 180.0
                  	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 <= -5.0)
                  		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - B) / B))) / pi);
                  	elseif (t_0 <= 0.0)
                  		tmp = Float64(Float64(atan(Float64(Float64(B / A) * 0.5)) / pi) * 180.0);
                  	else
                  		tmp = Float64(Float64(180.0 * 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 <= -5.0)
                  		tmp = (180.0 * atan((((C - A) - B) / B))) / pi;
                  	elseif (t_0 <= 0.0)
                  		tmp = (atan(((B / A) * 0.5)) / pi) * 180.0;
                  	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, -5.0], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -5:\\
                  \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - B}{B}\right)}{\pi}\\
                  
                  \mathbf{elif}\;t\_0 \leq 0:\\
                  \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{180 \cdot \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))) < -5

                    1. Initial program 58.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 A around -inf

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
                    8. Step-by-step derivation
                      1. lift--.f6486.3

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

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

                      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
                    11. Step-by-step derivation
                      1. lift--.f6486.3

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

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

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

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

                      if -5 < (*.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.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 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-/.f6454.0

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

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

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

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

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

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

                      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 59.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 A around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 9: 63.8% 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(\frac{\left(C - A\right) - B}{B}\right)}{\pi}\\ \mathbf{if}\;t\_0 \leq -5:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180\\ \mathbf{elif}\;t\_0 \leq 50:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\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) B) B))) PI)))
                       (if (<= t_0 -5.0)
                         t_1
                         (if (<= t_0 0.0)
                           (* (/ (atan (* (/ B A) 0.5)) PI) 180.0)
                           (if (<= t_0 50.0) (* 180.0 (/ (atan 1.0) 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) - B) / B))) / ((double) M_PI);
                    	double tmp;
                    	if (t_0 <= -5.0) {
                    		tmp = t_1;
                    	} else if (t_0 <= 0.0) {
                    		tmp = (atan(((B / A) * 0.5)) / ((double) M_PI)) * 180.0;
                    	} else if (t_0 <= 50.0) {
                    		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
                    	} else {
                    		tmp = t_1;
                    	}
                    	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 t_1 = (180.0 * Math.atan((((C - A) - B) / B))) / Math.PI;
                    	double tmp;
                    	if (t_0 <= -5.0) {
                    		tmp = t_1;
                    	} else if (t_0 <= 0.0) {
                    		tmp = (Math.atan(((B / A) * 0.5)) / Math.PI) * 180.0;
                    	} else if (t_0 <= 50.0) {
                    		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
                    	} else {
                    		tmp = t_1;
                    	}
                    	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)
                    	t_1 = (180.0 * math.atan((((C - A) - B) / B))) / math.pi
                    	tmp = 0
                    	if t_0 <= -5.0:
                    		tmp = t_1
                    	elif t_0 <= 0.0:
                    		tmp = (math.atan(((B / A) * 0.5)) / math.pi) * 180.0
                    	elif t_0 <= 50.0:
                    		tmp = 180.0 * (math.atan(1.0) / math.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) - B) / B))) / pi)
                    	tmp = 0.0
                    	if (t_0 <= -5.0)
                    		tmp = t_1;
                    	elseif (t_0 <= 0.0)
                    		tmp = Float64(Float64(atan(Float64(Float64(B / A) * 0.5)) / pi) * 180.0);
                    	elseif (t_0 <= 50.0)
                    		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
                    	else
                    		tmp = t_1;
                    	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);
                    	t_1 = (180.0 * atan((((C - A) - B) / B))) / pi;
                    	tmp = 0.0;
                    	if (t_0 <= -5.0)
                    		tmp = t_1;
                    	elseif (t_0 <= 0.0)
                    		tmp = (atan(((B / A) * 0.5)) / pi) * 180.0;
                    	elseif (t_0 <= 50.0)
                    		tmp = 180.0 * (atan(1.0) / pi);
                    	else
                    		tmp = t_1;
                    	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]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[t$95$0, -5.0], t$95$1, If[LessEqual[t$95$0, 0.0], N[(N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], If[LessEqual[t$95$0, 50.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $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(\frac{\left(C - A\right) - B}{B}\right)}{\pi}\\
                    \mathbf{if}\;t\_0 \leq -5:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t\_0 \leq 0:\\
                    \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180\\
                    
                    \mathbf{elif}\;t\_0 \leq 50:\\
                    \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \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))) < -5 or 50 < (*.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 56.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 A around -inf

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(\left(-A\right) + C, B\right)}{B}\right)}{\pi} \]
                      8. Step-by-step derivation
                        1. lift--.f6486.0

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

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

                        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{\pi} \]
                      11. Step-by-step derivation
                        1. lift--.f6486.0

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

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

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

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

                        if -5 < (*.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.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 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-/.f6454.0

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

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

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

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

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

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

                        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))) < 50

                        1. Initial program 95.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 B around -inf

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

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

                        Alternative 10: 47.1% accurate, 1.8× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -3.9 \cdot 10^{-67}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-308}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.2 \cdot 10^{-220}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi} \cdot 180\\ \mathbf{elif}\;B \leq 31000000:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
                        (FPCore (A B C)
                         :precision binary64
                         (if (<= B -3.9e-67)
                           (* 180.0 (/ (atan 1.0) PI))
                           (if (<= B -6.2e-308)
                             (/ (* 180.0 (atan (* (/ B A) 0.5))) PI)
                             (if (<= B 4.2e-220)
                               (* (/ (atan (* (/ A B) -2.0)) PI) 180.0)
                               (if (<= B 31000000.0)
                                 (/ (* 180.0 (atan (* (/ B C) -0.5))) PI)
                                 (* 180.0 (/ (atan -1.0) PI)))))))
                        double code(double A, double B, double C) {
                        	double tmp;
                        	if (B <= -3.9e-67) {
                        		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
                        	} else if (B <= -6.2e-308) {
                        		tmp = (180.0 * atan(((B / A) * 0.5))) / ((double) M_PI);
                        	} else if (B <= 4.2e-220) {
                        		tmp = (atan(((A / B) * -2.0)) / ((double) M_PI)) * 180.0;
                        	} else if (B <= 31000000.0) {
                        		tmp = (180.0 * atan(((B / C) * -0.5))) / ((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 <= -3.9e-67) {
                        		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
                        	} else if (B <= -6.2e-308) {
                        		tmp = (180.0 * Math.atan(((B / A) * 0.5))) / Math.PI;
                        	} else if (B <= 4.2e-220) {
                        		tmp = (Math.atan(((A / B) * -2.0)) / Math.PI) * 180.0;
                        	} else if (B <= 31000000.0) {
                        		tmp = (180.0 * Math.atan(((B / C) * -0.5))) / Math.PI;
                        	} else {
                        		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
                        	}
                        	return tmp;
                        }
                        
                        def code(A, B, C):
                        	tmp = 0
                        	if B <= -3.9e-67:
                        		tmp = 180.0 * (math.atan(1.0) / math.pi)
                        	elif B <= -6.2e-308:
                        		tmp = (180.0 * math.atan(((B / A) * 0.5))) / math.pi
                        	elif B <= 4.2e-220:
                        		tmp = (math.atan(((A / B) * -2.0)) / math.pi) * 180.0
                        	elif B <= 31000000.0:
                        		tmp = (180.0 * math.atan(((B / C) * -0.5))) / math.pi
                        	else:
                        		tmp = 180.0 * (math.atan(-1.0) / math.pi)
                        	return tmp
                        
                        function code(A, B, C)
                        	tmp = 0.0
                        	if (B <= -3.9e-67)
                        		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
                        	elseif (B <= -6.2e-308)
                        		tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / A) * 0.5))) / pi);
                        	elseif (B <= 4.2e-220)
                        		tmp = Float64(Float64(atan(Float64(Float64(A / B) * -2.0)) / pi) * 180.0);
                        	elseif (B <= 31000000.0)
                        		tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / C) * -0.5))) / 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 <= -3.9e-67)
                        		tmp = 180.0 * (atan(1.0) / pi);
                        	elseif (B <= -6.2e-308)
                        		tmp = (180.0 * atan(((B / A) * 0.5))) / pi;
                        	elseif (B <= 4.2e-220)
                        		tmp = (atan(((A / B) * -2.0)) / pi) * 180.0;
                        	elseif (B <= 31000000.0)
                        		tmp = (180.0 * atan(((B / C) * -0.5))) / pi;
                        	else
                        		tmp = 180.0 * (atan(-1.0) / pi);
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[A_, B_, C_] := If[LessEqual[B, -3.9e-67], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.2e-308], N[(N[(180.0 * N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 4.2e-220], N[(N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], If[LessEqual[B, 31000000.0], N[(N[(180.0 * N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;B \leq -3.9 \cdot 10^{-67}:\\
                        \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
                        
                        \mathbf{elif}\;B \leq -6.2 \cdot 10^{-308}:\\
                        \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
                        
                        \mathbf{elif}\;B \leq 4.2 \cdot 10^{-220}:\\
                        \;\;\;\;\frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi} \cdot 180\\
                        
                        \mathbf{elif}\;B \leq 31000000:\\
                        \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 5 regimes
                        2. if B < -3.8999999999999998e-67

                          1. Initial program 50.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}{1}}{\pi} \]
                          3. Step-by-step derivation
                            1. Applied rewrites55.6%

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

                            if -3.8999999999999998e-67 < B < -6.19999999999999983e-308

                            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 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-/.f6431.2

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

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

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

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

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

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

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

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

                            if -6.19999999999999983e-308 < B < 4.19999999999999985e-220

                            1. Initial program 60.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 A around inf

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

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

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

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

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

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

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

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

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

                            if 4.19999999999999985e-220 < B < 3.1e7

                            1. Initial program 58.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 3.1e7 < B

                              1. Initial program 48.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 rewrites62.5%

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

                              Alternative 11: 47.1% accurate, 1.8× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -3.9 \cdot 10^{-67}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-308}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180\\ \mathbf{elif}\;B \leq 4.2 \cdot 10^{-220}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi} \cdot 180\\ \mathbf{elif}\;B \leq 31000000:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \end{array} \]
                              (FPCore (A B C)
                               :precision binary64
                               (if (<= B -3.9e-67)
                                 (* 180.0 (/ (atan 1.0) PI))
                                 (if (<= B -6.2e-308)
                                   (* (/ (atan (* (/ B A) 0.5)) PI) 180.0)
                                   (if (<= B 4.2e-220)
                                     (* (/ (atan (* (/ A B) -2.0)) PI) 180.0)
                                     (if (<= B 31000000.0)
                                       (/ (* 180.0 (atan (* (/ B C) -0.5))) PI)
                                       (* 180.0 (/ (atan -1.0) PI)))))))
                              double code(double A, double B, double C) {
                              	double tmp;
                              	if (B <= -3.9e-67) {
                              		tmp = 180.0 * (atan(1.0) / ((double) M_PI));
                              	} else if (B <= -6.2e-308) {
                              		tmp = (atan(((B / A) * 0.5)) / ((double) M_PI)) * 180.0;
                              	} else if (B <= 4.2e-220) {
                              		tmp = (atan(((A / B) * -2.0)) / ((double) M_PI)) * 180.0;
                              	} else if (B <= 31000000.0) {
                              		tmp = (180.0 * atan(((B / C) * -0.5))) / ((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 <= -3.9e-67) {
                              		tmp = 180.0 * (Math.atan(1.0) / Math.PI);
                              	} else if (B <= -6.2e-308) {
                              		tmp = (Math.atan(((B / A) * 0.5)) / Math.PI) * 180.0;
                              	} else if (B <= 4.2e-220) {
                              		tmp = (Math.atan(((A / B) * -2.0)) / Math.PI) * 180.0;
                              	} else if (B <= 31000000.0) {
                              		tmp = (180.0 * Math.atan(((B / C) * -0.5))) / Math.PI;
                              	} else {
                              		tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
                              	}
                              	return tmp;
                              }
                              
                              def code(A, B, C):
                              	tmp = 0
                              	if B <= -3.9e-67:
                              		tmp = 180.0 * (math.atan(1.0) / math.pi)
                              	elif B <= -6.2e-308:
                              		tmp = (math.atan(((B / A) * 0.5)) / math.pi) * 180.0
                              	elif B <= 4.2e-220:
                              		tmp = (math.atan(((A / B) * -2.0)) / math.pi) * 180.0
                              	elif B <= 31000000.0:
                              		tmp = (180.0 * math.atan(((B / C) * -0.5))) / math.pi
                              	else:
                              		tmp = 180.0 * (math.atan(-1.0) / math.pi)
                              	return tmp
                              
                              function code(A, B, C)
                              	tmp = 0.0
                              	if (B <= -3.9e-67)
                              		tmp = Float64(180.0 * Float64(atan(1.0) / pi));
                              	elseif (B <= -6.2e-308)
                              		tmp = Float64(Float64(atan(Float64(Float64(B / A) * 0.5)) / pi) * 180.0);
                              	elseif (B <= 4.2e-220)
                              		tmp = Float64(Float64(atan(Float64(Float64(A / B) * -2.0)) / pi) * 180.0);
                              	elseif (B <= 31000000.0)
                              		tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / C) * -0.5))) / 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 <= -3.9e-67)
                              		tmp = 180.0 * (atan(1.0) / pi);
                              	elseif (B <= -6.2e-308)
                              		tmp = (atan(((B / A) * 0.5)) / pi) * 180.0;
                              	elseif (B <= 4.2e-220)
                              		tmp = (atan(((A / B) * -2.0)) / pi) * 180.0;
                              	elseif (B <= 31000000.0)
                              		tmp = (180.0 * atan(((B / C) * -0.5))) / pi;
                              	else
                              		tmp = 180.0 * (atan(-1.0) / pi);
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[A_, B_, C_] := If[LessEqual[B, -3.9e-67], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.2e-308], N[(N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], If[LessEqual[B, 4.2e-220], N[(N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], If[LessEqual[B, 31000000.0], N[(N[(180.0 * N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;B \leq -3.9 \cdot 10^{-67}:\\
                              \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
                              
                              \mathbf{elif}\;B \leq -6.2 \cdot 10^{-308}:\\
                              \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180\\
                              
                              \mathbf{elif}\;B \leq 4.2 \cdot 10^{-220}:\\
                              \;\;\;\;\frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi} \cdot 180\\
                              
                              \mathbf{elif}\;B \leq 31000000:\\
                              \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 5 regimes
                              2. if B < -3.8999999999999998e-67

                                1. Initial program 50.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}{1}}{\pi} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites55.6%

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

                                  if -3.8999999999999998e-67 < B < -6.19999999999999983e-308

                                  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 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-/.f6431.2

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

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

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

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

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

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

                                  if -6.19999999999999983e-308 < B < 4.19999999999999985e-220

                                  1. Initial program 60.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 A around inf

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

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

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

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

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

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

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

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

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

                                  if 4.19999999999999985e-220 < B < 3.1e7

                                  1. Initial program 58.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 3.1e7 < B

                                    1. Initial program 48.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 rewrites62.5%

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

                                    Alternative 12: 46.2% accurate, 2.0× speedup?

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

                                      1. Initial program 50.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}{1}}{\pi} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites55.6%

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

                                        if -3.8999999999999998e-67 < B < -6.19999999999999983e-308

                                        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 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-/.f6431.2

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

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

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

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

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

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

                                        if -6.19999999999999983e-308 < B < 3.7999999999999998e42

                                        1. Initial program 59.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 A around inf

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

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

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

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

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

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

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

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

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

                                        if 3.7999999999999998e42 < B

                                        1. Initial program 45.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}{-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 13: 45.0% accurate, 2.0× speedup?

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

                                          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 rewrites51.9%

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

                                            if -1.3e-113 < B < 6.59999999999999972e-155

                                            1. Initial program 59.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 rewrites6.8%

                                                \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\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. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if 6.59999999999999972e-155 < B < 3.7999999999999998e42

                                              1. Initial program 61.4%

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

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

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

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

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

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

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

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

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

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

                                              if 3.7999999999999998e42 < B

                                              1. Initial program 45.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}{-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 14: 44.9% accurate, 2.8× speedup?

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

                                                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 rewrites51.9%

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

                                                  if -1.3e-113 < B < 3.8999999999999997e-141

                                                  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}{-1}}{\pi} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites7.3%

                                                      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\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. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if 3.8999999999999997e-141 < B

                                                    1. Initial program 51.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 B around inf

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

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

                                                    Alternative 15: 40.1% accurate, 3.3× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -7.8 \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 -7.8e-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 <= -7.8e-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 <= -7.8e-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 <= -7.8e-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 <= -7.8e-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 <= -7.8e-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, -7.8e-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 -7.8 \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 < -7.8000000000000005e-305

                                                      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 rewrites40.6%

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

                                                        if -7.8000000000000005e-305 < B

                                                        1. Initial program 53.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 rewrites39.5%

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

                                                        Alternative 16: 21.1% accurate, 4.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 54.1%

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

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

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

                                                          Reproduce

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