ABCF->ab-angle angle

Percentage Accurate: 54.3% → 88.7%
Time: 17.4s
Alternatives: 20
Speedup: 3.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 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)\\ \mathbf{if}\;t\_0 \leq -0.5:\\ \;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{0.005555555555555556}}{\pi}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{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
 (let* ((t_0
         (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
   (if (<= t_0 -0.5)
     (/ (/ (atan (/ (- (- C A) (hypot (- C A) B)) B)) 0.005555555555555556) PI)
     (if (<= t_0 0.0)
       (/ (atan (/ (* B -0.5) (- 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 t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
	double tmp;
	if (t_0 <= -0.5) {
		tmp = (atan((((C - A) - hypot((C - A), B)) / B)) / 0.005555555555555556) / ((double) M_PI);
	} else if (t_0 <= 0.0) {
		tmp = atan(((B * -0.5) / (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 t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
	double tmp;
	if (t_0 <= -0.5) {
		tmp = (Math.atan((((C - A) - Math.hypot((C - A), B)) / B)) / 0.005555555555555556) / Math.PI;
	} else if (t_0 <= 0.0) {
		tmp = Math.atan(((B * -0.5) / (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):
	t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0))))
	tmp = 0
	if t_0 <= -0.5:
		tmp = (math.atan((((C - A) - math.hypot((C - A), B)) / B)) / 0.005555555555555556) / math.pi
	elif t_0 <= 0.0:
		tmp = math.atan(((B * -0.5) / (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)
	t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))
	tmp = 0.0
	if (t_0 <= -0.5)
		tmp = Float64(Float64(atan(Float64(Float64(Float64(C - A) - hypot(Float64(C - A), B)) / B)) / 0.005555555555555556) / pi);
	elseif (t_0 <= 0.0)
		tmp = Float64(atan(Float64(Float64(B * -0.5) / 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)
	t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0))));
	tmp = 0.0;
	if (t_0 <= -0.5)
		tmp = (atan((((C - A) - hypot((C - A), B)) / B)) / 0.005555555555555556) / pi;
	elseif (t_0 <= 0.0)
		tmp = atan(((B * -0.5) / (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_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -0.5], N[(N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(C - A), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / 0.005555555555555556), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $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}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_0 \leq -0.5:\\
\;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{0.005555555555555556}}{\pi}\\

\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{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 3 regimes
  2. if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.5

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

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

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

        \[\leadsto \frac{1 \cdot \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}}} \]
      4. div-invN/A

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{PI.f64}\left(\right)\right), \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{1}{180}\right)}\right)\right) \]
    6. Applied egg-rr84.9%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right)}{\frac{1}{180}}\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
    8. Applied egg-rr84.9%

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

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

    1. Initial program 22.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. Simplified15.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. accelerator-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) \]
      10. --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) \]
      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6422.2%

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

      \[\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. associate-*r/N/A

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

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

      \[\leadsto \frac{\tan^{-1} \color{blue}{\left(\frac{B \cdot -0.5}{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 60.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. Simplified83.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. accelerator-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) \]
      10. --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) \]
      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6489.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-rr89.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}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 2: 79.3% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -2.0999999999999999e-14

    1. Initial program 83.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. Simplified94.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

    if -2.0999999999999999e-14 < C < 4.9999999999999998e30

    1. Initial program 50.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. Simplified71.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. accelerator-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) \]
      10. --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) \]
      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6482.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-rr82.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 C around 0

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\sqrt{{A}^{2} + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\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(0, \mathsf{+.f64}\left(A, \left(\sqrt{A \cdot A + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      6. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(A, B\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    9. Simplified82.4%

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

    if 4.9999999999999998e30 < C

    1. Initial program 18.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. Simplified50.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. accelerator-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) \]
      10. --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) \]
      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6453.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-rr53.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. associate-*r/N/A

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

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

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

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

Alternative 3: 78.6% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 84.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. Simplified95.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 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. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{B \cdot B + {C}^{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{B \cdot B + C \cdot C}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. accelerator-lowering-hypot.f6494.8%

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

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

    if -2.5e5 < C < 2.59999999999999988e30

    1. Initial program 50.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. Simplified71.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. 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. accelerator-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) \]
      10. --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) \]
      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6481.9%

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

      \[\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 0

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(A, \left(\sqrt{{A}^{2} + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\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(0, \mathsf{+.f64}\left(A, \left(\sqrt{A \cdot A + {B}^{2}}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      6. unpow2N/A

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

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

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

    if 2.59999999999999988e30 < C

    1. Initial program 18.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. Simplified50.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. accelerator-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) \]
      10. --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) \]
      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6453.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-rr53.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. associate-*r/N/A

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

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

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

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

Alternative 4: 76.2% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 22.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. Simplified30.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. accelerator-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) \]
      10. --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) \]
      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. 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. associate-*r/N/A

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

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

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

    if -9.99999999999999983e72 < A < 1.46e40

    1. Initial program 52.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. Simplified80.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. 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. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{B \cdot B + {C}^{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{B \cdot B + C \cdot C}\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. accelerator-lowering-hypot.f6478.0%

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

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

    if 1.46e40 < A

    1. Initial program 81.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. Simplified94.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}{\left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
    6. Step-by-step derivation
      1. associate--l+N/A

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

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

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

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

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

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

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

Alternative 5: 81.7% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 1.75e28

    1. Initial program 63.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.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. 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. accelerator-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) \]
      10. --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) \]
      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6487.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-rr87.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}}} \]

    if 1.75e28 < C

    1. Initial program 18.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. Simplified50.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. accelerator-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) \]
      10. --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) \]
      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6453.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-rr53.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. associate-*r/N/A

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

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

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

Alternative 6: 77.1% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 2.40000000000000005e26

    1. Initial program 63.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.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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{+.f64}\left(A, \left(\sqrt{{B}^{2} + {A}^{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{B \cdot B + {A}^{2}}\right)\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, \mathsf{+.f64}\left(A, \left(\sqrt{B \cdot B + A \cdot A}\right)\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. accelerator-lowering-hypot.f6480.1%

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

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

    if 2.40000000000000005e26 < C

    1. Initial program 18.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. Simplified50.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. accelerator-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) \]
      10. --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) \]
      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6453.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-rr53.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. associate-*r/N/A

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

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

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

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

Alternative 7: 54.1% accurate, 3.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \mathbf{if}\;B \leq -9 \cdot 10^{-139}:\\ \;\;\;\;\frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\frac{\pi}{180}}\\ \mathbf{elif}\;B \leq -6.5 \cdot 10^{-204}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 3.9 \cdot 10^{-203}:\\ \;\;\;\;\frac{\frac{\tan^{-1} 0}{\pi}}{0.005555555555555556}\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-134}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \end{array} \end{array} \]
(FPCore (A B C)
 :precision binary64
 (let* ((t_0 (* (/ 180.0 PI) (atan (/ (* A -2.0) B)))))
   (if (<= B -9e-139)
     (/ (atan (+ 1.0 (/ C B))) (/ PI 180.0))
     (if (<= B -6.5e-204)
       t_0
       (if (<= B 3.9e-203)
         (/ (/ (atan 0.0) PI) 0.005555555555555556)
         (if (<= B 4.8e-134) t_0 (* (/ 180.0 PI) (atan (/ (- C B) B)))))))))
double code(double A, double B, double C) {
	double t_0 = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
	double tmp;
	if (B <= -9e-139) {
		tmp = atan((1.0 + (C / B))) / (((double) M_PI) / 180.0);
	} else if (B <= -6.5e-204) {
		tmp = t_0;
	} else if (B <= 3.9e-203) {
		tmp = (atan(0.0) / ((double) M_PI)) / 0.005555555555555556;
	} else if (B <= 4.8e-134) {
		tmp = t_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 t_0 = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
	double tmp;
	if (B <= -9e-139) {
		tmp = Math.atan((1.0 + (C / B))) / (Math.PI / 180.0);
	} else if (B <= -6.5e-204) {
		tmp = t_0;
	} else if (B <= 3.9e-203) {
		tmp = (Math.atan(0.0) / Math.PI) / 0.005555555555555556;
	} else if (B <= 4.8e-134) {
		tmp = t_0;
	} else {
		tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
	}
	return tmp;
}
def code(A, B, C):
	t_0 = (180.0 / math.pi) * math.atan(((A * -2.0) / B))
	tmp = 0
	if B <= -9e-139:
		tmp = math.atan((1.0 + (C / B))) / (math.pi / 180.0)
	elif B <= -6.5e-204:
		tmp = t_0
	elif B <= 3.9e-203:
		tmp = (math.atan(0.0) / math.pi) / 0.005555555555555556
	elif B <= 4.8e-134:
		tmp = t_0
	else:
		tmp = (180.0 / math.pi) * math.atan(((C - B) / B))
	return tmp
function code(A, B, C)
	t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B)))
	tmp = 0.0
	if (B <= -9e-139)
		tmp = Float64(atan(Float64(1.0 + Float64(C / B))) / Float64(pi / 180.0));
	elseif (B <= -6.5e-204)
		tmp = t_0;
	elseif (B <= 3.9e-203)
		tmp = Float64(Float64(atan(0.0) / pi) / 0.005555555555555556);
	elseif (B <= 4.8e-134)
		tmp = t_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)
	t_0 = (180.0 / pi) * atan(((A * -2.0) / B));
	tmp = 0.0;
	if (B <= -9e-139)
		tmp = atan((1.0 + (C / B))) / (pi / 180.0);
	elseif (B <= -6.5e-204)
		tmp = t_0;
	elseif (B <= 3.9e-203)
		tmp = (atan(0.0) / pi) / 0.005555555555555556;
	elseif (B <= 4.8e-134)
		tmp = t_0;
	else
		tmp = (180.0 / pi) * atan(((C - B) / B));
	end
	tmp_2 = tmp;
end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9e-139], N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.5e-204], t$95$0, If[LessEqual[B, 3.9e-203], N[(N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision] / 0.005555555555555556), $MachinePrecision], If[LessEqual[B, 4.8e-134], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;B \leq -6.5 \cdot 10^{-204}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;B \leq 3.9 \cdot 10^{-203}:\\
\;\;\;\;\frac{\frac{\tan^{-1} 0}{\pi}}{0.005555555555555556}\\

\mathbf{elif}\;B \leq 4.8 \cdot 10^{-134}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < -9.00000000000000046e-139

    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. 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. 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. accelerator-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) \]
      10. --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) \]
      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6481.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-rr81.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 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. accelerator-lowering-hypot.f6472.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(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    9. Simplified72.8%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(C, B\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    12. Simplified70.7%

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

    if -9.00000000000000046e-139 < B < -6.49999999999999939e-204 or 3.8999999999999999e-203 < B < 4.80000000000000019e-134

    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. Simplified72.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. Taylor expanded in A around inf

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

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

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

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

    if -6.49999999999999939e-204 < B < 3.8999999999999999e-203

    1. Initial program 45.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. Simplified60.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. accelerator-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) \]
      10. --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) \]
      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
      12. PI-lowering-PI.f6479.6%

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

      \[\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-/.f6447.3%

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

      \[\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. metadata-evalN/A

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

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

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

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

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

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

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

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

    if 4.80000000000000019e-134 < B

    1. Initial program 42.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. Simplified72.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 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. Simplified65.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -9 \cdot 10^{-139}:\\ \;\;\;\;\frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\frac{\pi}{180}}\\ \mathbf{elif}\;B \leq -6.5 \cdot 10^{-204}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \mathbf{elif}\;B \leq 3.9 \cdot 10^{-203}:\\ \;\;\;\;\frac{\frac{\tan^{-1} 0}{\pi}}{0.005555555555555556}\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-134}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 8: 57.6% accurate, 3.4× speedup?

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

      1. Initial program 58.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.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. accelerator-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) \]
        10. --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) \]
        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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
        12. PI-lowering-PI.f6482.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-rr82.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. accelerator-lowering-hypot.f6475.6%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), B\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      9. Simplified75.6%

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

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

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

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

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

      if -3.6000000000000001e-99 < B < 2.80000000000000022e-203

      1. Initial program 49.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. 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. Taylor expanded in B around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.80000000000000022e-203 < B < 1.55000000000000008e-133

      1. Initial program 77.8%

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
      3. Simplified77.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. Taylor expanded in A around inf

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, A\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. Simplified75.9%

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

      if 1.55000000000000008e-133 < B

      1. Initial program 42.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. Simplified72.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 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. Simplified65.5%

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

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

      Alternative 9: 54.7% accurate, 3.4× speedup?

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

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

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

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

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

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

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

        if -1.08e135 < A < 1.35000000000000005e-52

        1. Initial program 50.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.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. Simplified49.8%

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

          if 1.35000000000000005e-52 < A < 4.49999999999999996e39

          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. 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. mul-1-negN/A

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\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) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\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) \]
            6. mul0-lftN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. 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) \]
            8. /-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) \]
            9. 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) \]
            10. /-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) \]
            11. *-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) \]
            12. *-lowering-*.f6462.3%

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

            \[\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. div-invN/A

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

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

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

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

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

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

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

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

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

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

              \[\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(180, \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
            13. PI-lowering-PI.f6462.5%

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

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

          if 4.49999999999999996e39 < A

          1. Initial program 81.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. Simplified94.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 inf

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.08 \cdot 10^{+135}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\ \mathbf{elif}\;A \leq 1.35 \cdot 10^{-52}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{elif}\;A \leq 4.5 \cdot 10^{+39}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 10: 42.7% accurate, 3.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -2.9 \cdot 10^{-105}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-119}:\\ \;\;\;\;\frac{\frac{\tan^{-1} 0}{\pi}}{0.005555555555555556}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{+129}:\\ \;\;\;\;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.9e-105)
           (* (/ 180.0 PI) (atan 1.0))
           (if (<= B 5e-119)
             (/ (/ (atan 0.0) PI) 0.005555555555555556)
             (if (<= B 2.7e+129)
               (* 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.9e-105) {
        		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
        	} else if (B <= 5e-119) {
        		tmp = (atan(0.0) / ((double) M_PI)) / 0.005555555555555556;
        	} else if (B <= 2.7e+129) {
        		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.9e-105) {
        		tmp = (180.0 / Math.PI) * Math.atan(1.0);
        	} else if (B <= 5e-119) {
        		tmp = (Math.atan(0.0) / Math.PI) / 0.005555555555555556;
        	} else if (B <= 2.7e+129) {
        		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.9e-105:
        		tmp = (180.0 / math.pi) * math.atan(1.0)
        	elif B <= 5e-119:
        		tmp = (math.atan(0.0) / math.pi) / 0.005555555555555556
        	elif B <= 2.7e+129:
        		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.9e-105)
        		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
        	elseif (B <= 5e-119)
        		tmp = Float64(Float64(atan(0.0) / pi) / 0.005555555555555556);
        	elseif (B <= 2.7e+129)
        		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.9e-105)
        		tmp = (180.0 / pi) * atan(1.0);
        	elseif (B <= 5e-119)
        		tmp = (atan(0.0) / pi) / 0.005555555555555556;
        	elseif (B <= 2.7e+129)
        		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.9e-105], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-119], N[(N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision] / 0.005555555555555556), $MachinePrecision], If[LessEqual[B, 2.7e+129], 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.9 \cdot 10^{-105}:\\
        \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
        
        \mathbf{elif}\;B \leq 5 \cdot 10^{-119}:\\
        \;\;\;\;\frac{\frac{\tan^{-1} 0}{\pi}}{0.005555555555555556}\\
        
        \mathbf{elif}\;B \leq 2.7 \cdot 10^{+129}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if B < -2.90000000000000003e-105

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

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

            if -2.90000000000000003e-105 < B < 4.99999999999999993e-119

            1. Initial program 55.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. Simplified64.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. 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. accelerator-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) \]
              10. --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) \]
              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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
              12. PI-lowering-PI.f6481.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-rr81.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 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-/.f6436.2%

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

              \[\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. metadata-evalN/A

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

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

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

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

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

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

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

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

            if 4.99999999999999993e-119 < B < 2.7000000000000001e129

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

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

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

            if 2.7000000000000001e129 < B

            1. Initial program 21.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. Simplified87.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 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. Simplified85.8%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.9 \cdot 10^{-105}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-119}:\\ \;\;\;\;\frac{\frac{\tan^{-1} 0}{\pi}}{0.005555555555555556}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{+129}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
            9. Add Preprocessing

            Alternative 11: 65.7% accurate, 3.5× speedup?

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

              1. Initial program 59.2%

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
              3. Simplified78.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. accelerator-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) \]
                10. --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) \]
                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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
                12. 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. Taylor expanded in B around -inf

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

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

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

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

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

              if -5.2000000000000001e-199 < B < 3.80000000000000025e-203

              1. Initial program 44.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. 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. accelerator-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) \]
                10. --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) \]
                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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
                12. PI-lowering-PI.f6478.1%

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

                \[\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. associate-*r/N/A

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

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

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

              if 3.80000000000000025e-203 < B

              1. Initial program 47.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. Simplified73.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}{\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. sub-negN/A

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.2 \cdot 10^{-199}:\\ \;\;\;\;\frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\frac{\pi}{180}}\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-203}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{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 12: 65.7% accurate, 3.5× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{C - A}{B}\\ \mathbf{if}\;B \leq -1.3 \cdot 10^{-197}:\\ \;\;\;\;\frac{\tan^{-1} \left(1 + t\_0\right)}{\frac{\pi}{180}}\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-202}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A - C}\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 -1.3e-197)
                 (/ (atan (+ 1.0 t_0)) (/ PI 180.0))
                 (if (<= B 1.25e-202)
                   (* (/ 180.0 PI) (atan (* B (/ 0.5 (- A C)))))
                   (* (/ 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.3e-197) {
            		tmp = atan((1.0 + t_0)) / (((double) M_PI) / 180.0);
            	} else if (B <= 1.25e-202) {
            		tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / (A - C))));
            	} 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.3e-197) {
            		tmp = Math.atan((1.0 + t_0)) / (Math.PI / 180.0);
            	} else if (B <= 1.25e-202) {
            		tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / (A - C))));
            	} 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.3e-197:
            		tmp = math.atan((1.0 + t_0)) / (math.pi / 180.0)
            	elif B <= 1.25e-202:
            		tmp = (180.0 / math.pi) * math.atan((B * (0.5 / (A - C))))
            	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.3e-197)
            		tmp = Float64(atan(Float64(1.0 + t_0)) / Float64(pi / 180.0));
            	elseif (B <= 1.25e-202)
            		tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / Float64(A - C)))));
            	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.3e-197)
            		tmp = atan((1.0 + t_0)) / (pi / 180.0);
            	elseif (B <= 1.25e-202)
            		tmp = (180.0 / pi) * atan((B * (0.5 / (A - C))));
            	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.3e-197], N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.25e-202], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $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 -1.3 \cdot 10^{-197}:\\
            \;\;\;\;\frac{\tan^{-1} \left(1 + t\_0\right)}{\frac{\pi}{180}}\\
            
            \mathbf{elif}\;B \leq 1.25 \cdot 10^{-202}:\\
            \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A - C}\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 < -1.3000000000000001e-197

              1. Initial program 59.2%

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
              3. Simplified78.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. accelerator-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) \]
                10. --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) \]
                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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
                12. 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. Taylor expanded in B around -inf

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

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

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

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

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

              if -1.3000000000000001e-197 < B < 1.24999999999999993e-202

              1. Initial program 44.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. 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. Taylor expanded in B around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 1.24999999999999993e-202 < B

              1. Initial program 47.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. Simplified73.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}{\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. sub-negN/A

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

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

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

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

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

            Alternative 13: 65.7% accurate, 3.5× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{C - A}{B}\\ \mathbf{if}\;B \leq -1.14 \cdot 10^{-201}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + t\_0\right)\\ \mathbf{elif}\;B \leq 1.65 \cdot 10^{-203}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A - C}\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 -1.14e-201)
                 (* (/ 180.0 PI) (atan (+ 1.0 t_0)))
                 (if (<= B 1.65e-203)
                   (* (/ 180.0 PI) (atan (* B (/ 0.5 (- A C)))))
                   (* (/ 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.14e-201) {
            		tmp = (180.0 / ((double) M_PI)) * atan((1.0 + t_0));
            	} else if (B <= 1.65e-203) {
            		tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / (A - C))));
            	} 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.14e-201) {
            		tmp = (180.0 / Math.PI) * Math.atan((1.0 + t_0));
            	} else if (B <= 1.65e-203) {
            		tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / (A - C))));
            	} 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.14e-201:
            		tmp = (180.0 / math.pi) * math.atan((1.0 + t_0))
            	elif B <= 1.65e-203:
            		tmp = (180.0 / math.pi) * math.atan((B * (0.5 / (A - C))))
            	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.14e-201)
            		tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + t_0)));
            	elseif (B <= 1.65e-203)
            		tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / Float64(A - C)))));
            	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.14e-201)
            		tmp = (180.0 / pi) * atan((1.0 + t_0));
            	elseif (B <= 1.65e-203)
            		tmp = (180.0 / pi) * atan((B * (0.5 / (A - C))));
            	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.14e-201], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.65e-203], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $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 -1.14 \cdot 10^{-201}:\\
            \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + t\_0\right)\\
            
            \mathbf{elif}\;B \leq 1.65 \cdot 10^{-203}:\\
            \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A - C}\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 < -1.1400000000000001e-201

              1. Initial program 59.2%

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
              3. Simplified78.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. Taylor expanded in B around -inf

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

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

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

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

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

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

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

              if -1.1400000000000001e-201 < B < 1.65000000000000012e-203

              1. Initial program 44.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. 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. Taylor expanded in B around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 1.65000000000000012e-203 < B

              1. Initial program 47.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. Simplified73.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}{\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. sub-negN/A

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

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

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

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

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

            Alternative 14: 49.3% accurate, 3.5× speedup?

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

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

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

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

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

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

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

              if -8.19999999999999995e-228 < A < 9.3999999999999998e39

              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. 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. mul-1-negN/A

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

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\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) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\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) \]
                6. mul0-lftN/A

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                7. 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) \]
                8. /-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) \]
                9. 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) \]
                10. /-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) \]
                11. *-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) \]
                12. *-lowering-*.f6437.5%

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

                \[\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. div-invN/A

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

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

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

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

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

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

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

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

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

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

                  \[\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(180, \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                13. PI-lowering-PI.f6437.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(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. Applied egg-rr37.7%

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

              if 9.3999999999999998e39 < A

              1. Initial program 81.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. Simplified94.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 inf

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

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

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

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

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

            Alternative 15: 48.4% accurate, 3.5× speedup?

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

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

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

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

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

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

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

              if -4.2000000000000002e-94 < A < 2.0000000000000001e-127

              1. Initial program 49.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.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. 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. Simplified31.0%

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

                if 2.0000000000000001e-127 < A

                1. Initial program 76.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. Simplified90.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 inf

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

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

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

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

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

              Alternative 16: 48.4% accurate, 3.5× speedup?

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

                1. Initial program 28.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 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-*.f6457.9%

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

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

                if -1.25000000000000003e-92 < A < 4.10000000000000007e-132

                1. Initial program 49.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.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. 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. Simplified31.0%

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

                  if 4.10000000000000007e-132 < A

                  1. Initial program 76.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. Simplified90.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 inf

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

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

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

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

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

                Alternative 17: 63.0% accurate, 3.6× speedup?

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

                  1. Initial program 63.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.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 -inf

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

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

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

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

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

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

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

                  if 2.50000000000000012e25 < C

                  1. Initial program 18.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. Simplified50.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(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 18: 43.3% accurate, 3.6× speedup?

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

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

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

                    if -1.35000000000000005e-103 < B < 7.80000000000000019e-129

                    1. Initial program 53.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. Simplified63.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. accelerator-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) \]
                      10. --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) \]
                      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), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
                      12. PI-lowering-PI.f6480.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-rr80.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 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-/.f6437.4%

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

                      \[\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. metadata-evalN/A

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

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

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

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

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

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

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

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

                    if 7.80000000000000019e-129 < B

                    1. Initial program 42.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. Simplified72.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 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. Simplified51.2%

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

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

                    Alternative 19: 38.9% accurate, 3.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -9.8 \cdot 10^{-269}:\\ \;\;\;\;\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 -9.8e-269)
                       (* (/ 180.0 PI) (atan 1.0))
                       (* (/ 180.0 PI) (atan -1.0))))
                    double code(double A, double B, double C) {
                    	double tmp;
                    	if (B <= -9.8e-269) {
                    		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 <= -9.8e-269) {
                    		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 <= -9.8e-269:
                    		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 <= -9.8e-269)
                    		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 <= -9.8e-269)
                    		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, -9.8e-269], 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 -9.8 \cdot 10^{-269}:\\
                    \;\;\;\;\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 < -9.79999999999999999e-269

                      1. Initial program 57.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. Simplified74.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. Simplified37.1%

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

                        if -9.79999999999999999e-269 < B

                        1. Initial program 45.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.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(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                        6. Step-by-step derivation
                          1. Simplified37.7%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -9.8 \cdot 10^{-269}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                        9. Add Preprocessing

                        Alternative 20: 20.1% 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 51.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. Simplified72.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 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. Simplified20.0%

                            \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
                          2. Final simplification20.0%

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

                          Reproduce

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