ABCF->ab-angle angle

Percentage Accurate: 54.2% → 81.6%
Time: 13.6s
Alternatives: 17
Speedup: 2.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 54.2% 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.6% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 5.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 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{1}{2} \cdot \frac{B}{A}\right)}}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{B \cdot \frac{1}{2}}}{A}\right)}{\mathsf{PI}\left(\right)} \]
      4. lower-*.f6486.9

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{B \cdot \frac{1}{2}}{A}\right)}}} \]
      8. lower-/.f6487.0

        \[\leadsto \frac{180}{\color{blue}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}}} \]
    7. Applied egg-rr87.0%

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

    if -6e176 < A

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\color{blue}{\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)} \]
      11. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
    4. Applied egg-rr63.8%

      \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{\mathsf{fma}\left(A - C, A - C, B \cdot B\right)}}{B}\right)} \]
    5. Step-by-step derivation
      1. lift--.f64N/A

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

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

        \[\leadsto \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \color{blue}{\mathsf{hypot}\left(A - C, B\right)}}{B}\right) \]
    6. Applied egg-rr84.2%

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

Alternative 2: 73.6% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\color{blue}{\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)} \]
      11. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
    4. Applied egg-rr64.2%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{180}{\mathsf{PI}\left(\right)} \cdot \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \]
      8. lower--.f6477.3

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

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

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

    1. Initial program 16.6%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C} - \left(A + -1 \cdot A\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\color{blue}{\left(B \cdot B\right)} \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \]
      12. lower-*.f6430.7

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \cdot 180} \]
      10. lower-*.f6430.7

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot -0.5}{C}\right)}{\pi} \cdot 180} \]
    7. Applied egg-rr60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \cdot \tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right) \]
      15. lower-*.f6460.5

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)} \]
    9. Applied egg-rr60.5%

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

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

    1. Initial program 64.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\color{blue}{\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)} \]
      11. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
    4. Applied egg-rr64.8%

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

      \[\leadsto \frac{180}{\mathsf{PI}\left(\right)} \cdot \tan^{-1} \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)} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

Alternative 3: 73.3% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\color{blue}{\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)} \]
      11. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
    4. Applied egg-rr64.2%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{180}{\mathsf{PI}\left(\right)} \cdot \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \]
      8. lower--.f6477.3

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

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

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

    1. Initial program 16.6%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C} - \left(A + -1 \cdot A\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\color{blue}{\left(B \cdot B\right)} \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \]
      12. lower-*.f6430.7

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \cdot 180} \]
      10. lower-*.f6430.7

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot -0.5}{C}\right)}{\pi} \cdot 180} \]
    7. Applied egg-rr60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \cdot \tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right) \]
      15. lower-*.f6460.5

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)} \]
    9. Applied egg-rr60.5%

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

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

    1. Initial program 64.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\color{blue}{\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)} \]
      11. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
    4. Applied egg-rr64.8%

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

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

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. lower--.f6480.6

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

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

Alternative 4: 73.3% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\color{blue}{\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)} \]
      11. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
    4. Applied egg-rr64.2%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{180}{\mathsf{PI}\left(\right)} \cdot \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \]
      8. lower--.f6477.3

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

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

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

    1. Initial program 16.6%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C} - \left(A + -1 \cdot A\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\color{blue}{\left(B \cdot B\right)} \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \]
      12. lower-*.f6430.7

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \cdot 180} \]
      10. lower-*.f6430.7

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot -0.5}{C}\right)}{\pi} \cdot 180} \]
    7. Applied egg-rr60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \cdot \tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right) \]
      15. lower-*.f6460.5

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)} \]
    9. Applied egg-rr60.5%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. lower--.f6480.6

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

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

Alternative 5: 73.3% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 64.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 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right)}{\mathsf{PI}\left(\right)} \]
      8. lower--.f6477.3

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

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

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

    1. Initial program 16.6%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C} - \left(A + -1 \cdot A\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\color{blue}{\left(B \cdot B\right)} \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \]
      12. lower-*.f6430.7

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \cdot 180} \]
      10. lower-*.f6430.7

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot -0.5}{C}\right)}{\pi} \cdot 180} \]
    7. Applied egg-rr60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \cdot \tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right) \]
      15. lower-*.f6460.5

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)} \]
    9. Applied egg-rr60.5%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. lower--.f6480.6

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

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

Alternative 6: 67.5% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\color{blue}{\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)} \]
      11. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
    4. Applied egg-rr64.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(A\right)\right) - \sqrt{\color{blue}{\mathsf{fma}\left(A, A, {B}^{2}\right)}}}{B}\right)}{\mathsf{PI}\left(\right)} \]
      9. unpow2N/A

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(A\right)\right) - \sqrt{\mathsf{fma}\left(A, A, \color{blue}{B \cdot B}\right)}}{B}\right)}{\mathsf{PI}\left(\right)} \]
      10. lower-*.f6453.4

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(-A\right) - \sqrt{\mathsf{fma}\left(A, A, \color{blue}{B \cdot B}\right)}}{B}\right)}{\pi} \]
    7. Simplified53.4%

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{-1 \cdot A - B}}{B}\right)}{\mathsf{PI}\left(\right)} \]
    9. Step-by-step derivation
      1. lower--.f64N/A

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(A\right)\right)} - B}{B}\right)}{\mathsf{PI}\left(\right)} \]
      3. lower-neg.f6463.0

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

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

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

    1. Initial program 16.6%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C} - \left(A + -1 \cdot A\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\color{blue}{\left(B \cdot B\right)} \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \]
      12. lower-*.f6430.7

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \cdot 180} \]
      10. lower-*.f6430.7

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot -0.5}{C}\right)}{\pi} \cdot 180} \]
    7. Applied egg-rr60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \cdot \tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right) \]
      15. lower-*.f6460.5

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)} \]
    9. Applied egg-rr60.5%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. lower--.f6480.6

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

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

Alternative 7: 62.2% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\color{blue}{\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)} \]
      11. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
    4. Applied egg-rr64.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(A\right)\right) - \sqrt{\color{blue}{\mathsf{fma}\left(A, A, {B}^{2}\right)}}}{B}\right)}{\mathsf{PI}\left(\right)} \]
      9. unpow2N/A

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(A\right)\right) - \sqrt{\mathsf{fma}\left(A, A, \color{blue}{B \cdot B}\right)}}{B}\right)}{\mathsf{PI}\left(\right)} \]
      10. lower-*.f6453.4

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(-A\right) - \sqrt{\mathsf{fma}\left(A, A, \color{blue}{B \cdot B}\right)}}{B}\right)}{\pi} \]
    7. Simplified53.4%

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{-1 \cdot A - B}}{B}\right)}{\mathsf{PI}\left(\right)} \]
    9. Step-by-step derivation
      1. lower--.f64N/A

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\color{blue}{\left(\mathsf{neg}\left(A\right)\right)} - B}{B}\right)}{\mathsf{PI}\left(\right)} \]
      3. lower-neg.f6463.0

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

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

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

    1. Initial program 16.6%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C} - \left(A + -1 \cdot A\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\color{blue}{\left(B \cdot B\right)} \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \]
      12. lower-*.f6430.7

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \cdot 180} \]
      10. lower-*.f6430.7

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot -0.5}{C}\right)}{\pi} \cdot 180} \]
    7. Applied egg-rr60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \cdot \tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right) \]
      15. lower-*.f6460.5

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)} \]
    9. Applied egg-rr60.5%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. lower--.f6480.6

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 - \frac{A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
    7. Step-by-step derivation
      1. lower--.f64N/A

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

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

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

Alternative 8: 73.3% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\color{blue}{\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)} \]
      11. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
    4. Applied egg-rr64.2%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{180}{\mathsf{PI}\left(\right)} \cdot \tan^{-1} \left(\color{blue}{\frac{C - A}{B}} + -1\right) \]
      8. lower--.f6477.3

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

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

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

    1. Initial program 16.6%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C} - \left(A + -1 \cdot A\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\color{blue}{\left(B \cdot B\right)} \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \]
      12. lower-*.f6430.7

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \cdot 180} \]
      10. lower-*.f6430.7

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot -0.5}{C}\right)}{\pi} \cdot 180} \]
    7. Applied egg-rr60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \cdot \tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right) \]
      15. lower-*.f6460.5

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)} \]
    9. Applied egg-rr60.5%

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. lower--.f6480.6

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 59.7% accurate, 2.5× speedup?

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

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

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

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


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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. lower--.f6481.7

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \frac{C}{B}\right)}}{\mathsf{PI}\left(\right)} \]
    7. Step-by-step derivation
      1. lower-+.f64N/A

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

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

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

    if -1.19999999999999992e-62 < C < 1.85e-84

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\color{blue}{\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)} \]
      11. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\color{blue}{\mathsf{PI}\left(\right)}} \]
    4. Applied egg-rr68.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(A\right)\right) - \sqrt{\color{blue}{\mathsf{fma}\left(A, A, {B}^{2}\right)}}}{B}\right)}{\mathsf{PI}\left(\right)} \]
      9. unpow2N/A

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(\mathsf{neg}\left(A\right)\right) - \sqrt{\mathsf{fma}\left(A, A, \color{blue}{B \cdot B}\right)}}{B}\right)}{\mathsf{PI}\left(\right)} \]
      10. lower-*.f6468.1

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{\left(-A\right) - \sqrt{\mathsf{fma}\left(A, A, \color{blue}{B \cdot B}\right)}}{B}\right)}{\pi} \]
    7. Simplified68.1%

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(1 + -1 \cdot \frac{A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

    if 1.85e-84 < C

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \color{blue}{\left(\frac{-1}{2} \cdot \frac{{B}^{2}}{C} - \left(A + -1 \cdot A\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\color{blue}{\left(B \cdot B\right)} \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \]
      12. lower-*.f6445.2

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{1}{B} \cdot \frac{\left(B \cdot B\right) \cdot \frac{-1}{2}}{C}\right)}{\mathsf{PI}\left(\right)} \cdot 180} \]
      10. lower-*.f6445.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{180}{\mathsf{PI}\left(\right)}} \cdot \tan^{-1} \left(\frac{B \cdot \frac{-1}{2}}{C}\right) \]
      15. lower-*.f6458.7

        \[\leadsto \color{blue}{\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)} \]
    9. Applied egg-rr58.7%

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

Alternative 10: 59.9% accurate, 2.5× speedup?

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

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

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

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


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

    1. Initial program 18.7%

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{B \cdot \frac{1}{2}}}{A}\right)}{\mathsf{PI}\left(\right)} \]
      4. lower-*.f6473.8

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

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

    if -9.60000000000000034e74 < A < 2.55e-114

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. lower--.f6449.3

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \frac{C}{B}\right)}}{\mathsf{PI}\left(\right)} \]
    7. Step-by-step derivation
      1. lower-+.f64N/A

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

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

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

    if 2.55e-114 < A

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 - \frac{A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
    7. Step-by-step derivation
      1. lower--.f64N/A

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

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

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

Alternative 11: 52.8% accurate, 2.5× speedup?

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

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

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

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


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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. lower--.f6481.7

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \frac{C}{B}\right)}}{\mathsf{PI}\left(\right)} \]
    7. Step-by-step derivation
      1. lower-+.f64N/A

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

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

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

    if -1.5000000000000001e-62 < C < 1.2e173

    1. Initial program 59.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 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. associate--l+N/A

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 - \frac{A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
    7. Step-by-step derivation
      1. lower--.f64N/A

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

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

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

    if 1.2e173 < C

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. distribute-rgt1-inN/A

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{0}\right)}{\mathsf{PI}\left(\right)} \]
      5. metadata-eval35.6

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
    5. Simplified35.6%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 12: 50.3% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.4 \cdot 10^{+143}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\

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

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


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

    1. Initial program 14.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 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. distribute-rgt1-inN/A

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{0}\right)}{\mathsf{PI}\left(\right)} \]
      5. metadata-eval33.6

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
    5. Simplified33.6%

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

    if -1.39999999999999999e143 < A < 6.00000000000000011e25

    1. Initial program 55.8%

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. lower--.f6450.7

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(1 + \frac{C}{B}\right)}}{\mathsf{PI}\left(\right)} \]
    7. Step-by-step derivation
      1. lower-+.f64N/A

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

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

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

    if 6.00000000000000011e25 < A

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
      5. lower--.f6483.7

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
    7. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{A}{\color{blue}{\mathsf{neg}\left(B\right)}}\right)}{\mathsf{PI}\left(\right)} \]
      6. lower-neg.f6473.0

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

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

Alternative 13: 46.9% accurate, 2.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -9.5000000000000003e33

    1. Initial program 52.3%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{1}}{\mathsf{PI}\left(\right)} \]
    4. Step-by-step derivation
      1. Simplified64.2%

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

      if -9.5000000000000003e33 < B < 2.49999999999999999e-74

      1. Initial program 62.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 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
      4. Step-by-step derivation
        1. associate--l+N/A

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
        5. lower--.f6456.8

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{A}{\color{blue}{\mathsf{neg}\left(B\right)}}\right)}{\mathsf{PI}\left(\right)} \]
        6. lower-neg.f6439.7

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

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

      if 2.49999999999999999e-74 < B

      1. Initial program 60.4%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\mathsf{PI}\left(\right)} \]
      4. Step-by-step derivation
        1. Simplified52.0%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
      5. Recombined 3 regimes into one program.
      6. Add Preprocessing

      Alternative 14: 47.0% accurate, 2.5× speedup?

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

        1. Initial program 58.1%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{1}}{\mathsf{PI}\left(\right)} \]
        4. Step-by-step derivation
          1. Simplified53.3%

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

          if -3.20000000000000004e-118 < B < 1.34999999999999996e-105

          1. Initial program 58.8%

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

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(1 + \color{blue}{\frac{C - A}{B}}\right)}{\mathsf{PI}\left(\right)} \]
            5. lower--.f6453.8

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{C}{B}\right)}}{\mathsf{PI}\left(\right)} \]
          7. Step-by-step derivation
            1. lower-/.f6435.9

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

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

          if 1.34999999999999996e-105 < B

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\mathsf{PI}\left(\right)} \]
          4. Step-by-step derivation
            1. Simplified50.2%

              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
          5. Recombined 3 regimes into one program.
          6. Add Preprocessing

          Alternative 15: 45.1% accurate, 2.8× speedup?

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

            1. Initial program 59.4%

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{1}}{\mathsf{PI}\left(\right)} \]
            4. Step-by-step derivation
              1. Simplified53.0%

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

              if -2.15e-145 < B < 5.40000000000000036e-74

              1. Initial program 57.3%

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
              4. Step-by-step derivation
                1. distribute-rgt1-inN/A

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

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{0}\right)}{\mathsf{PI}\left(\right)} \]
                5. metadata-eval25.4

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
              5. Simplified25.4%

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

              if 5.40000000000000036e-74 < B

              1. Initial program 61.2%

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\mathsf{PI}\left(\right)} \]
              4. Step-by-step derivation
                1. Simplified52.7%

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
              5. Recombined 3 regimes into one program.
              6. Add Preprocessing

              Alternative 16: 28.7% accurate, 2.9× speedup?

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A + -1 \cdot A}{B}\right)}}{\mathsf{PI}\left(\right)} \]
                4. Step-by-step derivation
                  1. distribute-rgt1-inN/A

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

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{0}\right)}{\mathsf{PI}\left(\right)} \]
                  5. metadata-eval13.9

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{0}}{\pi} \]
                5. Simplified13.9%

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

                if 5.40000000000000036e-74 < B

                1. Initial program 61.2%

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\mathsf{PI}\left(\right)} \]
                4. Step-by-step derivation
                  1. Simplified52.7%

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\pi} \]
                5. Recombined 2 regimes into one program.
                6. Add Preprocessing

                Alternative 17: 20.6% accurate, 3.1× speedup?

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{-1}}{\mathsf{PI}\left(\right)} \]
                4. Step-by-step derivation
                  1. Simplified19.6%

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

                  Reproduce

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