ABCF->ab-angle angle

Percentage Accurate: 54.3% → 88.7%
Time: 20.2s
Alternatives: 27
Speedup: 3.5×

Specification

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

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

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

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

Initial Program: 54.3% accurate, 1.0× speedup?

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

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

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

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

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

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


\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)))))) < -1e-8

    1. Initial program 62.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. Simplified86.1%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6490.7%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{\mathsf{PI}\left(\right)}{180}}{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}\right)}\right) \]
      3. /-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{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}\right)\right) \]
      4. /-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{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}\right)\right) \]
      5. 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(\frac{\color{blue}{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}}{B}\right)\right)\right) \]
      6. 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{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)\right)\right)\right) \]
      7. /-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(\left(\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right), B\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(\mathsf{\_.f64}\left(\left(C - A\right), \left(\sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right), B\right)\right)\right)\right) \]
      9. --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(\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), B\right)\right)\right)\right) \]
      10. +-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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\sqrt{\left(C - A\right) \cdot \left(C - A\right) + B \cdot B}\right)\right), B\right)\right)\right)\right) \]
      11. hypot-defineN/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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\mathsf{hypot}\left(C - A, B\right)\right)\right), B\right)\right)\right)\right) \]
      12. hypot-lowering-hypot.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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(\left(C - A\right), B\right)\right), B\right)\right)\right)\right) \]
      13. --lowering--.f6490.7%

        \[\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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right), B\right)\right)\right)\right) \]
    8. Applied egg-rr90.7%

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

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

    1. Initial program 10.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. Simplified9.4%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6410.7%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

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

    1. Initial program 62.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. Simplified82.9%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6487.5%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      6. +-commutativeN/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{\left(C - A\right) \cdot \left(C - A\right) + B \cdot B}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      7. 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(C - A, B\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      8. 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(\left(C - A\right), B\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      9. --lowering--.f6487.6%

        \[\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(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. Applied egg-rr87.6%

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

Alternative 2: 80.2% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 13.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. Simplified26.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6449.4%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

    if -8.19999999999999967e62 < A < 2.1e-92

    1. Initial program 55.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. Simplified76.1%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6476.5%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      7. hypot-lowering-hypot.f6476.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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    9. Simplified76.5%

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

    if 2.1e-92 < A

    1. Initial program 74.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. Simplified91.7%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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(\mathsf{\_.f64}\left(C, \color{blue}{\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. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \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) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \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) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \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) \]
      4. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \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) \]
      5. hypot-lowering-hypot.f6488.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \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. Simplified88.6%

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

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

Alternative 3: 82.7% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 13.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. Simplified26.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6449.4%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

    if -3.8000000000000002e66 < A

    1. Initial program 62.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. Simplified81.8%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6482.0%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{\mathsf{PI}\left(\right)}{180}}{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}\right)}\right) \]
      3. /-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{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}\right)\right) \]
      4. /-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{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}\right)\right) \]
      5. 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(\frac{\color{blue}{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}}{B}\right)\right)\right) \]
      6. 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{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)\right)\right)\right) \]
      7. /-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(\left(\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right), B\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(\mathsf{\_.f64}\left(\left(C - A\right), \left(\sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right), B\right)\right)\right)\right) \]
      9. --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(\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), B\right)\right)\right)\right) \]
      10. +-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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\sqrt{\left(C - A\right) \cdot \left(C - A\right) + B \cdot B}\right)\right), B\right)\right)\right)\right) \]
      11. hypot-defineN/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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\mathsf{hypot}\left(C - A, B\right)\right)\right), B\right)\right)\right)\right) \]
      12. hypot-lowering-hypot.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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(\left(C - A\right), B\right)\right), B\right)\right)\right)\right) \]
      13. --lowering--.f6482.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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right), B\right)\right)\right)\right) \]
    8. Applied egg-rr82.0%

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

Alternative 4: 77.4% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 13.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. Simplified26.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6449.4%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

    if -3.0000000000000002e64 < A < 1.02e63

    1. Initial program 56.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.4%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6477.8%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      7. hypot-lowering-hypot.f6475.9%

        \[\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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    9. Simplified75.9%

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

    if 1.02e63 < A

    1. Initial program 85.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. 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--.f6486.9%

        \[\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. Simplified86.9%

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

Alternative 5: 77.4% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 13.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. Simplified26.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6449.4%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

    if -3.1000000000000001e63 < A < 1.55e64

    1. Initial program 56.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.4%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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.f6475.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. Simplified75.8%

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

    if 1.55e64 < A

    1. Initial program 85.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. 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--.f6486.9%

        \[\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. Simplified86.9%

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

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

Alternative 6: 82.6% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 13.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. Simplified26.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6449.4%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

    if -1.6e66 < A

    1. Initial program 62.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. Simplified81.8%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6482.0%

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

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

Alternative 7: 82.6% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 13.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. Simplified26.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6449.4%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

    if -1.55000000000000007e62 < A

    1. Initial program 62.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. Simplified81.8%

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

Alternative 8: 66.7% accurate, 3.0× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.25 \cdot 10^{-300}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -1.24999999999999999e-300

    1. Initial program 55.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. 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--.f6466.0%

        \[\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. Simplified66.0%

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

    if -1.24999999999999999e-300 < B < 1.59999999999999986e-213

    1. Initial program 35.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. Simplified59.0%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6477.4%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{\mathsf{PI}\left(\right)}{180}}{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right)}\right) \]
      3. /-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 \frac{B}{C - A}\right)}\right)\right) \]
      4. /-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 \frac{B}{C - A}\right)}\right)\right) \]
      5. 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 \frac{B}{C - A}\right)\right)\right) \]
      6. 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 \frac{B}{C - A}\right)\right)\right)\right) \]
      7. clear-numN/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 \frac{1}{\frac{C - A}{B}}\right)\right)\right)\right) \]
      8. 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(\left(\frac{\frac{-1}{2}}{\frac{C - A}{B}}\right)\right)\right)\right) \]
      9. /-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{C - A}{B}\right)\right)\right)\right)\right) \]
      10. /-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(\left(C - A\right), B\right)\right)\right)\right)\right) \]
      11. --lowering--.f6472.3%

        \[\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(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right)\right)\right) \]
    11. Applied egg-rr72.3%

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

    if 1.59999999999999986e-213 < B

    1. Initial program 56.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. Simplified76.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6478.3%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{\mathsf{PI}\left(\right)}{180}}{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}\right)}\right) \]
      3. /-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{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}\right)\right) \]
      4. /-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{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}\right)\right) \]
      5. 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(\frac{\color{blue}{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}}{B}\right)\right)\right) \]
      6. 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{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)\right)\right)\right) \]
      7. /-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(\left(\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right), B\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(\mathsf{\_.f64}\left(\left(C - A\right), \left(\sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right), B\right)\right)\right)\right) \]
      9. --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(\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), B\right)\right)\right)\right) \]
      10. +-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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\sqrt{\left(C - A\right) \cdot \left(C - A\right) + B \cdot B}\right)\right), B\right)\right)\right)\right) \]
      11. hypot-defineN/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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\mathsf{hypot}\left(C - A, B\right)\right)\right), B\right)\right)\right)\right) \]
      12. hypot-lowering-hypot.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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(\left(C - A\right), B\right)\right), B\right)\right)\right)\right) \]
      13. --lowering--.f6478.3%

        \[\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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right), B\right)\right)\right)\right) \]
    8. Applied egg-rr78.3%

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

      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\color{blue}{\left(\left(\frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{{B}^{2}} + \frac{C}{B}\right) - \left(1 + \frac{A}{B}\right)\right)}\right)\right)\right) \]
    10. Step-by-step derivation
      1. associate--l+N/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 \frac{{\left(C - A\right)}^{2}}{{B}^{2}} + \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      2. +-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(\left(\frac{-1}{2} \cdot \frac{{\left(C - A\right)}^{2}}{{B}^{2}}\right), \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      3. *-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(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{\left(C - A\right)}^{2}}{{B}^{2}}\right)\right), \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      4. unpow2N/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(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{\left(C - A\right) \cdot \left(C - A\right)}{{B}^{2}}\right)\right), \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      5. unpow2N/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(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{\left(C - A\right) \cdot \left(C - A\right)}{B \cdot B}\right)\right), \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      6. times-fracN/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(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{C - A}{B} \cdot \frac{C - A}{B}\right)\right), \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      7. *-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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(\frac{C - A}{B}\right), \left(\frac{C - A}{B}\right)\right)\right), \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), \left(\frac{C - A}{B}\right)\right)\right), \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      9. --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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \left(\frac{C - A}{B}\right)\right)\right), \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      10. /-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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \mathsf{/.f64}\left(\left(C - A\right), B\right)\right)\right), \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right), \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      12. associate--r+N/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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right), \left(\left(\frac{C}{B} - 1\right) - \frac{A}{B}\right)\right)\right)\right)\right) \]
      13. --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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right), \mathsf{\_.f64}\left(\left(\frac{C}{B} - 1\right), \left(\frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      14. sub-negN/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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right), \mathsf{\_.f64}\left(\left(\frac{C}{B} + \left(\mathsf{neg}\left(1\right)\right)\right), \left(\frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      15. metadata-evalN/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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right), \mathsf{\_.f64}\left(\left(\frac{C}{B} + -1\right), \left(\frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      16. +-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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(\frac{C}{B}\right), -1\right), \left(\frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      17. /-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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(C, B\right), -1\right), \left(\frac{A}{B}\right)\right)\right)\right)\right)\right) \]
      18. /-lowering-/.f6474.2%

        \[\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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(C, B\right), -1\right), \mathsf{/.f64}\left(A, B\right)\right)\right)\right)\right)\right) \]
    11. Simplified74.2%

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

Alternative 9: 66.8% accurate, 3.1× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -3.9 \cdot 10^{-296}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -3.9000000000000001e-296

    1. Initial program 55.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. 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--.f6466.0%

        \[\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. Simplified66.0%

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

    if -3.9000000000000001e-296 < B < 3.19999999999999972e-213

    1. Initial program 35.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. Simplified59.0%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6477.4%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{\mathsf{PI}\left(\right)}{180}}{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right)}\right) \]
      3. /-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 \frac{B}{C - A}\right)}\right)\right) \]
      4. /-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 \frac{B}{C - A}\right)}\right)\right) \]
      5. 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 \frac{B}{C - A}\right)\right)\right) \]
      6. 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 \frac{B}{C - A}\right)\right)\right)\right) \]
      7. clear-numN/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 \frac{1}{\frac{C - A}{B}}\right)\right)\right)\right) \]
      8. 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(\left(\frac{\frac{-1}{2}}{\frac{C - A}{B}}\right)\right)\right)\right) \]
      9. /-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{C - A}{B}\right)\right)\right)\right)\right) \]
      10. /-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(\left(C - A\right), B\right)\right)\right)\right)\right) \]
      11. --lowering--.f6472.3%

        \[\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(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right)\right)\right) \]
    11. Applied egg-rr72.3%

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

    if 3.19999999999999972e-213 < B

    1. Initial program 56.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. 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(\frac{-1}{2} \cdot \frac{{\left(A - C\right)}^{2}}{{B}^{2}} + \frac{C}{B}\right) - \left(1 + \frac{A}{B}\right)\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(\frac{-1}{2} \cdot \frac{{\left(A - C\right)}^{2}}{{B}^{2}} + \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\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 \frac{{\left(A - C\right)}^{2}}{{B}^{2}}\right), \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
    5. Simplified74.1%

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

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

Alternative 10: 66.4% accurate, 3.4× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.5 \cdot 10^{-301}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -1.5e-301

    1. Initial program 55.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. 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--.f6466.0%

        \[\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. Simplified66.0%

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

    if -1.5e-301 < B < 7.0000000000000003e-203

    1. Initial program 38.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. Simplified57.9%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6473.4%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{\mathsf{PI}\left(\right)}{180}}{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right)}\right) \]
      3. /-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 \frac{B}{C - A}\right)}\right)\right) \]
      4. /-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 \frac{B}{C - A}\right)}\right)\right) \]
      5. 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 \frac{B}{C - A}\right)\right)\right) \]
      6. 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 \frac{B}{C - A}\right)\right)\right)\right) \]
      7. clear-numN/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 \frac{1}{\frac{C - A}{B}}\right)\right)\right)\right) \]
      8. 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(\left(\frac{\frac{-1}{2}}{\frac{C - A}{B}}\right)\right)\right)\right) \]
      9. /-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{C - A}{B}\right)\right)\right)\right)\right) \]
      10. /-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(\left(C - A\right), B\right)\right)\right)\right)\right) \]
      11. --lowering--.f6468.9%

        \[\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(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right)\right)\right) \]
    11. Applied egg-rr68.9%

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

    if 7.0000000000000003e-203 < B

    1. Initial program 56.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. Simplified77.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6479.3%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{\mathsf{PI}\left(\right)}{180}}{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}\right)}\right) \]
      3. /-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{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}\right)\right) \]
      4. /-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{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}\right)\right) \]
      5. 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(\frac{\color{blue}{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}}{B}\right)\right)\right) \]
      6. 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{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)\right)\right)\right) \]
      7. /-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(\left(\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right), B\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(\mathsf{\_.f64}\left(\left(C - A\right), \left(\sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right)\right), B\right)\right)\right)\right) \]
      9. --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(\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), B\right)\right)\right)\right) \]
      10. +-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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\sqrt{\left(C - A\right) \cdot \left(C - A\right) + B \cdot B}\right)\right), B\right)\right)\right)\right) \]
      11. hypot-defineN/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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \left(\mathsf{hypot}\left(C - A, B\right)\right)\right), B\right)\right)\right)\right) \]
      12. hypot-lowering-hypot.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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(\left(C - A\right), B\right)\right), B\right)\right)\right)\right) \]
      13. --lowering--.f6479.3%

        \[\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(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right)\right), B\right)\right)\right)\right) \]
    8. Applied egg-rr79.3%

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - 1\right) - \frac{A}{B}\right)\right)\right)\right) \]
      2. --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(\left(\frac{C}{B} - 1\right), \left(\frac{A}{B}\right)\right)\right)\right)\right) \]
      3. sub-negN/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(\left(\frac{C}{B} + \left(\mathsf{neg}\left(1\right)\right)\right), \left(\frac{A}{B}\right)\right)\right)\right)\right) \]
      4. metadata-evalN/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(\left(\frac{C}{B} + -1\right), \left(\frac{A}{B}\right)\right)\right)\right)\right) \]
      5. +-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(\mathsf{+.f64}\left(\left(\frac{C}{B}\right), -1\right), \left(\frac{A}{B}\right)\right)\right)\right)\right) \]
      6. /-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(\mathsf{+.f64}\left(\mathsf{/.f64}\left(C, B\right), -1\right), \left(\frac{A}{B}\right)\right)\right)\right)\right) \]
      7. /-lowering-/.f6474.2%

        \[\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(\mathsf{+.f64}\left(\mathsf{/.f64}\left(C, B\right), -1\right), \mathsf{/.f64}\left(A, B\right)\right)\right)\right)\right) \]
    11. Simplified74.2%

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

Alternative 11: 66.2% accurate, 3.4× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -5.6 \cdot 10^{-300}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -5.59999999999999988e-300

    1. Initial program 55.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. 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--.f6466.0%

        \[\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. Simplified66.0%

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

    if -5.59999999999999988e-300 < B < 8.5000000000000006e-149

    1. Initial program 39.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. Simplified59.3%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6474.0%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{\mathsf{PI}\left(\right)}{180}}{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right)}\right) \]
      3. /-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 \frac{B}{C - A}\right)}\right)\right) \]
      4. /-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 \frac{B}{C - A}\right)}\right)\right) \]
      5. 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 \frac{B}{C - A}\right)\right)\right) \]
      6. 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 \frac{B}{C - A}\right)\right)\right)\right) \]
      7. clear-numN/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 \frac{1}{\frac{C - A}{B}}\right)\right)\right)\right) \]
      8. 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(\left(\frac{\frac{-1}{2}}{\frac{C - A}{B}}\right)\right)\right)\right) \]
      9. /-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{C - A}{B}\right)\right)\right)\right)\right) \]
      10. /-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(\left(C - A\right), B\right)\right)\right)\right)\right) \]
      11. --lowering--.f6464.6%

        \[\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(\mathsf{\_.f64}\left(C, A\right), B\right)\right)\right)\right)\right) \]
    11. Applied egg-rr64.6%

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

    if 8.5000000000000006e-149 < B

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

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

        \[\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.1%

      \[\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 simplification69.6%

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

Alternative 12: 66.2% accurate, 3.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -6 \cdot 10^{-297}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -5.9999999999999999e-297

    1. Initial program 55.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. 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--.f6466.0%

        \[\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. Simplified66.0%

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

    if -5.9999999999999999e-297 < B < 1.1500000000000001e-152

    1. Initial program 39.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. Simplified59.3%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6474.0%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1500000000000001e-152 < B

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

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

        \[\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.1%

      \[\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 simplification69.6%

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

Alternative 13: 66.3% accurate, 3.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.25 \cdot 10^{-301}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -1.25000000000000003e-301

    1. Initial program 55.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. 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--.f6466.0%

        \[\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. Simplified66.0%

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

    if -1.25000000000000003e-301 < B < 9.19999999999999939e-160

    1. Initial program 39.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. Simplified59.3%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6474.0%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.19999999999999939e-160 < B

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

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

        \[\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.1%

      \[\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 simplification69.6%

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

Alternative 14: 66.6% accurate, 3.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -3.6 \cdot 10^{-300}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -3.60000000000000016e-300

    1. Initial program 55.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. 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--.f6466.0%

        \[\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. Simplified66.0%

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

    if -3.60000000000000016e-300 < B < 9.50000000000000035e-203

    1. Initial program 38.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. Simplified57.9%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      7. --lowering--.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      9. hypot-defineN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      13. PI-lowering-PI.f6473.4%

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

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
    7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      2. /-lowering-/.f64N/A

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

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

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

    if 9.50000000000000035e-203 < B

    1. Initial program 56.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. Simplified77.5%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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--.f6474.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. Simplified74.2%

      \[\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 simplification69.6%

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

Alternative 15: 66.6% accurate, 3.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.38 \cdot 10^{-297}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -1.38000000000000004e-297

    1. Initial program 55.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. 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--.f6466.0%

        \[\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. Simplified66.0%

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

    if -1.38000000000000004e-297 < B < 2.59999999999999975e-203

    1. Initial program 38.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. Simplified57.9%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{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(\frac{-1}{2}, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. --lowering--.f6468.8%

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

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

    if 2.59999999999999975e-203 < B

    1. Initial program 56.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. Simplified77.5%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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--.f6474.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. Simplified74.2%

      \[\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 simplification69.6%

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

Alternative 16: 66.6% accurate, 3.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.3 \cdot 10^{-301}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\

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

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + -1\right)}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -1.2999999999999999e-301

    1. Initial program 55.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. 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--.f6466.0%

        \[\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. Simplified66.0%

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

    if -1.2999999999999999e-301 < B < 2.5000000000000001e-203

    1. Initial program 38.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. Simplified57.9%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{B}{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(\frac{-1}{2}, \mathsf{/.f64}\left(B, \left(C - A\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      3. --lowering--.f6468.8%

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

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

    if 2.5000000000000001e-203 < B

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\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(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(180, \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{PI.f64}\left(\right)\right)\right) \]
    5. Simplified74.2%

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

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

Alternative 17: 65.5% accurate, 3.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -2.3 \cdot 10^{-302}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\

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

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + -1\right)}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -2.30000000000000002e-302

    1. Initial program 55.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. 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--.f6466.0%

        \[\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. Simplified66.0%

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

    if -2.30000000000000002e-302 < B < 1.0000000000000001e-250

    1. Initial program 29.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. Simplified49.0%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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(B \cdot \left(\frac{1}{8} \cdot \frac{{B}^{2}}{{\left(C - A\right)}^{3}} - \frac{1}{2} \cdot \frac{1}{C - A}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\frac{1}{8} \cdot \frac{{B}^{2}}{{\left(C - A\right)}^{3}} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\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(B \cdot \left(\frac{\frac{1}{8} \cdot {B}^{2}}{{\left(C - A\right)}^{3}} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\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 \left(\frac{\frac{1}{8}}{{\left(C - A\right)}^{3}} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\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 \left(\frac{\frac{1}{8} \cdot 1}{{\left(C - A\right)}^{3}} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\left(\frac{1}{8} \cdot \frac{1}{{\left(C - A\right)}^{3}}\right) \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\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(B, \left(\left(\frac{1}{8} \cdot \frac{1}{{\left(C - A\right)}^{3}}\right) \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. +-lowering-+.f64N/A

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

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

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

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

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

    if 1.0000000000000001e-250 < B

    1. Initial program 56.1%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\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(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(180, \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{PI.f64}\left(\right)\right)\right) \]
    5. Simplified71.3%

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

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

Alternative 18: 60.9% accurate, 3.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -9.5 \cdot 10^{-303}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.7 \cdot 10^{-247}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{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 -9.5e-303)
   (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
   (if (<= B 3.7e-247)
     (* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
     (* (/ 180.0 PI) (atan (/ (- C B) B))))))
double code(double A, double B, double C) {
	double tmp;
	if (B <= -9.5e-303) {
		tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
	} else if (B <= 3.7e-247) {
		tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / 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 <= -9.5e-303) {
		tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
	} else if (B <= 3.7e-247) {
		tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
	}
	return tmp;
}
def code(A, B, C):
	tmp = 0
	if B <= -9.5e-303:
		tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi)
	elif B <= 3.7e-247:
		tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A)))
	else:
		tmp = (180.0 / math.pi) * math.atan(((C - B) / B))
	return tmp
function code(A, B, C)
	tmp = 0.0
	if (B <= -9.5e-303)
		tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi));
	elseif (B <= 3.7e-247)
		tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / 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 <= -9.5e-303)
		tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi);
	elseif (B <= 3.7e-247)
		tmp = (180.0 / pi) * atan((B * (0.5 / A)));
	else
		tmp = (180.0 / pi) * atan(((C - B) / B));
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := If[LessEqual[B, -9.5e-303], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.7e-247], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $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 -9.5 \cdot 10^{-303}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\

\mathbf{elif}\;B \leq 3.7 \cdot 10^{-247}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{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 < -9.4999999999999999e-303

    1. Initial program 55.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. 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--.f6466.0%

        \[\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. Simplified66.0%

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

    if -9.4999999999999999e-303 < B < 3.7000000000000001e-247

    1. Initial program 29.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. Simplified49.0%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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(B \cdot \left(\frac{1}{8} \cdot \frac{{B}^{2}}{{\left(C - A\right)}^{3}} - \frac{1}{2} \cdot \frac{1}{C - A}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\frac{1}{8} \cdot \frac{{B}^{2}}{{\left(C - A\right)}^{3}} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\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(B \cdot \left(\frac{\frac{1}{8} \cdot {B}^{2}}{{\left(C - A\right)}^{3}} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\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 \left(\frac{\frac{1}{8}}{{\left(C - A\right)}^{3}} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\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 \left(\frac{\frac{1}{8} \cdot 1}{{\left(C - A\right)}^{3}} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\left(\frac{1}{8} \cdot \frac{1}{{\left(C - A\right)}^{3}}\right) \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\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(B, \left(\left(\frac{1}{8} \cdot \frac{1}{{\left(C - A\right)}^{3}}\right) \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. +-lowering-+.f64N/A

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

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

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

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

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

    if 3.7000000000000001e-247 < B

    1. Initial program 56.1%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
    2. 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{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \color{blue}{B}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. Simplified63.5%

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

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

    Alternative 19: 47.0% accurate, 3.5× speedup?

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

      1. Initial program 55.2%

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

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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. Simplified60.1%

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

        if -1.7999999999999999e-22 < B < 5.9000000000000003e-10

        1. Initial program 51.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. Simplified59.7%

          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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(B \cdot \left(\frac{1}{8} \cdot \frac{{B}^{2}}{{\left(C - A\right)}^{3}} - \frac{1}{2} \cdot \frac{1}{C - A}\right)\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. Step-by-step derivation
          1. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\frac{1}{8} \cdot \frac{{B}^{2}}{{\left(C - A\right)}^{3}} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\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(B \cdot \left(\frac{\frac{1}{8} \cdot {B}^{2}}{{\left(C - A\right)}^{3}} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\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 \left(\frac{\frac{1}{8}}{{\left(C - A\right)}^{3}} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\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 \left(\frac{\frac{1}{8} \cdot 1}{{\left(C - A\right)}^{3}} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\left(\frac{1}{8} \cdot \frac{1}{{\left(C - A\right)}^{3}}\right) \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\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(B, \left(\left(\frac{1}{8} \cdot \frac{1}{{\left(C - A\right)}^{3}}\right) \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. +-lowering-+.f64N/A

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

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

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

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

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

        if 5.9000000000000003e-10 < B

        1. Initial program 58.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. Simplified86.4%

          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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. Simplified67.5%

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

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

        Alternative 20: 47.0% accurate, 3.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -2.7 \cdot 10^{-22}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 7.8 \cdot 10^{-12}:\\ \;\;\;\;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.7e-22)
           (* (/ 180.0 PI) (atan 1.0))
           (if (<= B 7.8e-12)
             (* 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.7e-22) {
        		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
        	} else if (B <= 7.8e-12) {
        		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.7e-22) {
        		tmp = (180.0 / Math.PI) * Math.atan(1.0);
        	} else if (B <= 7.8e-12) {
        		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.7e-22:
        		tmp = (180.0 / math.pi) * math.atan(1.0)
        	elif B <= 7.8e-12:
        		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.7e-22)
        		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
        	elseif (B <= 7.8e-12)
        		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.7e-22)
        		tmp = (180.0 / pi) * atan(1.0);
        	elseif (B <= 7.8e-12)
        		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.7e-22], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.8e-12], 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.7 \cdot 10^{-22}:\\
        \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
        
        \mathbf{elif}\;B \leq 7.8 \cdot 10^{-12}:\\
        \;\;\;\;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 3 regimes
        2. if B < -2.7000000000000002e-22

          1. Initial program 55.2%

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

            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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. Simplified60.1%

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

            if -2.7000000000000002e-22 < B < 7.79999999999999988e-12

            1. Initial program 51.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. 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. *-lowering-*.f6434.4%

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

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

            if 7.79999999999999988e-12 < B

            1. Initial program 58.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. Simplified86.4%

              \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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. Simplified67.5%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.7 \cdot 10^{-22}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 7.8 \cdot 10^{-12}:\\ \;\;\;\;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 21: 45.1% accurate, 3.6× speedup?

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

              1. Initial program 54.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. Simplified74.9%

                \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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. Simplified53.4%

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

                if -3.79999999999999972e-117 < B < 2.14999999999999995e-144

                1. Initial program 48.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. Simplified60.9%

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

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

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

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

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
                  6. associate--r+N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
                  7. --lowering--.f64N/A

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
                  9. hypot-defineN/A

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

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

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
                  13. PI-lowering-PI.f6473.5%

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

                  \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
                7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
                8. 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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
                  5. metadata-evalN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{0}{B}\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
                  6. /-lowering-/.f6429.7%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(0, B\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
                9. Simplified29.7%

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

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

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

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\tan^{-1} \left(\frac{0}{B}\right), \mathsf{PI}\left(\right)\right), \left(\frac{\color{blue}{1}}{180}\right)\right) \]
                  5. div0N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\tan^{-1} 0, \mathsf{PI}\left(\right)\right), \left(\frac{1}{180}\right)\right) \]
                  6. atan-lowering-atan.f64N/A

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(0\right), \mathsf{PI.f64}\left(\right)\right), \left(\frac{1}{180}\right)\right) \]
                  8. metadata-eval29.7%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(0\right), \mathsf{PI.f64}\left(\right)\right), \frac{1}{180}\right) \]
                11. Applied egg-rr29.7%

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

                if 2.14999999999999995e-144 < B

                1. Initial program 57.9%

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

                  \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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. Simplified57.7%

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.8 \cdot 10^{-117}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 2.15 \cdot 10^{-144}:\\ \;\;\;\;\frac{\frac{\tan^{-1} 0}{\pi}}{0.005555555555555556}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                9. Add Preprocessing

                Alternative 22: 54.0% accurate, 3.7× speedup?

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

                  1. Initial program 68.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. Simplified84.3%

                    \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \color{blue}{B}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. Simplified57.9%

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

                    if 1.34999999999999999e-152 < C

                    1. Initial program 30.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 C around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C}\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(\left(B \cdot \frac{-1}{2}\right), C\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(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
                      9. PI-lowering-PI.f6461.7%

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

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

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

                  Alternative 23: 54.0% accurate, 3.7× speedup?

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

                    1. Initial program 68.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. Simplified84.3%

                      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \color{blue}{B}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                    6. Step-by-step derivation
                      1. Simplified57.9%

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

                      if 1.82000000000000009e-152 < C

                      1. Initial program 30.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. Simplified53.8%

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

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

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

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

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

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
                        6. associate--r+N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
                        7. --lowering--.f64N/A

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

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\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), B\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
                        9. hypot-defineN/A

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

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

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

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(C, A\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(C, A\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
                        13. PI-lowering-PI.f6458.5%

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

                        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}} \]
                      7. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
                      8. 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 - A}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
                        2. /-lowering-/.f64N/A

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

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

                        \[\leadsto \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \frac{B}{C - A}\right)}}{\frac{\pi}{180}} \]
                      10. 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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
                      11. 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}\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
                        2. /-lowering-/.f64N/A

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

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

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

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

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

                    Alternative 24: 54.0% accurate, 3.7× speedup?

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

                      1. Initial program 68.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. Simplified84.3%

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \color{blue}{B}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                      6. Step-by-step derivation
                        1. Simplified57.9%

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

                        if 1.39999999999999992e-152 < C

                        1. Initial program 30.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 C around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 25: 51.1% accurate, 3.7× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -6.8 \cdot 10^{-146}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \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 -6.8e-146)
                         (* (/ 180.0 PI) (atan 1.0))
                         (* (/ 180.0 PI) (atan (/ (- C B) B)))))
                      double code(double A, double B, double C) {
                      	double tmp;
                      	if (B <= -6.8e-146) {
                      		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
                      	} 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 <= -6.8e-146) {
                      		tmp = (180.0 / Math.PI) * Math.atan(1.0);
                      	} else {
                      		tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
                      	}
                      	return tmp;
                      }
                      
                      def code(A, B, C):
                      	tmp = 0
                      	if B <= -6.8e-146:
                      		tmp = (180.0 / math.pi) * math.atan(1.0)
                      	else:
                      		tmp = (180.0 / math.pi) * math.atan(((C - B) / B))
                      	return tmp
                      
                      function code(A, B, C)
                      	tmp = 0.0
                      	if (B <= -6.8e-146)
                      		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
                      	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 <= -6.8e-146)
                      		tmp = (180.0 / pi) * atan(1.0);
                      	else
                      		tmp = (180.0 / pi) * atan(((C - B) / B));
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[A_, B_, C_] := If[LessEqual[B, -6.8e-146], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $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 -6.8 \cdot 10^{-146}:\\
                      \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
                      
                      \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 < -6.8000000000000001e-146

                        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. Simplified71.5%

                          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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. Simplified50.3%

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

                          if -6.8000000000000001e-146 < B

                          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. 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. Simplified73.0%

                            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \color{blue}{B}\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                          6. Step-by-step derivation
                            1. Simplified59.0%

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.8 \cdot 10^{-146}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \end{array} \]
                          9. Add Preprocessing

                          Alternative 26: 39.7% 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 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. Simplified70.4%

                              \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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. Simplified40.7%

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

                              if -4.999999999999985e-310 < B

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

                                \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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. Simplified45.9%

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

                                \[\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 27: 20.6% 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 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. Simplified72.5%

                                \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\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. Simplified23.5%

                                  \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
                                2. Final simplification23.5%

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

                                Reproduce

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