ABCF->ab-angle angle

Percentage Accurate: 53.5% → 88.3%
Time: 19.8s
Alternatives: 19
Speedup: 3.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}

Sampling outcomes in binary64 precision:

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

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

Initial Program: 53.5% 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.3% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 55.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto 180 \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}} \]
      2. un-div-invN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(180, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \tan^{-1} \color{blue}{\left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}\right)\right) \]
      6. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(180, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{atan.f64}\left(\left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(180, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{atan.f64}\left(\left(\left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \cdot \frac{1}{B}\right)\right)\right)\right) \]
      8. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(180, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{atan.f64}\left(\left(\frac{\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}{B}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(180, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right), B\right)\right)\right)\right) \]
    4. Applied egg-rr89.4%

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

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

    1. Initial program 15.3%

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

        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C - A}\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2}}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(B \cdot \frac{B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \left(\frac{B}{C - A}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. --lowering--.f6455.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified55.5%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\tan^{-1} \left(\frac{\frac{-1}{2} \cdot \left(B \cdot \frac{B}{C - A}\right)}{B}\right) \cdot 180\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
      3. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \tan^{-1} \left(\frac{\frac{-1}{2} \cdot \left(B \cdot \frac{B}{C - A}\right)}{B}\right)\right), \mathsf{PI}\left(\right)\right) \]
      5. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left(B \cdot \frac{B}{C - A}\right)}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{-1}{2} \cdot \frac{B \cdot \frac{B}{C - A}}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot \frac{B}{C - A}}{B}\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(B \cdot \frac{B}{C - A}\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{B}{C - A}\right)\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      12. PI-lowering-PI.f6455.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    9. Applied egg-rr55.4%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\left(B \cdot \frac{B}{C - A}\right) \cdot \frac{1}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot B}{C - A} \cdot \frac{1}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      3. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{\left(B \cdot B\right) \cdot \frac{1}{B}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2} \cdot \frac{1}{B}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2} \cdot {B}^{-1}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. pow-prod-upN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{\left(2 + -1\right)}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{1}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. unpow1N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{1}{\frac{C - A}{B}}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      10. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(\frac{1}{C - A}\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(C - A\right)\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      13. --lowering--.f6498.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(C, A\right)\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    11. Applied egg-rr98.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right), \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \left(\frac{1}{C - A} \cdot B\right)\right)}\right)\right) \]
      6. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \tan^{-1} \left(\color{blue}{\frac{-1}{2}} \cdot \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right) \]
      7. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\left(\frac{-1}{2} \cdot \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(B \cdot \frac{1}{C - A}\right)\right)\right)\right)\right) \]
      10. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{C - A}\right)\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right)\right)\right) \]
      12. --lowering--.f6498.8%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right)\right)\right) \]
    13. Applied egg-rr98.8%

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

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

    1. Initial program 66.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. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{B}{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \left(\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\left(C - A\right), \left(\sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\mathsf{hypot}\left(B, C - A\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \left(C - A\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      8. --lowering--.f6489.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Applied egg-rr89.9%

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

Alternative 2: 77.9% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 20.5%

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

        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C - A}\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2}}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(B \cdot \frac{B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \left(\frac{B}{C - A}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. --lowering--.f6463.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified63.0%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\tan^{-1} \left(\frac{\frac{-1}{2} \cdot \left(B \cdot \frac{B}{C - A}\right)}{B}\right) \cdot 180\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
      3. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \tan^{-1} \left(\frac{\frac{-1}{2} \cdot \left(B \cdot \frac{B}{C - A}\right)}{B}\right)\right), \mathsf{PI}\left(\right)\right) \]
      5. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left(B \cdot \frac{B}{C - A}\right)}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{-1}{2} \cdot \frac{B \cdot \frac{B}{C - A}}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot \frac{B}{C - A}}{B}\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(B \cdot \frac{B}{C - A}\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{B}{C - A}\right)\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      12. PI-lowering-PI.f6462.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    9. Applied egg-rr62.9%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\left(B \cdot \frac{B}{C - A}\right) \cdot \frac{1}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot B}{C - A} \cdot \frac{1}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      3. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{\left(B \cdot B\right) \cdot \frac{1}{B}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2} \cdot \frac{1}{B}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2} \cdot {B}^{-1}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. pow-prod-upN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{\left(2 + -1\right)}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{1}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. unpow1N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{1}{\frac{C - A}{B}}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      10. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(\frac{1}{C - A}\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(C - A\right)\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      13. --lowering--.f6471.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(C, A\right)\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    11. Applied egg-rr71.3%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right), \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \left(\frac{1}{C - A} \cdot B\right)\right)}\right)\right) \]
      6. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \tan^{-1} \left(\color{blue}{\frac{-1}{2}} \cdot \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right) \]
      7. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\left(\frac{-1}{2} \cdot \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(B \cdot \frac{1}{C - A}\right)\right)\right)\right)\right) \]
      10. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{C - A}\right)\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right)\right)\right) \]
      12. --lowering--.f6471.5%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right)\right)\right) \]
    13. Applied egg-rr71.5%

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

    if -1.12e24 < A < 1.35e29

    1. Initial program 54.1%

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

        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. hypot-lowering-hypot.f6474.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified74.8%

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

    if 1.35e29 < A

    1. Initial program 79.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. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\sqrt{{A}^{2} + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\sqrt{A \cdot A + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\sqrt{A \cdot A + B \cdot B}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\mathsf{hypot}\left(A, B\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      8. hypot-lowering-hypot.f6492.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(A, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified92.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.12 \cdot 10^{+24}:\\ \;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}}\\ \mathbf{elif}\;A \leq 1.35 \cdot 10^{+29}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{0 - B}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 75.4% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 20.5%

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

        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C - A}\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2}}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(B \cdot \frac{B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \left(\frac{B}{C - A}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. --lowering--.f6463.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified63.0%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\tan^{-1} \left(\frac{\frac{-1}{2} \cdot \left(B \cdot \frac{B}{C - A}\right)}{B}\right) \cdot 180\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
      3. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \tan^{-1} \left(\frac{\frac{-1}{2} \cdot \left(B \cdot \frac{B}{C - A}\right)}{B}\right)\right), \mathsf{PI}\left(\right)\right) \]
      5. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left(B \cdot \frac{B}{C - A}\right)}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{-1}{2} \cdot \frac{B \cdot \frac{B}{C - A}}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot \frac{B}{C - A}}{B}\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(B \cdot \frac{B}{C - A}\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{B}{C - A}\right)\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      12. PI-lowering-PI.f6462.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    9. Applied egg-rr62.9%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\left(B \cdot \frac{B}{C - A}\right) \cdot \frac{1}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot B}{C - A} \cdot \frac{1}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      3. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{\left(B \cdot B\right) \cdot \frac{1}{B}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2} \cdot \frac{1}{B}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2} \cdot {B}^{-1}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. pow-prod-upN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{\left(2 + -1\right)}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{1}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. unpow1N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{1}{\frac{C - A}{B}}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      10. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(\frac{1}{C - A}\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(C - A\right)\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      13. --lowering--.f6471.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(C, A\right)\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    11. Applied egg-rr71.3%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right), \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \left(\frac{1}{C - A} \cdot B\right)\right)}\right)\right) \]
      6. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \tan^{-1} \left(\color{blue}{\frac{-1}{2}} \cdot \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right) \]
      7. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\left(\frac{-1}{2} \cdot \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(B \cdot \frac{1}{C - A}\right)\right)\right)\right)\right) \]
      10. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{C - A}\right)\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right)\right)\right) \]
      12. --lowering--.f6471.5%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right)\right)\right) \]
    13. Applied egg-rr71.5%

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

    if -7.5e20 < A < 1.5999999999999999e132

    1. Initial program 54.7%

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

        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. hypot-lowering-hypot.f6474.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified74.7%

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

    if 1.5999999999999999e132 < A

    1. Initial program 86.3%

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

        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. associate--r+N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. --lowering--.f6491.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified91.3%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + \left(\mathsf{neg}\left(\frac{A}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 - \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \left(\frac{A}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. /-lowering-/.f6491.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(A, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    10. Simplified91.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -7.5 \cdot 10^{+20}:\\ \;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}}\\ \mathbf{elif}\;A \leq 1.6 \cdot 10^{+132}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.8% accurate, 1.9× speedup?

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

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

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


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

    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. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C - A}\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2}}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(B \cdot \frac{B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \left(\frac{B}{C - A}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. --lowering--.f6466.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    7. Simplified66.3%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\tan^{-1} \left(\frac{\frac{-1}{2} \cdot \left(B \cdot \frac{B}{C - A}\right)}{B}\right) \cdot 180\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
      3. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \tan^{-1} \left(\frac{\frac{-1}{2} \cdot \left(B \cdot \frac{B}{C - A}\right)}{B}\right)\right), \mathsf{PI}\left(\right)\right) \]
      5. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left(B \cdot \frac{B}{C - A}\right)}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{-1}{2} \cdot \frac{B \cdot \frac{B}{C - A}}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot \frac{B}{C - A}}{B}\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(B \cdot \frac{B}{C - A}\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{B}{C - A}\right)\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
      12. PI-lowering-PI.f6466.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    9. Applied egg-rr66.2%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\left(B \cdot \frac{B}{C - A}\right) \cdot \frac{1}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot B}{C - A} \cdot \frac{1}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      3. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{\left(B \cdot B\right) \cdot \frac{1}{B}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2} \cdot \frac{1}{B}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2} \cdot {B}^{-1}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. pow-prod-upN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{\left(2 + -1\right)}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{1}}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. unpow1N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{C - A}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{1}{\frac{C - A}{B}}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      10. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(\frac{1}{C - A}\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(C - A\right)\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      13. --lowering--.f6474.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(C, A\right)\right), B\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    11. Applied egg-rr74.7%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right), \tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \left(\frac{1}{C - A} \cdot B\right)\right)}\right)\right) \]
      6. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \tan^{-1} \left(\color{blue}{\frac{-1}{2}} \cdot \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right) \]
      7. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\left(\frac{-1}{2} \cdot \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{1}{C - A} \cdot B\right)\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(B \cdot \frac{1}{C - A}\right)\right)\right)\right)\right) \]
      10. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{C - A}\right)\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right)\right)\right) \]
      12. --lowering--.f6475.0%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right)\right)\right) \]
    13. Applied egg-rr75.0%

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

    if -4.40000000000000006e86 < A

    1. Initial program 59.8%

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

        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.4 \cdot 10^{+86}:\\ \;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 46.5% accurate, 3.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.36 \cdot 10^{-45}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\

\mathbf{elif}\;B \leq -6 \cdot 10^{-170}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\

\mathbf{elif}\;B \leq 1.8 \cdot 10^{-229}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\

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

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if B < -1.35999999999999998e-45

    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. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
      2. associate-*l/N/A

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. Simplified56.1%

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

      if -1.35999999999999998e-45 < B < -6.00000000000000027e-170

      1. Initial program 68.0%

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

          \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
        2. associate-*l/N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. associate--r+N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. div-subN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. --lowering--.f6461.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. Simplified61.7%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      9. Step-by-step derivation
        1. /-lowering-/.f6448.1%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(C, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      10. Simplified48.1%

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

      if -6.00000000000000027e-170 < B < 1.80000000000000001e-229

      1. Initial program 56.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. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
        2. associate-*l/N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C - A}\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2}}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. associate-/l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(B \cdot \frac{B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \left(\frac{B}{C - A}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. --lowering--.f6434.3%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. Simplified34.3%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      9. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{C}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. /-lowering-/.f6445.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(B, C\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      10. Simplified45.0%

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

      if 1.80000000000000001e-229 < B < 2.1e6

      1. Initial program 49.6%

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

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. *-lowering-*.f6447.1%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified47.1%

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

      if 2.1e6 < B

      1. Initial program 47.7%

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

          \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
        2. associate-*l/N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. Step-by-step derivation
        1. Simplified62.8%

          \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
      7. Recombined 5 regimes into one program.
      8. Final simplification53.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.36 \cdot 10^{-45}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq -6 \cdot 10^{-170}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-229}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;B \leq 2100000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
      9. Add Preprocessing

      Alternative 6: 66.1% accurate, 3.3× speedup?

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

        1. Initial program 59.1%

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

            \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
          2. associate-*l/N/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot \left(C - A\right) + \frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{B}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(1 + \left(\mathsf{neg}\left(\frac{-1 \cdot \left(C - A\right) + \frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{B}}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          2. unsub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(1 - \frac{-1 \cdot \left(C - A\right) + \frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{B}}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          3. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{-1 \cdot \left(C - A\right) + \frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{B}}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(-1 \cdot \left(C - A\right) + \frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{B}\right), B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        7. Simplified71.8%

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

        if -1.0500000000000001e-264 < B < 1.4e-110

        1. Initial program 38.0%

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

            \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
          2. associate-*l/N/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          3. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. distribute-neg-fracN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          9. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          10. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          11. distribute-neg-fracN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          12. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{-1}{2}}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          13. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \left(C - A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          14. --lowering--.f6470.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        7. Simplified70.7%

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

        if 1.4e-110 < 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. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
          2. associate-*l/N/A

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

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

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

          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
        4. Add Preprocessing
        5. Step-by-step derivation
          1. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{B}{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \left(\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\left(C - A\right), \left(\sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. hypot-defineN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\mathsf{hypot}\left(B, C - A\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. hypot-lowering-hypot.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \left(C - A\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          8. --lowering--.f6479.9%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. Applied egg-rr79.9%

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{1}{\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. associate--l-N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(C - \left(A + \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(A + \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{+.f64}\left(A, \left(\sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. hypot-defineN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{+.f64}\left(A, \left(\mathsf{hypot}\left(B, C - A\right)\right)\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          8. hypot-lowering-hypot.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \left(C - A\right)\right)\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          9. --lowering--.f6479.9%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. Applied egg-rr79.9%

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{+.f64}\left(A, \color{blue}{B}\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        10. Step-by-step derivation
          1. Simplified76.7%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.05 \cdot 10^{-264}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{\left(C - A\right) + -0.5 \cdot \left(\left(A - C\right) \cdot \frac{C - A}{B}\right)}{B}\right)\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{-110}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{\frac{1}{\frac{C - \left(B + A\right)}{B}}}\right)\\ \end{array} \]
        13. Add Preprocessing

        Alternative 7: 65.6% accurate, 3.4× speedup?

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

          1. Initial program 58.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. Add Preprocessing
          3. Taylor expanded in B around -inf

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. Step-by-step derivation
            1. associate--l+N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(1 + \left(\frac{C}{B} - \frac{A}{B}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. div-subN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(1 + \frac{C - A}{B}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{C - A}{B}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(C - A\right), B\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. --lowering--.f6473.1%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified73.1%

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

          if -9e-196 < B < 2.40000000000000006e-110

          1. Initial program 45.5%

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

              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
            2. associate-*l/N/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. distribute-neg-fracN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            11. distribute-neg-fracN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            12. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{-1}{2}}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            13. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \left(C - A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            14. --lowering--.f6465.8%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. Simplified65.8%

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

          if 2.40000000000000006e-110 < 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. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
            2. associate-*l/N/A

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

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

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

            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
          4. Add Preprocessing
          5. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{1}{\frac{B}{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{B}{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \left(\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\left(C - A\right), \left(\sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. hypot-defineN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\mathsf{hypot}\left(B, C - A\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. hypot-lowering-hypot.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \left(C - A\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. --lowering--.f6479.9%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. Applied egg-rr79.9%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{1}{\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. associate--l-N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(C - \left(A + \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(A + \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{+.f64}\left(A, \left(\sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. hypot-defineN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{+.f64}\left(A, \left(\mathsf{hypot}\left(B, C - A\right)\right)\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. hypot-lowering-hypot.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \left(C - A\right)\right)\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. --lowering--.f6479.9%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          8. Applied egg-rr79.9%

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{+.f64}\left(A, \color{blue}{B}\right)\right), B\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          10. Step-by-step derivation
            1. Simplified76.7%

              \[\leadsto \tan^{-1} \left(\frac{1}{\frac{1}{\frac{C - \left(A + \color{blue}{B}\right)}{B}}}\right) \cdot \frac{180}{\pi} \]
          11. Recombined 3 regimes into one program.
          12. Final simplification72.9%

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -9 \cdot 10^{-196}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{-110}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{\frac{1}{\frac{C - \left(B + A\right)}{B}}}\right)\\ \end{array} \]
          13. Add Preprocessing

          Alternative 8: 58.9% accurate, 3.4× speedup?

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

            1. Initial program 74.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. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              2. associate-*l/N/A

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. hypot-defineN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. hypot-lowering-hypot.f6485.5%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. Simplified85.5%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(C - B\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. Step-by-step derivation
              1. --lowering--.f6479.4%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, B\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. Simplified79.4%

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

            if -1.31999999999999993e-58 < C < -6.99999999999999973e-102

            1. Initial program 54.2%

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

                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              2. associate-*l/N/A

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. hypot-defineN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. hypot-lowering-hypot.f6462.1%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. Simplified62.1%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(1 + \frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. Step-by-step derivation
              1. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{C}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. /-lowering-/.f6455.2%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(C, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. Simplified55.2%

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

            if -6.99999999999999973e-102 < C < 4.89999999999999966e-151

            1. Initial program 57.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. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              2. associate-*l/N/A

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. associate--r+N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. div-subN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. --lowering--.f6461.2%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. Simplified61.2%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. Step-by-step derivation
              1. distribute-lft-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. mul-1-negN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + \left(\mathsf{neg}\left(\frac{A}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. unsub-negN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 - \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \left(\frac{A}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. /-lowering-/.f6461.2%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(A, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. Simplified61.2%

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

            if 4.89999999999999966e-151 < C

            1. Initial program 31.0%

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

                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              2. associate-*l/N/A

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C - A}\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2}}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. associate-/l*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(B \cdot \frac{B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \left(\frac{B}{C - A}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. --lowering--.f6445.4%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. Simplified45.4%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{C}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. /-lowering-/.f6452.2%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(B, C\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. Simplified52.2%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.32 \cdot 10^{-58}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{elif}\;C \leq -7 \cdot 10^{-102}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\ \mathbf{elif}\;C \leq 4.9 \cdot 10^{-151}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 9: 50.5% accurate, 3.4× speedup?

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

            1. Initial program 56.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. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              2. associate-*l/N/A

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. hypot-defineN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. hypot-lowering-hypot.f6463.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. Simplified63.0%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(1 + \frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. Step-by-step derivation
              1. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{C}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. /-lowering-/.f6461.8%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(C, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. Simplified61.8%

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

            if -2.1000000000000001e-169 < B < 8.49999999999999977e-229

            1. Initial program 56.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. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              2. associate-*l/N/A

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C - A}\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2}}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B \cdot B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. associate-/l*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(B \cdot \frac{B}{C - A}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \left(\frac{B}{C - A}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. --lowering--.f6434.3%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. Simplified34.3%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{C}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. /-lowering-/.f6445.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(B, C\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. Simplified45.0%

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

            if 8.49999999999999977e-229 < B < 3.2e6

            1. Initial program 49.6%

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. *-lowering-*.f6447.1%

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. Simplified47.1%

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

            if 3.2e6 < B

            1. Initial program 47.7%

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

                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              2. associate-*l/N/A

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. Step-by-step derivation
              1. Simplified62.8%

                \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
            7. Recombined 4 regimes into one program.
            8. Final simplification56.9%

              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.1 \cdot 10^{-169}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-229}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\ \mathbf{elif}\;B \leq 3200000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
            9. Add Preprocessing

            Alternative 10: 46.8% accurate, 3.4× speedup?

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

              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. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                2. associate-*l/N/A

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. Step-by-step derivation
                1. Simplified56.1%

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

                if -9.8000000000000002e-46 < B < 1.4999999999999999e-308

                1. Initial program 65.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. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                  2. associate-*l/N/A

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                6. Step-by-step derivation
                  1. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  2. associate--r+N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  3. div-subN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  4. --lowering--.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  5. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. --lowering--.f6458.3%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                7. Simplified58.3%

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                9. Step-by-step derivation
                  1. /-lowering-/.f6441.2%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(C, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                10. Simplified41.2%

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

                if 1.4999999999999999e-308 < B < 3.9e6

                1. Initial program 48.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. Add Preprocessing
                3. Taylor expanded in A around -inf

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                4. Step-by-step derivation
                  1. associate-*r/N/A

                    \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                  2. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                  4. *-lowering-*.f6441.9%

                    \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                5. Simplified41.9%

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

                if 3.9e6 < B

                1. Initial program 47.7%

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

                    \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                  2. associate-*l/N/A

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                6. Step-by-step derivation
                  1. Simplified62.8%

                    \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
                7. Recombined 4 regimes into one program.
                8. Final simplification51.7%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -9.8 \cdot 10^{-46}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-308}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;B \leq 3900000:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                9. Add Preprocessing

                Alternative 11: 65.7% accurate, 3.5× speedup?

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

                  1. Initial program 58.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. Add Preprocessing
                  3. Taylor expanded in B around -inf

                    \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                  4. Step-by-step derivation
                    1. associate--l+N/A

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(1 + \left(\frac{C}{B} - \frac{A}{B}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. div-subN/A

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(1 + \frac{C - A}{B}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{C - A}{B}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(C - A\right), B\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. --lowering--.f6473.1%

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                  5. Simplified73.1%

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

                  if -6.8e-196 < B < 1.20000000000000006e-113

                  1. Initial program 45.5%

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

                      \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                    2. associate-*l/N/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. associate-*r/N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. associate-/l*N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. metadata-evalN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. distribute-neg-fracN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. metadata-evalN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    7. associate-*r/N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    8. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    9. associate-*r/N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    10. metadata-evalN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    11. distribute-neg-fracN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    12. metadata-evalN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{-1}{2}}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    13. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \left(C - A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    14. --lowering--.f6465.8%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  7. Simplified65.8%

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

                  if 1.20000000000000006e-113 < 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. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                    2. associate-*l/N/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. +-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. associate--r+N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. div-subN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. --lowering--.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. --lowering--.f6476.7%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  7. Simplified76.7%

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.8 \cdot 10^{-196}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{-113}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 + \frac{C - A}{B}\right)\\ \end{array} \]
                5. Add Preprocessing

                Alternative 12: 62.6% accurate, 3.5× speedup?

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

                  1. Initial program 58.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. Add Preprocessing
                  3. Taylor expanded in B around -inf

                    \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                  4. Step-by-step derivation
                    1. associate--l+N/A

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(1 + \left(\frac{C}{B} - \frac{A}{B}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. div-subN/A

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(1 + \frac{C - A}{B}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{C - A}{B}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(C - A\right), B\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. --lowering--.f6473.1%

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                  5. Simplified73.1%

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

                  if -2.1e-195 < B < 1.45e-109

                  1. Initial program 45.5%

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

                      \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                    2. associate-*l/N/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. associate-*r/N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. associate-/l*N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. metadata-evalN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. distribute-neg-fracN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. metadata-evalN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    7. associate-*r/N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    8. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    9. associate-*r/N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    10. metadata-evalN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    11. distribute-neg-fracN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    12. metadata-evalN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{-1}{2}}{C - A}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    13. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \left(C - A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    14. --lowering--.f6465.8%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{-1}{2}, \mathsf{\_.f64}\left(C, A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  7. Simplified65.8%

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

                  if 1.45e-109 < 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. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                    2. associate-*l/N/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. --lowering--.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. +-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. hypot-defineN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    7. hypot-lowering-hypot.f6470.4%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  7. Simplified70.4%

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(C - B\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  9. Step-by-step derivation
                    1. --lowering--.f6468.1%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, B\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  10. Simplified68.1%

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.1 \cdot 10^{-195}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.45 \cdot 10^{-109}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \end{array} \]
                5. Add Preprocessing

                Alternative 13: 57.3% accurate, 3.5× speedup?

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

                  1. Initial program 28.5%

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

                      \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                    2. associate-*l/N/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. associate-*r/N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. *-lowering-*.f6459.3%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  7. Simplified59.3%

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

                  if -2.5000000000000001e-124 < A < 1.4e15

                  1. Initial program 56.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. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                    2. associate-*l/N/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. --lowering--.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. +-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. hypot-defineN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    7. hypot-lowering-hypot.f6477.6%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  7. Simplified77.6%

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(1 + \frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  9. Step-by-step derivation
                    1. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{C}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. /-lowering-/.f6445.5%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(C, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  10. Simplified45.5%

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

                  if 1.4e15 < A

                  1. Initial program 79.3%

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

                      \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                    2. associate-*l/N/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. +-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. associate--r+N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. div-subN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. --lowering--.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. --lowering--.f6483.4%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  7. Simplified83.4%

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  9. Step-by-step derivation
                    1. distribute-lft-inN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. metadata-evalN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. mul-1-negN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + \left(\mathsf{neg}\left(\frac{A}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. unsub-negN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 - \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. --lowering--.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \left(\frac{A}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. /-lowering-/.f6481.9%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(A, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  10. Simplified81.9%

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.5 \cdot 10^{-124}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;A \leq 1.4 \cdot 10^{+15}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\ \end{array} \]
                5. Add Preprocessing

                Alternative 14: 57.3% accurate, 3.5× speedup?

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

                  1. Initial program 28.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. Add Preprocessing
                  3. Taylor expanded in A around -inf

                    \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                  4. Step-by-step derivation
                    1. associate-*r/N/A

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. *-lowering-*.f6459.2%

                      \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                  5. Simplified59.2%

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

                  if -3.00000000000000004e-122 < A < 5.6e15

                  1. Initial program 56.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. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                    2. associate-*l/N/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. --lowering--.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. +-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. hypot-defineN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    7. hypot-lowering-hypot.f6477.6%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  7. Simplified77.6%

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(1 + \frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  9. Step-by-step derivation
                    1. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{C}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. /-lowering-/.f6445.5%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(C, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  10. Simplified45.5%

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

                  if 5.6e15 < A

                  1. Initial program 79.3%

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

                      \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                    2. associate-*l/N/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. +-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. associate--r+N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. div-subN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. --lowering--.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. --lowering--.f6483.4%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  7. Simplified83.4%

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  9. Step-by-step derivation
                    1. distribute-lft-inN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    2. metadata-evalN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + -1 \cdot \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    3. mul-1-negN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + \left(\mathsf{neg}\left(\frac{A}{B}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    4. unsub-negN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 - \frac{A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    5. --lowering--.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \left(\frac{A}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. /-lowering-/.f6481.9%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(A, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  10. Simplified81.9%

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3 \cdot 10^{-122}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 5.6 \cdot 10^{+15}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\ \end{array} \]
                5. Add Preprocessing

                Alternative 15: 47.0% accurate, 3.6× speedup?

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

                  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. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                    2. associate-*l/N/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. Simplified56.1%

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

                    if -6.7000000000000001e-46 < B < 3.7e15

                    1. Initial program 58.2%

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

                        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                      2. associate-*l/N/A

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. Step-by-step derivation
                      1. +-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      2. associate--r+N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      3. div-subN/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      4. --lowering--.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      5. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      6. --lowering--.f6451.9%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    7. Simplified51.9%

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    9. Step-by-step derivation
                      1. /-lowering-/.f6433.9%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(C, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    10. Simplified33.9%

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

                    if 3.7e15 < 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. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                      2. associate-*l/N/A

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. Step-by-step derivation
                      1. Simplified64.9%

                        \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
                    7. Recombined 3 regimes into one program.
                    8. Final simplification48.4%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.7 \cdot 10^{-46}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 3.7 \cdot 10^{+15}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 16: 62.9% accurate, 3.6× speedup?

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

                      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. Add Preprocessing
                      3. Taylor expanded in B around -inf

                        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                      4. Step-by-step derivation
                        1. associate--l+N/A

                          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(1 + \left(\frac{C}{B} - \frac{A}{B}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        2. div-subN/A

                          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(1 + \frac{C - A}{B}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        3. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{C - A}{B}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        4. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(C - A\right), B\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        5. --lowering--.f6461.4%

                          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                      5. Simplified61.4%

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

                      if 4.6000000000000001e-48 < B

                      1. Initial program 49.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. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                        2. associate-*l/N/A

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C - \sqrt{{B}^{2} + {C}^{2}}}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      6. Step-by-step derivation
                        1. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(C - \sqrt{{B}^{2} + {C}^{2}}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        2. --lowering--.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        3. +-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        4. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        5. unpow2N/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        6. hypot-defineN/A

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        7. hypot-lowering-hypot.f6473.4%

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      7. Simplified73.4%

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(C - B\right)}, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      9. Step-by-step derivation
                        1. --lowering--.f6470.9%

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, B\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      10. Simplified70.9%

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 4.6 \cdot 10^{-48}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \end{array} \]
                    5. Add Preprocessing

                    Alternative 17: 44.7% accurate, 3.6× speedup?

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

                      1. Initial program 57.2%

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

                          \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                        2. associate-*l/N/A

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      6. Step-by-step derivation
                        1. Simplified44.5%

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

                        if -1.20000000000000003e-176 < B < 3.1000000000000001e-118

                        1. Initial program 48.7%

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

                            \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                          2. associate-*l/N/A

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        6. Step-by-step derivation
                          1. associate-*r/N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          2. distribute-rgt1-inN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-1 \cdot \left(\left(-1 + 1\right) \cdot A\right)}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          3. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-1 \cdot \left(0 \cdot A\right)}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          4. mul0-lftN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-1 \cdot 0}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          5. metadata-evalN/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{0}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. /-lowering-/.f6433.4%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(0, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        7. Simplified33.4%

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

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

                            \[\leadsto \mathsf{/.f64}\left(\left(\tan^{-1} \left(\frac{0}{B}\right) \cdot 180\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                          3. *-commutativeN/A

                            \[\leadsto \mathsf{/.f64}\left(\left(180 \cdot \tan^{-1} \left(\frac{0}{B}\right)\right), \mathsf{PI}\left(\right)\right) \]
                          4. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \tan^{-1} \left(\frac{0}{B}\right)\right), \mathsf{PI}\left(\right)\right) \]
                          5. div0N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \tan^{-1} 0\right), \mathsf{PI}\left(\right)\right) \]
                          6. atan-lowering-atan.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(0\right)\right), \mathsf{PI}\left(\right)\right) \]
                          7. PI-lowering-PI.f6433.4%

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(0\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                        9. Applied egg-rr33.4%

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

                        if 3.1000000000000001e-118 < 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. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                          2. associate-*l/N/A

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        6. Step-by-step derivation
                          1. Simplified54.2%

                            \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
                        7. Recombined 3 regimes into one program.
                        8. Final simplification45.4%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.2 \cdot 10^{-176}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-118}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                        9. Add Preprocessing

                        Alternative 18: 40.2% accurate, 3.8× speedup?

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

                          1. Initial program 58.2%

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

                              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                            2. associate-*l/N/A

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. Step-by-step derivation
                            1. Simplified37.3%

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

                            if -4.999999999999985e-310 < B

                            1. Initial program 48.2%

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

                                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                              2. associate-*l/N/A

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                            6. Step-by-step derivation
                              1. Simplified41.7%

                                \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
                            7. Recombined 2 regimes into one program.
                            8. Final simplification39.6%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                            9. Add Preprocessing

                            Alternative 19: 21.2% accurate, 4.0× speedup?

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

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

                                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                              2. associate-*l/N/A

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                            6. Step-by-step derivation
                              1. Simplified22.2%

                                \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
                              2. Final simplification22.2%

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

                              Reproduce

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