ABCF->ab-angle angle

Percentage Accurate: 54.5% → 85.4%
Time: 17.9s
Alternatives: 18
Speedup: 3.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 85.4% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 65.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. Simplified87.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

    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 15.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. Simplified10.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 0

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

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

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

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

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

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

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

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

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

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

Alternative 2: 79.8% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 11.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. Simplified22.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 0

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

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

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

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

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

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

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

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

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

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

    if -7.5999999999999996e122 < A < 2.09999999999999993e-114

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

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

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

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

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

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

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

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

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

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

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

    if 2.09999999999999993e-114 < A

    1. Initial program 73.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. Simplified91.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 C around 0

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

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

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

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

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

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

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

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

Alternative 3: 75.9% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 11.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. Simplified22.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 0

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999978e122 < A < 8.4000000000000006e-55

    1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

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

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

    if 8.4000000000000006e-55 < A

    1. Initial program 75.8%

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\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--.f6482.2%

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

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

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

Alternative 4: 64.9% accurate, 3.0× speedup?

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

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

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

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


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

    1. Initial program 62.9%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
    3. Simplified79.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--.f6472.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. Simplified72.7%

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

    if 8.9999999999999992e-189 < B < 1.2499999999999999e-97

    1. Initial program 37.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.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 0

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

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

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

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

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

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

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

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

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

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

    if 1.2499999999999999e-97 < B

    1. Initial program 56.8%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      11. pow2N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \mathsf{hypot.f64}\left(B, \left(A - C\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      16. --lowering--.f6481.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(180, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{atan.f64}\left(\left(\frac{C}{B} - \frac{\sqrt{B \cdot B + C \cdot C}}{B}\right)\right)\right)\right) \]
      7. sub-divN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 64.9% accurate, 3.3× speedup?

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

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

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

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


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

    1. Initial program 62.9%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
    3. Simplified79.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--.f6472.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. Simplified72.7%

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

    if 9.499999999999999e-189 < B < 1.15999999999999994e-98

    1. Initial program 37.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.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 0

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

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

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

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

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

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

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

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

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

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

    if 1.15999999999999994e-98 < B

    1. Initial program 56.8%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      11. pow2N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \mathsf{hypot.f64}\left(B, \left(A - C\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      16. --lowering--.f6481.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(180, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{atan.f64}\left(\left(\frac{C}{B} - \frac{\sqrt{B \cdot B + C \cdot C}}{B}\right)\right)\right)\right) \]
      7. sub-divN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 63.0% accurate, 3.3× speedup?

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

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

\mathbf{elif}\;A \leq 1.05 \cdot 10^{-261}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{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 4 regimes
  2. if A < -4.5000000000000002e-27

    1. Initial program 25.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. Simplified43.7%

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

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

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

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

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

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

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

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

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

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

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

    if -4.5000000000000002e-27 < A < -2.8000000000000002e-168

    1. Initial program 77.4%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      11. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000002e-168 < A < 1.04999999999999998e-261

    1. Initial program 52.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. Simplified88.2%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\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. Simplified61.0%

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

      if 1.04999999999999998e-261 < A

      1. Initial program 74.0%

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\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--.f6476.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. Simplified76.1%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.5 \cdot 10^{-27}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\ \mathbf{elif}\;A \leq -2.8 \cdot 10^{-168}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.05 \cdot 10^{-261}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 7: 63.0% accurate, 3.3× speedup?

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

      1. Initial program 25.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. Simplified43.7%

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

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

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

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

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

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

      if -1.09999999999999993e-27 < A < -2.0000000000000001e-172

      1. Initial program 77.4%

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        9. neg-sub0N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        11. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.0000000000000001e-172 < A < 9.99999999999999984e-262

      1. Initial program 52.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. Simplified88.2%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\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. Simplified61.0%

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

        if 9.99999999999999984e-262 < A

        1. Initial program 74.0%

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\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--.f6476.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. Simplified76.1%

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

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

      Alternative 8: 60.6% accurate, 3.4× speedup?

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

        1. Initial program 25.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. Simplified43.7%

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

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

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

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

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

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

        if -6.00000000000000005e-28 < A < -2.79999999999999985e-183

        1. Initial program 77.4%

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          9. neg-sub0N/A

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          11. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -2.79999999999999985e-183 < A < 1.65e-189

        1. Initial program 61.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. Simplified89.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. Simplified60.5%

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

          if 1.65e-189 < A

          1. Initial program 72.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. Simplified90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -6 \cdot 10^{-28}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\ \mathbf{elif}\;A \leq -2.8 \cdot 10^{-183}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;A \leq 1.65 \cdot 10^{-189}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 9: 58.9% accurate, 3.4× speedup?

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

          1. Initial program 23.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. Simplified43.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-*.f6463.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. Simplified63.2%

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

          if -3.3e6 < A < -2.8000000000000001e-164

          1. Initial program 70.8%

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. neg-sub0N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            11. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -2.8000000000000001e-164 < A < 1.95000000000000012e-189

          1. Initial program 61.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. Simplified89.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. Simplified60.5%

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

            if 1.95000000000000012e-189 < A

            1. Initial program 72.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. Simplified90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 10: 58.6% accurate, 3.5× speedup?

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

            1. Initial program 80.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. Add Preprocessing
            3. Step-by-step derivation
              1. sub-negN/A

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              9. neg-sub0N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              11. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -9.00000000000000064e40 < C < 7.19999999999999975e55

            1. Initial program 62.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 7.19999999999999975e55 < C

            1. Initial program 23.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. Simplified57.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 B around 0

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 11: 59.5% accurate, 3.5× speedup?

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

            1. Initial program 23.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. Simplified43.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-*.f6463.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. Simplified63.2%

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

            if -7.8e8 < A < 6.80000000000000023e-109

            1. Initial program 65.6%

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

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              9. neg-sub0N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              11. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 6.80000000000000023e-109 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 59.5% accurate, 3.5× speedup?

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

            1. Initial program 23.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-*.f6463.2%

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

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

            if -2.25e8 < A < 9.2000000000000006e-109

            1. Initial program 65.6%

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

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              9. neg-sub0N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              11. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 9.2000000000000006e-109 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 13: 52.6% accurate, 3.5× speedup?

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

            1. Initial program 62.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. Step-by-step derivation
              1. sub-negN/A

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              9. neg-sub0N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              11. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 3.1e-168 < B < 7e19

            1. Initial program 53.3%

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

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

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

            if 7e19 < B

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.1 \cdot 10^{-168}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 7 \cdot 10^{+19}:\\ \;\;\;\;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 14: 47.7% accurate, 3.6× speedup?

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

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

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

                if -5.8000000000000004e-85 < B < 5.29999999999999989e-108

                1. Initial program 66.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. Simplified75.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. Simplified43.5%

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

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

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

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

                  if 5.29999999999999989e-108 < B

                  1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

                  Alternative 15: 44.8% accurate, 3.6× speedup?

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

                    1. Initial program 58.7%

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

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

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

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

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

                      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{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. Simplified52.6%

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

                      if -1.1e-175 < B < 1.3499999999999999e-98

                      1. Initial program 61.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. Step-by-step derivation
                        1. sub-negN/A

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        9. neg-sub0N/A

                          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        11. pow2N/A

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(0 \cdot \frac{C}{B}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        3. mul0-lft29.5%

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

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

                      if 1.3499999999999999e-98 < B

                      1. Initial program 56.8%

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

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

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

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

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

                        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right) \cdot \frac{180}{\pi}} \]
                      4. Add Preprocessing
                      5. 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. Simplified52.7%

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

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

                      Alternative 16: 52.3% accurate, 3.7× speedup?

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

                        1. Initial program 61.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. Step-by-step derivation
                          1. sub-negN/A

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          9. neg-sub0N/A

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          11. pow2N/A

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                        4. Applied egg-rr72.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.8999999999999999e-105 < B

                        1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

                        Alternative 17: 29.4% accurate, 3.8× speedup?

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

                          1. Initial program 59.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. Add Preprocessing
                          3. Step-by-step derivation
                            1. sub-negN/A

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                            9. neg-sub0N/A

                              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                            11. pow2N/A

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(0 \cdot \frac{C}{B}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                            3. mul0-lft15.6%

                              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(0\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                          7. Simplified15.6%

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

                          if 6.29999999999999992e-99 < B

                          1. Initial program 56.8%

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

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

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

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

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

                            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right) \cdot \frac{180}{\pi}} \]
                          4. Add Preprocessing
                          5. 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. Simplified52.7%

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

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

                          Alternative 18: 12.9% accurate, 4.0× speedup?

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\left(\frac{1}{B}\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(\mathsf{neg}\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                            9. neg-sub0N/A

                              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \left(0 - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\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{fma.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(C, A\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{\_.f64}\left(0, \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                            11. pow2N/A

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(0 \cdot \frac{C}{B}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                            3. mul0-lft11.9%

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

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

                          Reproduce

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