ABCF->ab-angle angle

Percentage Accurate: 53.4% → 77.7%
Time: 18.4s
Alternatives: 14
Speedup: 2.0×

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 14 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: 53.4% 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: 77.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
180 \cdot \frac{{\left(t\_0 + 1\right)}^{2} + -1}{t\_0 + 2}
\end{array}
\end{array}
Derivation
  1. Initial program 54.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. Applied egg-rr75.3%

    \[\leadsto 180 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)} - 1\right)} \]
  4. Step-by-step derivation
    1. flip--75.3%

      \[\leadsto 180 \cdot \color{blue}{\frac{e^{\mathsf{log1p}\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)} \cdot e^{\mathsf{log1p}\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)} - 1 \cdot 1}{e^{\mathsf{log1p}\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)} + 1}} \]
  5. Applied egg-rr71.8%

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

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

    \[\leadsto 180 \cdot \frac{{\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi} + 1\right)}^{2} + -1}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi} + 2} \]
  8. Add Preprocessing

Alternative 2: 77.7% accurate, 1.0× speedup?

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

\\
180 \cdot \left(-1 + e^{\mathsf{log1p}\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)}\right)
\end{array}
Derivation
  1. Initial program 54.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. Applied egg-rr75.3%

    \[\leadsto 180 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)} - 1\right)} \]
  4. Final simplification75.3%

    \[\leadsto 180 \cdot \left(-1 + e^{\mathsf{log1p}\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)}\right) \]
  5. Add Preprocessing

Alternative 3: 73.7% accurate, 1.9× speedup?

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

\\
180 \cdot \left(-1 + \left(1 + \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}{\pi}\right)\right)
\end{array}
Derivation
  1. Initial program 54.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. Applied egg-rr75.3%

    \[\leadsto 180 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)} - 1\right)} \]
  4. Step-by-step derivation
    1. sub-neg75.3%

      \[\leadsto 180 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)} + \left(-1\right)\right)} \]
    2. log1p-udef75.3%

      \[\leadsto 180 \cdot \left(e^{\color{blue}{\log \left(1 + \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)}} + \left(-1\right)\right) \]
    3. rem-exp-log75.3%

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

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

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

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

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

Alternative 4: 73.0% accurate, 2.0× speedup?

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

\\
180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}
\end{array}
Derivation
  1. Initial program 54.4%

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

      \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}} \]
    2. Add Preprocessing
    3. Final simplification70.7%

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

    Alternative 5: 63.3% accurate, 2.0× speedup?

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}{B}\right)}}{\pi} \]
      2. mul-1-neg45.6%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-\left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}}{B}\right)}{\pi} \]
      3. +-commutative45.6%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \sqrt{\color{blue}{{B}^{2} + {A}^{2}}}\right)}{B}\right)}{\pi} \]
      4. unpow245.6%

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-\left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)}}{\pi} \]
    8. Final simplification60.7%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi} \]
    9. Add Preprocessing

    Alternative 6: 63.3% accurate, 2.0× speedup?

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}{B}\right)}}{\pi} \]
      2. mul-1-neg45.6%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-\left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}}{B}\right)}{\pi} \]
      3. +-commutative45.6%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \sqrt{\color{blue}{{B}^{2} + {A}^{2}}}\right)}{B}\right)}{\pi} \]
      4. unpow245.6%

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-\left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)}}{\pi} \]
    8. Step-by-step derivation
      1. expm1-log1p-u32.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)}{\pi}\right)\right)} \]
      2. expm1-udef32.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)}{\pi}\right)} - 1} \]
      3. distribute-frac-neg32.9%

        \[\leadsto e^{\mathsf{log1p}\left(180 \cdot \frac{\tan^{-1} \color{blue}{\left(-\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}}{\pi}\right)} - 1 \]
      4. atan-neg32.9%

        \[\leadsto e^{\mathsf{log1p}\left(180 \cdot \frac{\color{blue}{-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}}{\pi}\right)} - 1 \]
    9. Applied egg-rr32.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(180 \cdot \frac{-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def32.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(180 \cdot \frac{-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\right)\right)} \]
      2. expm1-log1p60.7%

        \[\leadsto \color{blue}{180 \cdot \frac{-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}} \]
      3. associate-*r/60.7%

        \[\leadsto \color{blue}{\frac{180 \cdot \left(-\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)\right)}{\pi}} \]
      4. distribute-rgt-neg-out60.7%

        \[\leadsto \frac{\color{blue}{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}}{\pi} \]
      5. distribute-lft-neg-in60.7%

        \[\leadsto \frac{\color{blue}{\left(-180\right) \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}}{\pi} \]
      6. metadata-eval60.7%

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

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

        \[\leadsto \frac{-180 \cdot \tan^{-1} \left(\frac{A + \sqrt{\color{blue}{{B}^{2}} + A \cdot A}}{B}\right)}{\pi} \]
      9. unpow245.6%

        \[\leadsto \frac{-180 \cdot \tan^{-1} \left(\frac{A + \sqrt{{B}^{2} + \color{blue}{{A}^{2}}}}{B}\right)}{\pi} \]
      10. +-commutative45.6%

        \[\leadsto \frac{-180 \cdot \tan^{-1} \left(\frac{A + \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}}{B}\right)}{\pi} \]
      11. unpow245.6%

        \[\leadsto \frac{-180 \cdot \tan^{-1} \left(\frac{A + \sqrt{\color{blue}{A \cdot A} + {B}^{2}}}{B}\right)}{\pi} \]
      12. unpow245.6%

        \[\leadsto \frac{-180 \cdot \tan^{-1} \left(\frac{A + \sqrt{A \cdot A + \color{blue}{B \cdot B}}}{B}\right)}{\pi} \]
      13. hypot-def60.7%

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

      \[\leadsto \color{blue}{\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}} \]
    12. Final simplification60.7%

      \[\leadsto \frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi} \]
    13. Add Preprocessing

    Alternative 7: 39.2% accurate, 3.7× speedup?

    \[\begin{array}{l} \\ 180 \cdot \left(-1 + \left(1 + \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\right)\right) \end{array} \]
    (FPCore (A B C)
     :precision binary64
     (* 180.0 (+ -1.0 (+ 1.0 (/ (atan (/ (- C B) B)) PI)))))
    double code(double A, double B, double C) {
    	return 180.0 * (-1.0 + (1.0 + (atan(((C - B) / B)) / ((double) M_PI))));
    }
    
    public static double code(double A, double B, double C) {
    	return 180.0 * (-1.0 + (1.0 + (Math.atan(((C - B) / B)) / Math.PI)));
    }
    
    def code(A, B, C):
    	return 180.0 * (-1.0 + (1.0 + (math.atan(((C - B) / B)) / math.pi)))
    
    function code(A, B, C)
    	return Float64(180.0 * Float64(-1.0 + Float64(1.0 + Float64(atan(Float64(Float64(C - B) / B)) / pi))))
    end
    
    function tmp = code(A, B, C)
    	tmp = 180.0 * (-1.0 + (1.0 + (atan(((C - B) / B)) / pi)));
    end
    
    code[A_, B_, C_] := N[(180.0 * N[(-1.0 + N[(1.0 + N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    180 \cdot \left(-1 + \left(1 + \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 54.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. Applied egg-rr75.3%

      \[\leadsto 180 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)} - 1\right)} \]
    4. Step-by-step derivation
      1. sub-neg75.3%

        \[\leadsto 180 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)} + \left(-1\right)\right)} \]
      2. log1p-udef75.3%

        \[\leadsto 180 \cdot \left(e^{\color{blue}{\log \left(1 + \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)}} + \left(-1\right)\right) \]
      3. rem-exp-log75.3%

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

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

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

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

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

      \[\leadsto 180 \cdot \left(-1 + \left(1 + \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\right)\right) \]
    8. Add Preprocessing

    Alternative 8: 50.3% accurate, 3.7× speedup?

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

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

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - B\right) - A\right)\right)}{\pi} \]
    9. Add Preprocessing

    Alternative 9: 39.0% accurate, 3.8× speedup?

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1 \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}{B}\right)}}{\pi} \]
      2. mul-1-neg45.6%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-\left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}}{B}\right)}{\pi} \]
      3. +-commutative45.6%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \sqrt{\color{blue}{{B}^{2} + {A}^{2}}}\right)}{B}\right)}{\pi} \]
      4. unpow245.6%

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-\color{blue}{\left(A + B\right)}}{B}\right)}{\pi} \]
    9. Final simplification40.4%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi} \]
    10. Add Preprocessing

    Alternative 10: 23.0% accurate, 3.8× speedup?

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi} \]
    7. Add Preprocessing

    Alternative 11: 38.5% accurate, 3.8× speedup?

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi} \]
    8. Add Preprocessing

    Alternative 12: 22.8% accurate, 3.9× speedup?

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-1 \cdot \frac{A}{B}\right)}}{\pi} \]
    7. Step-by-step derivation
      1. associate-*r/25.2%

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi} \]
    10. Add Preprocessing

    Alternative 13: 23.1% accurate, 3.9× speedup?

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi} \]
    8. Add Preprocessing

    Alternative 14: 21.3% accurate, 4.0× 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 54.4%

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

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

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

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

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

    Reproduce

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