ABCF->ab-angle angle

Percentage Accurate: 55.8% → 81.5%
Time: 23.0s
Alternatives: 25
Speedup: 3.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 25 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: 55.8% 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: 81.5% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -9.50000000000000007e-52

    1. Initial program 24.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. Simplified54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000007e-52 < A

    1. Initial program 69.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. Simplified84.9%

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

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

Alternative 2: 78.2% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -3.40000000000000003e-51

    1. Initial program 24.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. Simplified54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.40000000000000003e-51 < A < 3.6000000000000002e30

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

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

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

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

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

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

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

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

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

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

    if 3.6000000000000002e30 < A

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right), B\right)\right)\right)\right) \]
    6. Applied egg-rr94.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{\color{blue}{0 - \left(A + \mathsf{hypot}\left(A, B\right)\right)}}{B}\right)}} \]
    10. Step-by-step derivation
      1. sub0-negN/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(A, \left(\mathsf{hypot}\left(A, B\right)\right)\right), B\right)\right)\right)\right)\right) \]
      7. hypot-lowering-hypot.f6490.2%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(A, B\right)\right), B\right)\right)\right)\right)\right) \]
    11. Applied egg-rr90.2%

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

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

Alternative 3: 78.2% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -2.24999999999999981e-50

    1. Initial program 24.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. Simplified54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.24999999999999981e-50 < A < 3.6000000000000002e30

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

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

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

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

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

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

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

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

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

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

    if 3.6000000000000002e30 < A

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}\right), B\right)\right)\right)\right) \]
    6. Applied egg-rr94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{0 - \left(A + \sqrt{A \cdot A + B \cdot B}\right)}{B}\right)\right), \left(\frac{\color{blue}{\mathsf{PI}\left(\right)}}{180}\right)\right) \]
      4. frac-2negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\mathsf{neg}\left(\left(0 - \left(A + \sqrt{A \cdot A + B \cdot B}\right)\right)\right)}{\mathsf{neg}\left(B\right)}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      5. sub0-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(A + \sqrt{A \cdot A + B \cdot B}\right)\right)\right)\right)}{\mathsf{neg}\left(B\right)}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
      6. remove-double-negN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(A, B\right)\right), \mathsf{\_.f64}\left(0, B\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
    11. Applied egg-rr90.2%

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

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

Alternative 4: 78.1% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 24.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. Simplified54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0999999999999999e-52 < A < 7.2000000000000004e30

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

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

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

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

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

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

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

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

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

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

    if 7.2000000000000004e30 < A

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 76.0% accurate, 1.9× speedup?

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

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

\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 < -2.40000000000000002e-50

    1. Initial program 24.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. Simplified54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.40000000000000002e-50 < A < 6.7999999999999999e33

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.7999999999999999e33 < A

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

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

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

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

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

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

Alternative 6: 75.9% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -6.20000000000000031e-53

    1. Initial program 24.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. Simplified54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.20000000000000031e-53 < A < 9e43

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

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

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

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

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

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

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

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

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

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

    if 9e43 < A

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

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

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

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

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

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

Alternative 7: 66.3% accurate, 3.1× speedup?

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

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

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

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


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

    1. Initial program 56.2%

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

      \[\leadsto \mathsf{*.f64}\left(180, \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(A - C\right)}^{2}}{B}}{B}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(180, \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(A - C\right)}^{2}}{B}}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. unsub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.3999999999999998e-138 < B < 3.8000000000000001e-122

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.8000000000000001e-122 < B

    1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 66.0% accurate, 3.1× speedup?

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

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

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

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


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

    1. Initial program 56.2%

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

      \[\leadsto \mathsf{*.f64}\left(180, \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(A - C\right)}^{2}}{B}}{B}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(180, \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(A - C\right)}^{2}}{B}}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. unsub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.2000000000000001e-138 < B < 4.19999999999999985e-122

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.19999999999999985e-122 < B

    1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 66.0% accurate, 3.1× speedup?

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

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

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

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


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

    1. Initial program 56.2%

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

      \[\leadsto \mathsf{*.f64}\left(180, \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(A - C\right)}^{2}}{B}}{B}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(180, \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(A - C\right)}^{2}}{B}}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      2. unsub-negN/A

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

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

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

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

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

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

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

    if -6.8000000000000003e-138 < B < 4.19999999999999985e-122

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.19999999999999985e-122 < B

    1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 48.2% accurate, 3.2× speedup?

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

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

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

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

\mathbf{elif}\;A \leq 1.25 \cdot 10^{+23}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if A < -1.80000000000000011e-252

    1. Initial program 35.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. Taylor expanded in A around -inf

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

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

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

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

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

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

    if -1.80000000000000011e-252 < A < 2.8000000000000001e-292

    1. Initial program 27.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8000000000000001e-292 < A < 3.8e-213

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

    if 3.8e-213 < A < 1.25e23

    1. Initial program 67.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. Simplified83.3%

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

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

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

      if 1.25e23 < A

      1. Initial program 84.4%

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.8 \cdot 10^{-252}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.8 \cdot 10^{-292}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{-213}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;A \leq 1.25 \cdot 10^{+23}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 11: 65.8% accurate, 3.3× speedup?

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

      1. Initial program 56.2%

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

        \[\leadsto \mathsf{*.f64}\left(180, \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(A - C\right)}^{2}}{B}}{B}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(180, \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(A - C\right)}^{2}}{B}}{B}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. unsub-negN/A

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

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

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

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

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

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

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

      if -5.2e-138 < B < 4.30000000000000019e-122

      1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.30000000000000019e-122 < B

      1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 59.5% accurate, 3.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.5999999999999996e25 < A < -6.99999999999999999e-39

      1. Initial program 24.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.99999999999999999e-39 < A < 2.79999999999999983e30

      1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.79999999999999983e30 < A

      1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 59.4% accurate, 3.4× speedup?

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

      1. Initial program 23.5%

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

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

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

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

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

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

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

      if -4.5999999999999996e25 < A < -4.40000000000000024e-44

      1. Initial program 24.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.40000000000000024e-44 < A < 1.04999999999999989e31

      1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} + -1\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + \frac{C}{B}\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \left(\frac{C}{B}\right)\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. /-lowering-/.f6449.8%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(C, B\right)\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
      12. Simplified49.8%

        \[\leadsto \frac{\tan^{-1} \color{blue}{\left(-1 + \frac{C}{B}\right)} \cdot 180}{\pi} \]

      if 1.04999999999999989e31 < A

      1. Initial program 84.1%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
        2. associate-*l/N/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
        3. associate-/l*N/A

          \[\leadsto \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
      3. Simplified94.7%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right) \cdot 180\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
      6. Applied egg-rr94.7%

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right) \cdot 180}{\pi}} \]
      7. Taylor expanded in B around inf

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. associate--r+N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. div-subN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. --lowering--.f6480.8%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. Simplified80.8%

        \[\leadsto \frac{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} - 1\right)} \cdot 180}{\pi} \]
      10. Taylor expanded in C around 0

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \left(1 + \frac{A}{B}\right)\right)}\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
      11. Step-by-step derivation
        1. distribute-lft-inN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 \cdot 1 + -1 \cdot \frac{A}{B}\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + -1 \cdot \frac{A}{B}\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + \left(\mathsf{neg}\left(\frac{A}{B}\right)\right)\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. unsub-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 - \frac{A}{B}\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \left(\frac{A}{B}\right)\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. /-lowering-/.f6479.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(A, B\right)\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
      12. Simplified79.5%

        \[\leadsto \frac{\tan^{-1} \color{blue}{\left(-1 - \frac{A}{B}\right)} \cdot 180}{\pi} \]
    3. Recombined 4 regimes into one program.
    4. Final simplification62.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.6 \cdot 10^{+25}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -4.4 \cdot 10^{-44}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\ \mathbf{elif}\;A \leq 1.05 \cdot 10^{+31}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 14: 57.7% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -4.8 \cdot 10^{+25}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -7 \cdot 10^{-44}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{+31}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (if (<= A -4.8e+25)
       (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
       (if (<= A -7e-44)
         (/ (atan (/ B (/ C -0.5))) (/ PI 180.0))
         (if (<= A 3.8e+31)
           (/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)
           (* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -4.8e+25) {
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
    	} else if (A <= -7e-44) {
    		tmp = atan((B / (C / -0.5))) / (((double) M_PI) / 180.0);
    	} else if (A <= 3.8e+31) {
    		tmp = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
    	} else {
    		tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -4.8e+25) {
    		tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
    	} else if (A <= -7e-44) {
    		tmp = Math.atan((B / (C / -0.5))) / (Math.PI / 180.0);
    	} else if (A <= 3.8e+31) {
    		tmp = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
    	} else {
    		tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	tmp = 0
    	if A <= -4.8e+25:
    		tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
    	elif A <= -7e-44:
    		tmp = math.atan((B / (C / -0.5))) / (math.pi / 180.0)
    	elif A <= 3.8e+31:
    		tmp = (180.0 * math.atan(((C / B) + -1.0))) / math.pi
    	else:
    		tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	tmp = 0.0
    	if (A <= -4.8e+25)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi));
    	elseif (A <= -7e-44)
    		tmp = Float64(atan(Float64(B / Float64(C / -0.5))) / Float64(pi / 180.0));
    	elseif (A <= 3.8e+31)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi);
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	tmp = 0.0;
    	if (A <= -4.8e+25)
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / pi);
    	elseif (A <= -7e-44)
    		tmp = atan((B / (C / -0.5))) / (pi / 180.0);
    	elseif (A <= 3.8e+31)
    		tmp = (180.0 * atan(((C / B) + -1.0))) / pi;
    	else
    		tmp = 180.0 * (atan(((A * -2.0) / B)) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[A, -4.8e+25], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7e-44], N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e+31], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;A \leq -4.8 \cdot 10^{+25}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -7 \cdot 10^{-44}:\\
    \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\
    
    \mathbf{elif}\;A \leq 3.8 \cdot 10^{+31}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if A < -4.79999999999999992e25

      1. Initial program 23.5%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in A around -inf

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. *-lowering-*.f6470.2%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified70.2%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{B \cdot 0.5}{A}\right)}}{\pi} \]

      if -4.79999999999999992e25 < A < -6.9999999999999995e-44

      1. Initial program 24.7%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in C around inf

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B} + \frac{-1}{2} \cdot \frac{B}{C}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(A + -1 \cdot A\right)\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. distribute-rgt1-inN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(-1 + 1\right) \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. mul0-lftN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        7. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{0}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{\frac{-1}{2} \cdot B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot B\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(B \cdot \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        12. *-lowering-*.f6464.1%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified64.1%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0}{B} + \frac{B \cdot -0.5}{C}\right)}}{\pi} \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
        2. div-invN/A

          \[\leadsto \left(\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \frac{1}{\mathsf{PI}\left(\right)}\right) \cdot 180 \]
        3. associate-*l*N/A

          \[\leadsto \tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \color{blue}{\left(\frac{1}{\mathsf{PI}\left(\right)} \cdot 180\right)} \]
        4. associate-/r/N/A

          \[\leadsto \tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
        5. un-div-invN/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right)}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right), \color{blue}{\left(\frac{\mathsf{PI}\left(\right)}{180}\right)}\right) \]
        7. div0N/A

          \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(0 + \frac{B \cdot \frac{-1}{2}}{C}\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        8. +-lft-identityN/A

          \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        9. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C}\right)\right), \left(\frac{\color{blue}{\mathsf{PI}\left(\right)}}{180}\right)\right) \]
        10. associate-/l*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        11. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{1}{\frac{C}{\frac{-1}{2}}}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        12. un-div-invN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B}{\frac{C}{\frac{-1}{2}}}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        13. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \left(\frac{C}{\frac{-1}{2}}\right)\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        14. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \mathsf{/.f64}\left(C, \frac{-1}{2}\right)\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        15. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \mathsf{/.f64}\left(C, \frac{-1}{2}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
        16. PI-lowering-PI.f6464.2%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \mathsf{/.f64}\left(C, \frac{-1}{2}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      7. Applied egg-rr64.2%

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}} \]

      if -6.9999999999999995e-44 < A < 3.8000000000000001e31

      1. Initial program 62.3%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
        2. associate-*l/N/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
        3. associate-/l*N/A

          \[\leadsto \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
      3. Simplified79.3%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{B \cdot B + \left(C - A\right) \cdot \left(C - A\right)}}{B}\right) \cdot 180\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
      6. Applied egg-rr79.3%

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right) \cdot 180}{\pi}} \]
      7. Taylor expanded in B around inf

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. associate--r+N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. div-subN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. --lowering--.f6451.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. Simplified51.5%

        \[\leadsto \frac{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} - 1\right)} \cdot 180}{\pi} \]
      10. Taylor expanded in A around 0

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - 1\right)}\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
      11. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} + \left(\mathsf{neg}\left(1\right)\right)\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} + -1\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(-1 + \frac{C}{B}\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \left(\frac{C}{B}\right)\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. /-lowering-/.f6449.8%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(C, B\right)\right)\right), 180\right), \mathsf{PI.f64}\left(\right)\right) \]
      12. Simplified49.8%

        \[\leadsto \frac{\tan^{-1} \color{blue}{\left(-1 + \frac{C}{B}\right)} \cdot 180}{\pi} \]

      if 3.8000000000000001e31 < A

      1. Initial program 84.1%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in A around inf

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-2 \cdot \frac{A}{B}\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{-2 \cdot A}{B}\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(-2 \cdot A\right), B\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. *-lowering-*.f6476.5%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, A\right), B\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified76.5%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-2 \cdot A}{B}\right)}}{\pi} \]
    3. Recombined 4 regimes into one program.
    4. Final simplification61.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4.8 \cdot 10^{+25}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -7 \cdot 10^{-44}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{+31}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 15: 57.3% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -5.4 \cdot 10^{+25}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -7 \cdot 10^{-39}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\ \mathbf{elif}\;A \leq 4.5 \cdot 10^{+63}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-2}{\frac{B}{A}}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (if (<= A -5.4e+25)
       (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
       (if (<= A -7e-39)
         (/ (atan (/ B (/ C -0.5))) (/ PI 180.0))
         (if (<= A 4.5e+63)
           (* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
           (/ (* 180.0 (atan (/ -2.0 (/ B A)))) PI)))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -5.4e+25) {
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
    	} else if (A <= -7e-39) {
    		tmp = atan((B / (C / -0.5))) / (((double) M_PI) / 180.0);
    	} else if (A <= 4.5e+63) {
    		tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
    	} else {
    		tmp = (180.0 * atan((-2.0 / (B / A)))) / ((double) M_PI);
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -5.4e+25) {
    		tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
    	} else if (A <= -7e-39) {
    		tmp = Math.atan((B / (C / -0.5))) / (Math.PI / 180.0);
    	} else if (A <= 4.5e+63) {
    		tmp = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
    	} else {
    		tmp = (180.0 * Math.atan((-2.0 / (B / A)))) / Math.PI;
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	tmp = 0
    	if A <= -5.4e+25:
    		tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
    	elif A <= -7e-39:
    		tmp = math.atan((B / (C / -0.5))) / (math.pi / 180.0)
    	elif A <= 4.5e+63:
    		tmp = (180.0 / math.pi) * math.atan((1.0 + (C / B)))
    	else:
    		tmp = (180.0 * math.atan((-2.0 / (B / A)))) / math.pi
    	return tmp
    
    function code(A, B, C)
    	tmp = 0.0
    	if (A <= -5.4e+25)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi));
    	elseif (A <= -7e-39)
    		tmp = Float64(atan(Float64(B / Float64(C / -0.5))) / Float64(pi / 180.0));
    	elseif (A <= 4.5e+63)
    		tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B))));
    	else
    		tmp = Float64(Float64(180.0 * atan(Float64(-2.0 / Float64(B / A)))) / pi);
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	tmp = 0.0;
    	if (A <= -5.4e+25)
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / pi);
    	elseif (A <= -7e-39)
    		tmp = atan((B / (C / -0.5))) / (pi / 180.0);
    	elseif (A <= 4.5e+63)
    		tmp = (180.0 / pi) * atan((1.0 + (C / B)));
    	else
    		tmp = (180.0 * atan((-2.0 / (B / A)))) / pi;
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[A, -5.4e+25], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7e-39], N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.5e+63], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-2.0 / N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;A \leq -5.4 \cdot 10^{+25}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -7 \cdot 10^{-39}:\\
    \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\
    
    \mathbf{elif}\;A \leq 4.5 \cdot 10^{+63}:\\
    \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-2}{\frac{B}{A}}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if A < -5.4e25

      1. Initial program 23.5%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in A around -inf

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. *-lowering-*.f6470.2%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified70.2%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{B \cdot 0.5}{A}\right)}}{\pi} \]

      if -5.4e25 < A < -6.99999999999999999e-39

      1. Initial program 24.7%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in C around inf

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B} + \frac{-1}{2} \cdot \frac{B}{C}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(A + -1 \cdot A\right)\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. distribute-rgt1-inN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(-1 + 1\right) \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. mul0-lftN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        7. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{0}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{\frac{-1}{2} \cdot B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot B\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(B \cdot \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        12. *-lowering-*.f6464.1%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified64.1%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0}{B} + \frac{B \cdot -0.5}{C}\right)}}{\pi} \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
        2. div-invN/A

          \[\leadsto \left(\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \frac{1}{\mathsf{PI}\left(\right)}\right) \cdot 180 \]
        3. associate-*l*N/A

          \[\leadsto \tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \color{blue}{\left(\frac{1}{\mathsf{PI}\left(\right)} \cdot 180\right)} \]
        4. associate-/r/N/A

          \[\leadsto \tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
        5. un-div-invN/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right)}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right), \color{blue}{\left(\frac{\mathsf{PI}\left(\right)}{180}\right)}\right) \]
        7. div0N/A

          \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(0 + \frac{B \cdot \frac{-1}{2}}{C}\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        8. +-lft-identityN/A

          \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        9. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C}\right)\right), \left(\frac{\color{blue}{\mathsf{PI}\left(\right)}}{180}\right)\right) \]
        10. associate-/l*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        11. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{1}{\frac{C}{\frac{-1}{2}}}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        12. un-div-invN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B}{\frac{C}{\frac{-1}{2}}}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        13. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \left(\frac{C}{\frac{-1}{2}}\right)\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        14. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \mathsf{/.f64}\left(C, \frac{-1}{2}\right)\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        15. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \mathsf{/.f64}\left(C, \frac{-1}{2}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
        16. PI-lowering-PI.f6464.2%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \mathsf{/.f64}\left(C, \frac{-1}{2}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      7. Applied egg-rr64.2%

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}} \]

      if -6.99999999999999999e-39 < A < 4.50000000000000017e63

      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. 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.0%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in B around -inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\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--.f6449.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. Simplified49.7%

        \[\leadsto \tan^{-1} \color{blue}{\left(1 + \frac{C - A}{B}\right)} \cdot \frac{180}{\pi} \]
      8. Taylor expanded in A around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(1 + \frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      9. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{C}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. /-lowering-/.f6447.6%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(C, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      10. Simplified47.6%

        \[\leadsto \tan^{-1} \color{blue}{\left(1 + \frac{C}{B}\right)} \cdot \frac{180}{\pi} \]

      if 4.50000000000000017e63 < A

      1. Initial program 87.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. Simplified97.9%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in A around inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-2 \cdot \frac{A}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-2 \cdot A}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(-2 \cdot A\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. *-lowering-*.f6482.8%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, A\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. Simplified82.8%

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{-2 \cdot A}{B}\right)} \cdot \frac{180}{\pi} \]
      8. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{-2 \cdot A}{B}\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\tan^{-1} \left(\frac{-2 \cdot A}{B}\right) \cdot 180\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\left(180 \cdot \tan^{-1} \left(\frac{-2 \cdot A}{B}\right)\right), \mathsf{PI}\left(\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \tan^{-1} \left(\frac{-2 \cdot A}{B}\right)\right), \mathsf{PI}\left(\right)\right) \]
        5. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{-2 \cdot A}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        6. associate-/l*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(-2 \cdot \frac{A}{B}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        7. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(-2 \cdot \frac{1}{\frac{B}{A}}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        8. un-div-invN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{-2}{\frac{B}{A}}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(-2, \left(\frac{B}{A}\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{/.f64}\left(B, A\right)\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
        11. PI-lowering-PI.f6482.8%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{/.f64}\left(B, A\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. Applied egg-rr82.8%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{-2}{\frac{B}{A}}\right)}{\pi}} \]
    3. Recombined 4 regimes into one program.
    4. Final simplification60.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.4 \cdot 10^{+25}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -7 \cdot 10^{-39}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\ \mathbf{elif}\;A \leq 4.5 \cdot 10^{+63}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-2}{\frac{B}{A}}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 16: 57.2% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -5.2 \cdot 10^{+25}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -9.5 \cdot 10^{-46}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\ \mathbf{elif}\;A \leq 7.5 \cdot 10^{+62}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (if (<= A -5.2e+25)
       (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
       (if (<= A -9.5e-46)
         (/ (atan (/ B (/ C -0.5))) (/ PI 180.0))
         (if (<= A 7.5e+62)
           (* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
           (* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -5.2e+25) {
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
    	} else if (A <= -9.5e-46) {
    		tmp = atan((B / (C / -0.5))) / (((double) M_PI) / 180.0);
    	} else if (A <= 7.5e+62) {
    		tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
    	} else {
    		tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -5.2e+25) {
    		tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
    	} else if (A <= -9.5e-46) {
    		tmp = Math.atan((B / (C / -0.5))) / (Math.PI / 180.0);
    	} else if (A <= 7.5e+62) {
    		tmp = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
    	} else {
    		tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	tmp = 0
    	if A <= -5.2e+25:
    		tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
    	elif A <= -9.5e-46:
    		tmp = math.atan((B / (C / -0.5))) / (math.pi / 180.0)
    	elif A <= 7.5e+62:
    		tmp = (180.0 / math.pi) * math.atan((1.0 + (C / B)))
    	else:
    		tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	tmp = 0.0
    	if (A <= -5.2e+25)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi));
    	elseif (A <= -9.5e-46)
    		tmp = Float64(atan(Float64(B / Float64(C / -0.5))) / Float64(pi / 180.0));
    	elseif (A <= 7.5e+62)
    		tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B))));
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	tmp = 0.0;
    	if (A <= -5.2e+25)
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / pi);
    	elseif (A <= -9.5e-46)
    		tmp = atan((B / (C / -0.5))) / (pi / 180.0);
    	elseif (A <= 7.5e+62)
    		tmp = (180.0 / pi) * atan((1.0 + (C / B)));
    	else
    		tmp = 180.0 * (atan(((A * -2.0) / B)) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[A, -5.2e+25], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.5e-46], N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.5e+62], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;A \leq -5.2 \cdot 10^{+25}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -9.5 \cdot 10^{-46}:\\
    \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\
    
    \mathbf{elif}\;A \leq 7.5 \cdot 10^{+62}:\\
    \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if A < -5.1999999999999997e25

      1. Initial program 23.5%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in A around -inf

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. *-lowering-*.f6470.2%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified70.2%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{B \cdot 0.5}{A}\right)}}{\pi} \]

      if -5.1999999999999997e25 < A < -9.49999999999999993e-46

      1. Initial program 24.7%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in C around inf

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B} + \frac{-1}{2} \cdot \frac{B}{C}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(A + -1 \cdot A\right)\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. distribute-rgt1-inN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(-1 + 1\right) \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. mul0-lftN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        7. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{0}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{\frac{-1}{2} \cdot B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot B\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(B \cdot \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        12. *-lowering-*.f6464.1%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified64.1%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0}{B} + \frac{B \cdot -0.5}{C}\right)}}{\pi} \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
        2. div-invN/A

          \[\leadsto \left(\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \frac{1}{\mathsf{PI}\left(\right)}\right) \cdot 180 \]
        3. associate-*l*N/A

          \[\leadsto \tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \color{blue}{\left(\frac{1}{\mathsf{PI}\left(\right)} \cdot 180\right)} \]
        4. associate-/r/N/A

          \[\leadsto \tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
        5. un-div-invN/A

          \[\leadsto \frac{\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right)}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right), \color{blue}{\left(\frac{\mathsf{PI}\left(\right)}{180}\right)}\right) \]
        7. div0N/A

          \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(0 + \frac{B \cdot \frac{-1}{2}}{C}\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        8. +-lft-identityN/A

          \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        9. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C}\right)\right), \left(\frac{\color{blue}{\mathsf{PI}\left(\right)}}{180}\right)\right) \]
        10. associate-/l*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        11. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{1}{\frac{C}{\frac{-1}{2}}}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        12. un-div-invN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B}{\frac{C}{\frac{-1}{2}}}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        13. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \left(\frac{C}{\frac{-1}{2}}\right)\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        14. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \mathsf{/.f64}\left(C, \frac{-1}{2}\right)\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
        15. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \mathsf{/.f64}\left(C, \frac{-1}{2}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
        16. PI-lowering-PI.f6464.2%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \mathsf{/.f64}\left(C, \frac{-1}{2}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
      7. Applied egg-rr64.2%

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}} \]

      if -9.49999999999999993e-46 < A < 7.49999999999999998e62

      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. 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.0%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in B around -inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\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--.f6449.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. Simplified49.7%

        \[\leadsto \tan^{-1} \color{blue}{\left(1 + \frac{C - A}{B}\right)} \cdot \frac{180}{\pi} \]
      8. Taylor expanded in A around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(1 + \frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      9. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{C}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. /-lowering-/.f6447.6%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(C, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      10. Simplified47.6%

        \[\leadsto \tan^{-1} \color{blue}{\left(1 + \frac{C}{B}\right)} \cdot \frac{180}{\pi} \]

      if 7.49999999999999998e62 < A

      1. Initial program 87.5%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in A around inf

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-2 \cdot \frac{A}{B}\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{-2 \cdot A}{B}\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(-2 \cdot A\right), B\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. *-lowering-*.f6482.8%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, A\right), B\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified82.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-2 \cdot A}{B}\right)}}{\pi} \]
    3. Recombined 4 regimes into one program.
    4. Final simplification60.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.2 \cdot 10^{+25}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -9.5 \cdot 10^{-46}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\ \mathbf{elif}\;A \leq 7.5 \cdot 10^{+62}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 17: 57.2% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -1.1 \cdot 10^{+26}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -6.5 \cdot 10^{-39}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.3 \cdot 10^{+68}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (if (<= A -1.1e+26)
       (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
       (if (<= A -6.5e-39)
         (* 180.0 (/ (atan (* B (/ -0.5 C))) PI))
         (if (<= A 4.3e+68)
           (* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
           (* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -1.1e+26) {
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
    	} else if (A <= -6.5e-39) {
    		tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
    	} else if (A <= 4.3e+68) {
    		tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
    	} else {
    		tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double tmp;
    	if (A <= -1.1e+26) {
    		tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
    	} else if (A <= -6.5e-39) {
    		tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
    	} else if (A <= 4.3e+68) {
    		tmp = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
    	} else {
    		tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	tmp = 0
    	if A <= -1.1e+26:
    		tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi)
    	elif A <= -6.5e-39:
    		tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi)
    	elif A <= 4.3e+68:
    		tmp = (180.0 / math.pi) * math.atan((1.0 + (C / B)))
    	else:
    		tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	tmp = 0.0
    	if (A <= -1.1e+26)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi));
    	elseif (A <= -6.5e-39)
    		tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi));
    	elseif (A <= 4.3e+68)
    		tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B))));
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	tmp = 0.0;
    	if (A <= -1.1e+26)
    		tmp = 180.0 * (atan(((B * 0.5) / A)) / pi);
    	elseif (A <= -6.5e-39)
    		tmp = 180.0 * (atan((B * (-0.5 / C))) / pi);
    	elseif (A <= 4.3e+68)
    		tmp = (180.0 / pi) * atan((1.0 + (C / B)));
    	else
    		tmp = 180.0 * (atan(((A * -2.0) / B)) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[A, -1.1e+26], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6.5e-39], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.3e+68], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;A \leq -1.1 \cdot 10^{+26}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq -6.5 \cdot 10^{-39}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
    
    \mathbf{elif}\;A \leq 4.3 \cdot 10^{+68}:\\
    \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if A < -1.10000000000000004e26

      1. Initial program 23.5%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in A around -inf

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. *-lowering-*.f6470.2%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified70.2%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{B \cdot 0.5}{A}\right)}}{\pi} \]

      if -1.10000000000000004e26 < A < -6.50000000000000027e-39

      1. Initial program 24.7%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in C around inf

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B} + \frac{-1}{2} \cdot \frac{B}{C}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(A + -1 \cdot A\right)\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. distribute-rgt1-inN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(-1 + 1\right) \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. mul0-lftN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        7. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{0}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{\frac{-1}{2} \cdot B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot B\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(B \cdot \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        12. *-lowering-*.f6464.1%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified64.1%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0}{B} + \frac{B \cdot -0.5}{C}\right)}}{\pi} \]
      6. Step-by-step derivation
        1. div0N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(0 + \frac{B \cdot \frac{-1}{2}}{C}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. +-lft-identityN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. associate-/l*N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2}}{C} \cdot B\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(\left(\frac{\frac{-1}{2}}{C}\right), B\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. /-lowering-/.f6464.1%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, C\right), B\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. Applied egg-rr64.1%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-0.5}{C} \cdot B\right)}}{\pi} \]

      if -6.50000000000000027e-39 < A < 4.3000000000000001e68

      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. 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.0%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in B around -inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\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--.f6449.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. Simplified49.7%

        \[\leadsto \tan^{-1} \color{blue}{\left(1 + \frac{C - A}{B}\right)} \cdot \frac{180}{\pi} \]
      8. Taylor expanded in A around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(1 + \frac{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      9. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{C}{B}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. /-lowering-/.f6447.6%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(C, B\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      10. Simplified47.6%

        \[\leadsto \tan^{-1} \color{blue}{\left(1 + \frac{C}{B}\right)} \cdot \frac{180}{\pi} \]

      if 4.3000000000000001e68 < A

      1. Initial program 87.5%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in A around inf

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-2 \cdot \frac{A}{B}\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{-2 \cdot A}{B}\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(-2 \cdot A\right), B\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. *-lowering-*.f6482.8%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, A\right), B\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified82.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-2 \cdot A}{B}\right)}}{\pi} \]
    3. Recombined 4 regimes into one program.
    4. Final simplification60.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.1 \cdot 10^{+26}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\ \mathbf{elif}\;A \leq -6.5 \cdot 10^{-39}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 4.3 \cdot 10^{+68}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 18: 47.1% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;C \leq -1.7 \cdot 10^{-16}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;C \leq -1.75 \cdot 10^{-239}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;C \leq 2.8 \cdot 10^{-83}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ \end{array} \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (if (<= C -1.7e-16)
       (* (/ 180.0 PI) (atan (/ C B)))
       (if (<= C -1.75e-239)
         (* (/ 180.0 PI) (atan 1.0))
         (if (<= C 2.8e-83)
           (* (/ 180.0 PI) (atan -1.0))
           (* 180.0 (/ (atan (* B (/ -0.5 C))) PI))))))
    double code(double A, double B, double C) {
    	double tmp;
    	if (C <= -1.7e-16) {
    		tmp = (180.0 / ((double) M_PI)) * atan((C / B));
    	} else if (C <= -1.75e-239) {
    		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
    	} else if (C <= 2.8e-83) {
    		tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
    	} else {
    		tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
    	}
    	return tmp;
    }
    
    public static double code(double A, double B, double C) {
    	double tmp;
    	if (C <= -1.7e-16) {
    		tmp = (180.0 / Math.PI) * Math.atan((C / B));
    	} else if (C <= -1.75e-239) {
    		tmp = (180.0 / Math.PI) * Math.atan(1.0);
    	} else if (C <= 2.8e-83) {
    		tmp = (180.0 / Math.PI) * Math.atan(-1.0);
    	} else {
    		tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
    	}
    	return tmp;
    }
    
    def code(A, B, C):
    	tmp = 0
    	if C <= -1.7e-16:
    		tmp = (180.0 / math.pi) * math.atan((C / B))
    	elif C <= -1.75e-239:
    		tmp = (180.0 / math.pi) * math.atan(1.0)
    	elif C <= 2.8e-83:
    		tmp = (180.0 / math.pi) * math.atan(-1.0)
    	else:
    		tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi)
    	return tmp
    
    function code(A, B, C)
    	tmp = 0.0
    	if (C <= -1.7e-16)
    		tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B)));
    	elseif (C <= -1.75e-239)
    		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
    	elseif (C <= 2.8e-83)
    		tmp = Float64(Float64(180.0 / pi) * atan(-1.0));
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi));
    	end
    	return tmp
    end
    
    function tmp_2 = code(A, B, C)
    	tmp = 0.0;
    	if (C <= -1.7e-16)
    		tmp = (180.0 / pi) * atan((C / B));
    	elseif (C <= -1.75e-239)
    		tmp = (180.0 / pi) * atan(1.0);
    	elseif (C <= 2.8e-83)
    		tmp = (180.0 / pi) * atan(-1.0);
    	else
    		tmp = 180.0 * (atan((B * (-0.5 / C))) / pi);
    	end
    	tmp_2 = tmp;
    end
    
    code[A_, B_, C_] := If[LessEqual[C, -1.7e-16], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.75e-239], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.8e-83], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;C \leq -1.7 \cdot 10^{-16}:\\
    \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
    
    \mathbf{elif}\;C \leq -1.75 \cdot 10^{-239}:\\
    \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
    
    \mathbf{elif}\;C \leq 2.8 \cdot 10^{-83}:\\
    \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if C < -1.7e-16

      1. Initial program 75.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. Simplified86.8%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in B around -inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\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--.f6469.9%

          \[\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. Simplified69.9%

        \[\leadsto \tan^{-1} \color{blue}{\left(1 + \frac{C - A}{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{C}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      9. Step-by-step derivation
        1. /-lowering-/.f6462.8%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(C, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      10. Simplified62.8%

        \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C}{B}\right)} \cdot \frac{180}{\pi} \]

      if -1.7e-16 < C < -1.75000000000000003e-239

      1. Initial program 69.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{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
      4. Add Preprocessing
      5. Taylor expanded in B around -inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
      6. Step-by-step derivation
        1. Simplified34.9%

          \[\leadsto \tan^{-1} \color{blue}{1} \cdot \frac{180}{\pi} \]

        if -1.75000000000000003e-239 < C < 2.8000000000000001e-83

        1. Initial program 57.4%

          \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
        2. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
          2. associate-*l/N/A

            \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
          3. associate-/l*N/A

            \[\leadsto \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
        3. Simplified77.1%

          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
        4. Add Preprocessing
        5. Taylor expanded in 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. Simplified36.5%

            \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]

          if 2.8000000000000001e-83 < C

          1. Initial program 32.0%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. Add Preprocessing
          3. Taylor expanded in C around inf

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B} + \frac{-1}{2} \cdot \frac{B}{C}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. mul-1-negN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(A + -1 \cdot A\right)\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. distribute-rgt1-inN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(-1 + 1\right) \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. mul0-lftN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{0}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{\frac{-1}{2} \cdot B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot B\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            11. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(B \cdot \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            12. *-lowering-*.f6462.8%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified62.8%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0}{B} + \frac{B \cdot -0.5}{C}\right)}}{\pi} \]
          6. Step-by-step derivation
            1. div0N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(0 + \frac{B \cdot \frac{-1}{2}}{C}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. +-lft-identityN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2}}{C} \cdot B\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(\left(\frac{\frac{-1}{2}}{C}\right), B\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. /-lowering-/.f6462.8%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, C\right), B\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. Applied egg-rr62.8%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-0.5}{C} \cdot B\right)}}{\pi} \]
        7. Recombined 4 regimes into one program.
        8. Final simplification51.4%

          \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.7 \cdot 10^{-16}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\ \mathbf{elif}\;C \leq -1.75 \cdot 10^{-239}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;C \leq 2.8 \cdot 10^{-83}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 19: 65.4% accurate, 3.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -3.7 \cdot 10^{-138}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\ \mathbf{elif}\;B \leq 6.2 \cdot 10^{-122}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \end{array} \]
        (FPCore (A B C)
         :precision binary64
         (if (<= B -3.7e-138)
           (* (/ 180.0 PI) (atan (/ (- C (- A B)) B)))
           (if (<= B 6.2e-122)
             (* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
             (* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
        double code(double A, double B, double C) {
        	double tmp;
        	if (B <= -3.7e-138) {
        		tmp = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
        	} else if (B <= 6.2e-122) {
        		tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
        	} else {
        		tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
        	}
        	return tmp;
        }
        
        public static double code(double A, double B, double C) {
        	double tmp;
        	if (B <= -3.7e-138) {
        		tmp = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
        	} else if (B <= 6.2e-122) {
        		tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
        	} else {
        		tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
        	}
        	return tmp;
        }
        
        def code(A, B, C):
        	tmp = 0
        	if B <= -3.7e-138:
        		tmp = (180.0 / math.pi) * math.atan(((C - (A - B)) / B))
        	elif B <= 6.2e-122:
        		tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi)
        	else:
        		tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi)
        	return tmp
        
        function code(A, B, C)
        	tmp = 0.0
        	if (B <= -3.7e-138)
        		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B)));
        	elseif (B <= 6.2e-122)
        		tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi));
        	else
        		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi));
        	end
        	return tmp
        end
        
        function tmp_2 = code(A, B, C)
        	tmp = 0.0;
        	if (B <= -3.7e-138)
        		tmp = (180.0 / pi) * atan(((C - (A - B)) / B));
        	elseif (B <= 6.2e-122)
        		tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi);
        	else
        		tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi);
        	end
        	tmp_2 = tmp;
        end
        
        code[A_, B_, C_] := If[LessEqual[B, -3.7e-138], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.2e-122], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;B \leq -3.7 \cdot 10^{-138}:\\
        \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\
        
        \mathbf{elif}\;B \leq 6.2 \cdot 10^{-122}:\\
        \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
        
        \mathbf{else}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -3.69999999999999991e-138

          1. Initial program 56.2%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
            2. associate-*l/N/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
            3. associate-/l*N/A

              \[\leadsto \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
          3. Simplified73.8%

            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
          4. Add Preprocessing
          5. Taylor expanded in B around -inf

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\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--.f6468.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. Simplified68.7%

            \[\leadsto \tan^{-1} \color{blue}{\left(1 + \frac{C - A}{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{\left(B + C\right) - A}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          9. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\left(B + C\right) - A\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\left(C + B\right) - A\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(C + \left(B - A\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(C, \left(B - A\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. --lowering--.f6468.7%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(C, \mathsf{\_.f64}\left(B, A\right)\right), B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          10. Simplified68.7%

            \[\leadsto \tan^{-1} \color{blue}{\left(\frac{C + \left(B - A\right)}{B}\right)} \cdot \frac{180}{\pi} \]

          if -3.69999999999999991e-138 < B < 6.1999999999999997e-122

          1. Initial program 51.0%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
            2. associate-*l/N/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
            3. associate-/l*N/A

              \[\leadsto \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
          3. Simplified75.3%

            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
          4. Add Preprocessing
          5. Taylor expanded in B around 0

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. distribute-neg-fracN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            11. distribute-neg-frac2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C - A\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            12. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C + \left(\mathsf{neg}\left(A\right)\right)\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            13. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(A\right)\right) + C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            14. distribute-neg-inN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(A\right)\right)\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            15. mul-1-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{-1 \cdot \left(\mathsf{neg}\left(A\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            16. mul-1-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{-1 \cdot \left(-1 \cdot A\right) + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            17. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\left(-1 \cdot -1\right) \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            18. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{1 \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            19. *-lft-identityN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{A + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            20. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{A - C}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            21. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{1}{2}, \left(A - C\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            22. --lowering--.f6465.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. Simplified65.0%

            \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{0.5}{A - C}\right)} \cdot \frac{180}{\pi} \]

          if 6.1999999999999997e-122 < B

          1. Initial program 57.2%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. Add Preprocessing
          3. Taylor expanded in B around inf

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. associate--r+N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. div-subN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. --lowering--.f6472.7%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified72.7%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} - 1\right)}}{\pi} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification69.1%

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.7 \cdot 10^{-138}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\ \mathbf{elif}\;B \leq 6.2 \cdot 10^{-122}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 20: 65.4% accurate, 3.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{C - A}{B}\\ \mathbf{if}\;B \leq -4.8 \cdot 10^{-138}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + t\_0\right)\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-122}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + -1\right)}{\pi}\\ \end{array} \end{array} \]
        (FPCore (A B C)
         :precision binary64
         (let* ((t_0 (/ (- C A) B)))
           (if (<= B -4.8e-138)
             (* (/ 180.0 PI) (atan (+ 1.0 t_0)))
             (if (<= B 3.1e-122)
               (* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
               (* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))
        double code(double A, double B, double C) {
        	double t_0 = (C - A) / B;
        	double tmp;
        	if (B <= -4.8e-138) {
        		tmp = (180.0 / ((double) M_PI)) * atan((1.0 + t_0));
        	} else if (B <= 3.1e-122) {
        		tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
        	} else {
        		tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
        	}
        	return tmp;
        }
        
        public static double code(double A, double B, double C) {
        	double t_0 = (C - A) / B;
        	double tmp;
        	if (B <= -4.8e-138) {
        		tmp = (180.0 / Math.PI) * Math.atan((1.0 + t_0));
        	} else if (B <= 3.1e-122) {
        		tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
        	} else {
        		tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
        	}
        	return tmp;
        }
        
        def code(A, B, C):
        	t_0 = (C - A) / B
        	tmp = 0
        	if B <= -4.8e-138:
        		tmp = (180.0 / math.pi) * math.atan((1.0 + t_0))
        	elif B <= 3.1e-122:
        		tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi)
        	else:
        		tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi)
        	return tmp
        
        function code(A, B, C)
        	t_0 = Float64(Float64(C - A) / B)
        	tmp = 0.0
        	if (B <= -4.8e-138)
        		tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + t_0)));
        	elseif (B <= 3.1e-122)
        		tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi));
        	else
        		tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi));
        	end
        	return tmp
        end
        
        function tmp_2 = code(A, B, C)
        	t_0 = (C - A) / B;
        	tmp = 0.0;
        	if (B <= -4.8e-138)
        		tmp = (180.0 / pi) * atan((1.0 + t_0));
        	elseif (B <= 3.1e-122)
        		tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi);
        	else
        		tmp = 180.0 * (atan((t_0 + -1.0)) / pi);
        	end
        	tmp_2 = tmp;
        end
        
        code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -4.8e-138], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-122], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{C - A}{B}\\
        \mathbf{if}\;B \leq -4.8 \cdot 10^{-138}:\\
        \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + t\_0\right)\\
        
        \mathbf{elif}\;B \leq 3.1 \cdot 10^{-122}:\\
        \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
        
        \mathbf{else}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -4.7999999999999998e-138

          1. Initial program 56.2%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
            2. associate-*l/N/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
            3. associate-/l*N/A

              \[\leadsto \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
          3. Simplified73.8%

            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
          4. Add Preprocessing
          5. Taylor expanded in B around -inf

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\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--.f6468.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. Simplified68.7%

            \[\leadsto \tan^{-1} \color{blue}{\left(1 + \frac{C - A}{B}\right)} \cdot \frac{180}{\pi} \]

          if -4.7999999999999998e-138 < B < 3.0999999999999998e-122

          1. Initial program 51.0%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
            2. associate-*l/N/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
            3. associate-/l*N/A

              \[\leadsto \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
          3. Simplified75.3%

            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
          4. Add Preprocessing
          5. Taylor expanded in B around 0

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. distribute-neg-fracN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            11. distribute-neg-frac2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C - A\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            12. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C + \left(\mathsf{neg}\left(A\right)\right)\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            13. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(A\right)\right) + C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            14. distribute-neg-inN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(A\right)\right)\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            15. mul-1-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{-1 \cdot \left(\mathsf{neg}\left(A\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            16. mul-1-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{-1 \cdot \left(-1 \cdot A\right) + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            17. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\left(-1 \cdot -1\right) \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            18. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{1 \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            19. *-lft-identityN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{A + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            20. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{A - C}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            21. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{1}{2}, \left(A - C\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            22. --lowering--.f6465.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. Simplified65.0%

            \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{0.5}{A - C}\right)} \cdot \frac{180}{\pi} \]

          if 3.0999999999999998e-122 < B

          1. Initial program 57.2%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. Add Preprocessing
          3. Taylor expanded in B around inf

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. associate--r+N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. div-subN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. --lowering--.f6472.7%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified72.7%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} - 1\right)}}{\pi} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification69.1%

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.8 \cdot 10^{-138}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-122}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 21: 61.8% accurate, 3.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -1.06 \cdot 10^{+26}:\\ \;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}}{0.005555555555555556}\\ \mathbf{elif}\;A \leq -3.3 \cdot 10^{-39}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \end{array} \]
        (FPCore (A B C)
         :precision binary64
         (if (<= A -1.06e+26)
           (/ (/ (atan (/ (* B 0.5) A)) PI) 0.005555555555555556)
           (if (<= A -3.3e-39)
             (/ (atan (/ B (/ C -0.5))) (/ PI 180.0))
             (* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
        double code(double A, double B, double C) {
        	double tmp;
        	if (A <= -1.06e+26) {
        		tmp = (atan(((B * 0.5) / A)) / ((double) M_PI)) / 0.005555555555555556;
        	} else if (A <= -3.3e-39) {
        		tmp = atan((B / (C / -0.5))) / (((double) M_PI) / 180.0);
        	} else {
        		tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
        	}
        	return tmp;
        }
        
        public static double code(double A, double B, double C) {
        	double tmp;
        	if (A <= -1.06e+26) {
        		tmp = (Math.atan(((B * 0.5) / A)) / Math.PI) / 0.005555555555555556;
        	} else if (A <= -3.3e-39) {
        		tmp = Math.atan((B / (C / -0.5))) / (Math.PI / 180.0);
        	} else {
        		tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
        	}
        	return tmp;
        }
        
        def code(A, B, C):
        	tmp = 0
        	if A <= -1.06e+26:
        		tmp = (math.atan(((B * 0.5) / A)) / math.pi) / 0.005555555555555556
        	elif A <= -3.3e-39:
        		tmp = math.atan((B / (C / -0.5))) / (math.pi / 180.0)
        	else:
        		tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi)
        	return tmp
        
        function code(A, B, C)
        	tmp = 0.0
        	if (A <= -1.06e+26)
        		tmp = Float64(Float64(atan(Float64(Float64(B * 0.5) / A)) / pi) / 0.005555555555555556);
        	elseif (A <= -3.3e-39)
        		tmp = Float64(atan(Float64(B / Float64(C / -0.5))) / Float64(pi / 180.0));
        	else
        		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi));
        	end
        	return tmp
        end
        
        function tmp_2 = code(A, B, C)
        	tmp = 0.0;
        	if (A <= -1.06e+26)
        		tmp = (atan(((B * 0.5) / A)) / pi) / 0.005555555555555556;
        	elseif (A <= -3.3e-39)
        		tmp = atan((B / (C / -0.5))) / (pi / 180.0);
        	else
        		tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi);
        	end
        	tmp_2 = tmp;
        end
        
        code[A_, B_, C_] := If[LessEqual[A, -1.06e+26], N[(N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] / 0.005555555555555556), $MachinePrecision], If[LessEqual[A, -3.3e-39], N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;A \leq -1.06 \cdot 10^{+26}:\\
        \;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}}{0.005555555555555556}\\
        
        \mathbf{elif}\;A \leq -3.3 \cdot 10^{-39}:\\
        \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\
        
        \mathbf{else}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if A < -1.05999999999999997e26

          1. Initial program 23.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. Simplified52.2%

            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
          4. Add Preprocessing
          5. Taylor expanded in A around -inf

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{1}{2} \cdot B}{A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot B\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. *-lowering-*.f6470.2%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. Simplified70.2%

            \[\leadsto \tan^{-1} \color{blue}{\left(\frac{B \cdot 0.5}{A}\right)} \cdot \frac{180}{\pi} \]
          8. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right) \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
            2. un-div-invN/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right)}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
            3. div-invN/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right)}{\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{1}{180}}} \]
            4. associate-/r*N/A

              \[\leadsto \frac{\frac{\tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right)}{\mathsf{PI}\left(\right)}}{\color{blue}{\frac{1}{180}}} \]
            5. *-lft-identityN/A

              \[\leadsto \frac{\frac{1 \cdot \tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right)}{\mathsf{PI}\left(\right)}}{\frac{1}{180}} \]
            6. associate-*l/N/A

              \[\leadsto \frac{\frac{1}{\mathsf{PI}\left(\right)} \cdot \tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right)}{\frac{\color{blue}{1}}{180}} \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{\mathsf{PI}\left(\right)} \cdot \tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right)\right), \color{blue}{\left(\frac{1}{180}\right)}\right) \]
            8. associate-*l/N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{1 \cdot \tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right)}{\mathsf{PI}\left(\right)}\right), \left(\frac{\color{blue}{1}}{180}\right)\right) \]
            9. *-lft-identityN/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{\tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right)}{\mathsf{PI}\left(\right)}\right), \left(\frac{1}{180}\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right), \mathsf{PI}\left(\right)\right), \left(\frac{\color{blue}{1}}{180}\right)\right) \]
            11. atan-lowering-atan.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{1}{2}}{A}\right)\right), \mathsf{PI}\left(\right)\right), \left(\frac{1}{180}\right)\right) \]
            12. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(B \cdot \frac{1}{2}\right), A\right)\right), \mathsf{PI}\left(\right)\right), \left(\frac{1}{180}\right)\right) \]
            13. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI}\left(\right)\right), \left(\frac{1}{180}\right)\right) \]
            14. PI-lowering-PI.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right), \left(\frac{1}{180}\right)\right) \]
            15. metadata-eval70.3%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{1}{2}\right), A\right)\right), \mathsf{PI.f64}\left(\right)\right), \frac{1}{180}\right) \]
          9. Applied egg-rr70.3%

            \[\leadsto \color{blue}{\frac{\frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}}{0.005555555555555556}} \]

          if -1.05999999999999997e26 < A < -3.29999999999999985e-39

          1. Initial program 24.7%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. Add Preprocessing
          3. Taylor expanded in C around inf

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B} + \frac{-1}{2} \cdot \frac{B}{C}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. mul-1-negN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(A + -1 \cdot A\right)\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. distribute-rgt1-inN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(-1 + 1\right) \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0 \cdot A\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. mul0-lftN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(0\right)}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\left(\frac{0}{B}\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{-1}{2} \cdot \frac{B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \left(\frac{\frac{-1}{2} \cdot B}{C}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot B\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            11. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\left(B \cdot \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            12. *-lowering-*.f6464.1%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(0, B\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \frac{-1}{2}\right), C\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified64.1%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{0}{B} + \frac{B \cdot -0.5}{C}\right)}}{\pi} \]
          6. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
            2. div-invN/A

              \[\leadsto \left(\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \frac{1}{\mathsf{PI}\left(\right)}\right) \cdot 180 \]
            3. associate-*l*N/A

              \[\leadsto \tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \color{blue}{\left(\frac{1}{\mathsf{PI}\left(\right)} \cdot 180\right)} \]
            4. associate-/r/N/A

              \[\leadsto \tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right) \cdot \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
            5. un-div-invN/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right)}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}}} \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{0}{B} + \frac{B \cdot \frac{-1}{2}}{C}\right), \color{blue}{\left(\frac{\mathsf{PI}\left(\right)}{180}\right)}\right) \]
            7. div0N/A

              \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(0 + \frac{B \cdot \frac{-1}{2}}{C}\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
            8. +-lft-identityN/A

              \[\leadsto \mathsf{/.f64}\left(\tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
            9. atan-lowering-atan.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C}\right)\right), \left(\frac{\color{blue}{\mathsf{PI}\left(\right)}}{180}\right)\right) \]
            10. associate-/l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
            11. clear-numN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{1}{\frac{C}{\frac{-1}{2}}}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
            12. un-div-invN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B}{\frac{C}{\frac{-1}{2}}}\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
            13. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \left(\frac{C}{\frac{-1}{2}}\right)\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
            14. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \mathsf{/.f64}\left(C, \frac{-1}{2}\right)\right)\right), \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right) \]
            15. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \mathsf{/.f64}\left(C, \frac{-1}{2}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI}\left(\right), \color{blue}{180}\right)\right) \]
            16. PI-lowering-PI.f6464.2%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(B, \mathsf{/.f64}\left(C, \frac{-1}{2}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right) \]
          7. Applied egg-rr64.2%

            \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}} \]

          if -3.29999999999999985e-39 < A

          1. Initial program 69.1%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. Add Preprocessing
          3. Taylor expanded in B around inf

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. associate--r+N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. div-subN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. --lowering--.f6460.5%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified60.5%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} - 1\right)}}{\pi} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification63.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.06 \cdot 10^{+26}:\\ \;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}}{0.005555555555555556}\\ \mathbf{elif}\;A \leq -3.3 \cdot 10^{-39}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 22: 44.8% accurate, 3.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -6.5 \cdot 10^{-138}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-122}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \end{array} \]
        (FPCore (A B C)
         :precision binary64
         (if (<= B -6.5e-138)
           (* (/ 180.0 PI) (atan 1.0))
           (if (<= B 5e-122)
             (* (/ 180.0 PI) (atan (/ 0.0 B)))
             (* (/ 180.0 PI) (atan -1.0)))))
        double code(double A, double B, double C) {
        	double tmp;
        	if (B <= -6.5e-138) {
        		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
        	} else if (B <= 5e-122) {
        		tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
        	} else {
        		tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
        	}
        	return tmp;
        }
        
        public static double code(double A, double B, double C) {
        	double tmp;
        	if (B <= -6.5e-138) {
        		tmp = (180.0 / Math.PI) * Math.atan(1.0);
        	} else if (B <= 5e-122) {
        		tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
        	} else {
        		tmp = (180.0 / Math.PI) * Math.atan(-1.0);
        	}
        	return tmp;
        }
        
        def code(A, B, C):
        	tmp = 0
        	if B <= -6.5e-138:
        		tmp = (180.0 / math.pi) * math.atan(1.0)
        	elif B <= 5e-122:
        		tmp = (180.0 / math.pi) * math.atan((0.0 / B))
        	else:
        		tmp = (180.0 / math.pi) * math.atan(-1.0)
        	return tmp
        
        function code(A, B, C)
        	tmp = 0.0
        	if (B <= -6.5e-138)
        		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
        	elseif (B <= 5e-122)
        		tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B)));
        	else
        		tmp = Float64(Float64(180.0 / pi) * atan(-1.0));
        	end
        	return tmp
        end
        
        function tmp_2 = code(A, B, C)
        	tmp = 0.0;
        	if (B <= -6.5e-138)
        		tmp = (180.0 / pi) * atan(1.0);
        	elseif (B <= 5e-122)
        		tmp = (180.0 / pi) * atan((0.0 / B));
        	else
        		tmp = (180.0 / pi) * atan(-1.0);
        	end
        	tmp_2 = tmp;
        end
        
        code[A_, B_, C_] := If[LessEqual[B, -6.5e-138], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-122], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;B \leq -6.5 \cdot 10^{-138}:\\
        \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
        
        \mathbf{elif}\;B \leq 5 \cdot 10^{-122}:\\
        \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -6.4999999999999999e-138

          1. Initial program 56.2%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
          2. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
            2. associate-*l/N/A

              \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
            3. associate-/l*N/A

              \[\leadsto \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
          3. Simplified73.8%

            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
          4. Add Preprocessing
          5. Taylor expanded in B around -inf

            \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
          6. Step-by-step derivation
            1. Simplified45.0%

              \[\leadsto \tan^{-1} \color{blue}{1} \cdot \frac{180}{\pi} \]

            if -6.4999999999999999e-138 < B < 4.9999999999999999e-122

            1. Initial program 51.0%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
            2. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              2. associate-*l/N/A

                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
              3. associate-/l*N/A

                \[\leadsto \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
            3. Simplified75.3%

              \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
            4. Add Preprocessing
            5. Taylor expanded in C around inf

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-1 \cdot \left(A + -1 \cdot A\right)}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. mul-1-negN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\mathsf{neg}\left(\left(A + -1 \cdot A\right)\right)}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. distribute-rgt1-inN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\mathsf{neg}\left(\left(-1 + 1\right) \cdot A\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(\left(\frac{\mathsf{neg}\left(0 \cdot A\right)}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. mul0-lftN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\mathsf{neg}\left(0\right)}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{0}{B}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. /-lowering-/.f6440.5%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(0, B\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. Simplified40.5%

              \[\leadsto \tan^{-1} \color{blue}{\left(\frac{0}{B}\right)} \cdot \frac{180}{\pi} \]

            if 4.9999999999999999e-122 < B

            1. Initial program 57.2%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
            2. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              2. associate-*l/N/A

                \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
              3. associate-/l*N/A

                \[\leadsto \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
            3. Simplified76.5%

              \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
            4. Add Preprocessing
            5. Taylor expanded in B around inf

              \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. Step-by-step derivation
              1. Simplified53.5%

                \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
            7. Recombined 3 regimes into one program.
            8. Final simplification46.7%

              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.5 \cdot 10^{-138}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-122}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
            9. Add Preprocessing

            Alternative 23: 64.0% accurate, 3.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;A \leq -5.7 \cdot 10^{-58}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \end{array} \]
            (FPCore (A B C)
             :precision binary64
             (if (<= A -5.7e-58)
               (* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
               (* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI))))
            double code(double A, double B, double C) {
            	double tmp;
            	if (A <= -5.7e-58) {
            		tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
            	} else {
            		tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
            	}
            	return tmp;
            }
            
            public static double code(double A, double B, double C) {
            	double tmp;
            	if (A <= -5.7e-58) {
            		tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
            	} else {
            		tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
            	}
            	return tmp;
            }
            
            def code(A, B, C):
            	tmp = 0
            	if A <= -5.7e-58:
            		tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi)
            	else:
            		tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi)
            	return tmp
            
            function code(A, B, C)
            	tmp = 0.0
            	if (A <= -5.7e-58)
            		tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi));
            	else
            		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi));
            	end
            	return tmp
            end
            
            function tmp_2 = code(A, B, C)
            	tmp = 0.0;
            	if (A <= -5.7e-58)
            		tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi);
            	else
            		tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi);
            	end
            	tmp_2 = tmp;
            end
            
            code[A_, B_, C_] := If[LessEqual[A, -5.7e-58], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;A \leq -5.7 \cdot 10^{-58}:\\
            \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
            
            \mathbf{else}:\\
            \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if A < -5.70000000000000032e-58

              1. Initial program 24.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. Simplified54.0%

                \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
              4. Add Preprocessing
              5. Taylor expanded in B around 0

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{B}{C - A}\right)}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. Step-by-step derivation
                1. associate-*r/N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{-1}{2} \cdot B}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                2. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(\frac{B \cdot \frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                3. associate-/l*N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\frac{-1}{2}}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                4. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \frac{\mathsf{neg}\left(\frac{1}{2}\right)}{C - A}\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                5. distribute-neg-fracN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                6. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                7. associate-*r/N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\left(B \cdot \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                9. associate-*r/N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                10. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\mathsf{neg}\left(\frac{\frac{1}{2}}{C - A}\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                11. distribute-neg-frac2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C - A\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                12. sub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(C + \left(\mathsf{neg}\left(A\right)\right)\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                13. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(A\right)\right) + C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                14. distribute-neg-inN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(A\right)\right)\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                15. mul-1-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{-1 \cdot \left(\mathsf{neg}\left(A\right)\right) + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                16. mul-1-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{-1 \cdot \left(-1 \cdot A\right) + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                17. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{\left(-1 \cdot -1\right) \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                18. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{1 \cdot A + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                19. *-lft-identityN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{A + \left(\mathsf{neg}\left(C\right)\right)}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                20. sub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \left(\frac{\frac{1}{2}}{A - C}\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                21. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{1}{2}, \left(A - C\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                22. --lowering--.f6480.5%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. Simplified80.5%

                \[\leadsto \tan^{-1} \color{blue}{\left(B \cdot \frac{0.5}{A - C}\right)} \cdot \frac{180}{\pi} \]

              if -5.70000000000000032e-58 < A

              1. Initial program 69.6%

                \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
              2. Add Preprocessing
              3. Taylor expanded in B around inf

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C}{B} - \left(\frac{A}{B} + 1\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                2. associate--r+N/A

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\left(\frac{C}{B} - \frac{A}{B}\right) - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                3. div-subN/A

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{C - A}{B} - 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                4. --lowering--.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\left(\frac{C - A}{B}\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(C - A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
                6. --lowering--.f6461.0%

                  \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(C, A\right), B\right), 1\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. Simplified61.0%

                \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{C - A}{B} - 1\right)}}{\pi} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification67.2%

              \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -5.7 \cdot 10^{-58}:\\ \;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 24: 40.6% accurate, 3.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq -1.2 \cdot 10^{-307}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \end{array} \]
            (FPCore (A B C)
             :precision binary64
             (if (<= B -1.2e-307)
               (* (/ 180.0 PI) (atan 1.0))
               (* (/ 180.0 PI) (atan -1.0))))
            double code(double A, double B, double C) {
            	double tmp;
            	if (B <= -1.2e-307) {
            		tmp = (180.0 / ((double) M_PI)) * atan(1.0);
            	} else {
            		tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
            	}
            	return tmp;
            }
            
            public static double code(double A, double B, double C) {
            	double tmp;
            	if (B <= -1.2e-307) {
            		tmp = (180.0 / Math.PI) * Math.atan(1.0);
            	} else {
            		tmp = (180.0 / Math.PI) * Math.atan(-1.0);
            	}
            	return tmp;
            }
            
            def code(A, B, C):
            	tmp = 0
            	if B <= -1.2e-307:
            		tmp = (180.0 / math.pi) * math.atan(1.0)
            	else:
            		tmp = (180.0 / math.pi) * math.atan(-1.0)
            	return tmp
            
            function code(A, B, C)
            	tmp = 0.0
            	if (B <= -1.2e-307)
            		tmp = Float64(Float64(180.0 / pi) * atan(1.0));
            	else
            		tmp = Float64(Float64(180.0 / pi) * atan(-1.0));
            	end
            	return tmp
            end
            
            function tmp_2 = code(A, B, C)
            	tmp = 0.0;
            	if (B <= -1.2e-307)
            		tmp = (180.0 / pi) * atan(1.0);
            	else
            		tmp = (180.0 / pi) * atan(-1.0);
            	end
            	tmp_2 = tmp;
            end
            
            code[A_, B_, C_] := If[LessEqual[B, -1.2e-307], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;B \leq -1.2 \cdot 10^{-307}:\\
            \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if B < -1.20000000000000009e-307

              1. Initial program 54.6%

                \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
              2. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                2. associate-*l/N/A

                  \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
                3. associate-/l*N/A

                  \[\leadsto \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
              3. Simplified73.5%

                \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
              4. Add Preprocessing
              5. Taylor expanded in B around -inf

                \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. Step-by-step derivation
                1. Simplified36.6%

                  \[\leadsto \tan^{-1} \color{blue}{1} \cdot \frac{180}{\pi} \]

                if -1.20000000000000009e-307 < B

                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. Simplified77.0%

                  \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
                4. Add Preprocessing
                5. Taylor expanded in 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. Simplified42.9%

                    \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
                7. Recombined 2 regimes into one program.
                8. Final simplification39.4%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.2 \cdot 10^{-307}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\ \end{array} \]
                9. Add Preprocessing

                Alternative 25: 21.6% accurate, 4.0× speedup?

                \[\begin{array}{l} \\ \frac{180}{\pi} \cdot \tan^{-1} -1 \end{array} \]
                (FPCore (A B C) :precision binary64 (* (/ 180.0 PI) (atan -1.0)))
                double code(double A, double B, double C) {
                	return (180.0 / ((double) M_PI)) * atan(-1.0);
                }
                
                public static double code(double A, double B, double C) {
                	return (180.0 / Math.PI) * Math.atan(-1.0);
                }
                
                def code(A, B, C):
                	return (180.0 / math.pi) * math.atan(-1.0)
                
                function code(A, B, C)
                	return Float64(Float64(180.0 / pi) * atan(-1.0))
                end
                
                function tmp = code(A, B, C)
                	tmp = (180.0 / pi) * atan(-1.0);
                end
                
                code[A_, B_, C_] := N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \frac{180}{\pi} \cdot \tan^{-1} -1
                \end{array}
                
                Derivation
                1. Initial program 55.2%

                  \[180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi} \]
                2. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
                  2. associate-*l/N/A

                    \[\leadsto \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot 180}{\color{blue}{\mathsf{PI}\left(\right)}} \]
                  3. associate-/l*N/A

                    \[\leadsto \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right) \cdot \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \]
                  4. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
                3. Simplified75.1%

                  \[\leadsto \color{blue}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}} \]
                4. Add Preprocessing
                5. Taylor expanded in B around inf

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\color{blue}{-1}\right), \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right) \]
                6. Step-by-step derivation
                  1. Simplified20.3%

                    \[\leadsto \tan^{-1} \color{blue}{-1} \cdot \frac{180}{\pi} \]
                  2. Final simplification20.3%

                    \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} -1 \]
                  3. Add Preprocessing

                  Reproduce

                  ?
                  herbie shell --seed 2024164 
                  (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)))