?

Average Error: 29.2 → 23.3
Time: 22.8s
Precision: binary64
Cost: 93772

?

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

\mathbf{elif}\;t_1 \leq 4 \cdot 10^{-24}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C} + 0\right)}{\pi}\\

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

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 4 regimes
  2. if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -1

    1. Initial program 26.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. Taylor expanded in B around inf 16.2

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

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

      [Start]16.2

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

      rational_best-simplify-17 [=>]16.2

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

      rational_best-simplify-49 [=>]16.2

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

      rational_best-simplify-53 [<=]15.5

      \[ 180 \cdot \frac{\tan^{-1} \left(-1 + \color{blue}{\frac{C - A}{B}}\right)}{\pi} \]
    4. Applied egg-rr15.5

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

    if -1 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 3.99999999999999969e-24

    1. Initial program 46.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. Taylor expanded in C around inf 45.0

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

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

      [Start]45.0

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

      rational_best-simplify-2 [=>]45.0

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

      rational_best-simplify-13 [<=]45.0

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

      rational_best-simplify-2 [=>]45.0

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

      rational_best-simplify-2 [=>]45.0

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

      rational_best-simplify-12 [=>]45.0

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

      rational_best-simplify-9 [=>]45.0

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

      rational_best-simplify-48 [=>]45.0

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

      rational_best-simplify-6 [<=]45.0

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

      rational_best-simplify-2 [=>]45.0

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

      rational_best-simplify-13 [<=]45.0

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

      rational_best-simplify-26 [=>]45.0

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

      rational_best-simplify-28 [<=]45.0

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

      rational_best-simplify-6 [=>]45.0

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

      rational_best-simplify-7 [=>]45.0

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

      rational_best-simplify-48 [<=]45.0

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

      metadata-eval [<=]45.0

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

      rational_best-simplify-52 [<=]45.0

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

      rational_best-simplify-7 [=>]45.0

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

      metadata-eval [=>]45.0

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

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

    if 3.99999999999999969e-24 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 5.0000000000000002e280

    1. Initial program 1.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. Applied egg-rr1.8

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

    if 5.0000000000000002e280 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))

    1. Initial program 36.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. Taylor expanded in B around -inf 38.6

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \leq -1:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{elif}\;\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \leq 4 \cdot 10^{-24}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C} + 0\right)}{\pi}\\ \mathbf{elif}\;\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \leq 5 \cdot 10^{+280}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}} - C\right)}{-B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \end{array} \]

Alternatives

Alternative 1
Error24.2
Cost33616
\[\begin{array}{l} t_0 := 180 \cdot \left(\left(\frac{\tan^{-1} \left(\frac{A + \sqrt{{B}^{2} + {A}^{2}}}{-B}\right)}{\pi} + 1\right) + -1\right)\\ \mathbf{if}\;B \leq -6 \cdot 10^{+149}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.5 \cdot 10^{-241}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -5 \cdot 10^{-291}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + C \cdot \frac{B}{{A}^{2}}\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq 10^{-230}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C - A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 2
Error24.6
Cost33096
\[\begin{array}{l} \mathbf{if}\;B \leq -4.2 \cdot 10^{+148}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4.5 \cdot 10^{-237}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \sqrt{{B}^{2} + {A}^{2}}}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.05 \cdot 10^{-183}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + C \cdot \frac{B}{{A}^{2}}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C - A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 3
Error25.8
Cost20556
\[\begin{array}{l} t_0 := \tan^{-1} \left(-1 + \frac{C - A}{B}\right)\\ \mathbf{if}\;B \leq -9.5 \cdot 10^{-19}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -5.5 \cdot 10^{-251}:\\ \;\;\;\;180 \cdot \frac{t_0}{\pi}\\ \mathbf{elif}\;B \leq 1.75 \cdot 10^{-181}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + C \cdot \frac{B}{{A}^{2}}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot t_0}{\pi}\\ \end{array} \]
Alternative 4
Error33.8
Cost14040
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{-B}\right)}{\pi}\\ \mathbf{if}\;B \leq -3.3 \cdot 10^{-49}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.7 \cdot 10^{-233}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -9 \cdot 10^{-295}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-275}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 3.6 \cdot 10^{-212}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 4.9 \cdot 10^{-51}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 5
Error33.7
Cost14040
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -7.6 \cdot 10^{-50}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.05 \cdot 10^{-234}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -5 \cdot 10^{-299}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-274}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-150}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.7 \cdot 10^{-49}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 6
Error33.7
Cost14040
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -7.6 \cdot 10^{-49}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.15 \cdot 10^{-234}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(A \cdot \frac{-2}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -4.3 \cdot 10^{-297}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-274}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.9 \cdot 10^{-149}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2 \cdot 10^{-49}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 7
Error31.1
Cost13972
\[\begin{array}{l} \mathbf{if}\;B \leq -7.6 \cdot 10^{-50}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.45 \cdot 10^{-230}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(A \cdot \frac{-2}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -3.4 \cdot 10^{-296}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-272}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-193}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 8
Error25.7
Cost13836
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C - A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -2.2 \cdot 10^{-16}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -2.25 \cdot 10^{-254}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -1.75 \cdot 10^{-293}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{-B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 9
Error25.7
Cost13836
\[\begin{array}{l} t_0 := \tan^{-1} \left(-1 + \frac{C - A}{B}\right)\\ \mathbf{if}\;B \leq -1.32 \cdot 10^{-17}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -1.15 \cdot 10^{-253}:\\ \;\;\;\;180 \cdot \frac{t_0}{\pi}\\ \mathbf{elif}\;B \leq -2.25 \cdot 10^{-296}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{-B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot t_0}{\pi}\\ \end{array} \]
Alternative 10
Error33.5
Cost13712
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -1.55 \cdot 10^{-19}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -6.8 \cdot 10^{-253}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-232}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{-B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.15 \cdot 10^{-54}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 11
Error33.7
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -8.4 \cdot 10^{-19}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 5.4 \cdot 10^{-58}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 12
Error38.2
Cost13188
\[\begin{array}{l} \mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 13
Error50.4
Cost13056
\[180 \cdot \frac{\tan^{-1} -1}{\pi} \]

Error

Reproduce?

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