?

Average Error: 29.4 → 26.4
Time: 35.4s
Precision: binary64
Cost: 34076

?

\[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 := 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}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{if}\;B \leq -3 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \left(\left(1 + \left(1 - \frac{A}{B}\right)\right) + \frac{C}{B}\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq -9 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-135}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -1.25 \cdot 10^{-198}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -3.6 \cdot 10^{-283}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-270}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-192}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 3.3 \cdot 10^{+60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\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)))
(FPCore (A B C)
 :precision binary64
 (let* ((t_0
         (*
          180.0
          (/
           (atan
            (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
           PI)))
        (t_1 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
   (if (<= B -3e-32)
     (* 180.0 (/ (atan (+ -1.0 (+ (+ 1.0 (- 1.0 (/ A B))) (/ C B)))) PI))
     (if (<= B -9e-63)
       t_1
       (if (<= B -2.05e-135)
         t_0
         (if (<= B -1.25e-198)
           t_1
           (if (<= B -3.6e-283)
             t_0
             (if (<= B 6e-270)
               t_1
               (if (<= B 6.5e-192)
                 t_0
                 (if (<= B 7.2e-58)
                   t_1
                   (if (<= B 3.3e+60)
                     (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
                     (*
                      180.0
                      (/ (atan (- (/ C B) (+ 1.0 (/ A B)))) 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 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
	double t_1 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
	double tmp;
	if (B <= -3e-32) {
		tmp = 180.0 * (atan((-1.0 + ((1.0 + (1.0 - (A / B))) + (C / B)))) / ((double) M_PI));
	} else if (B <= -9e-63) {
		tmp = t_1;
	} else if (B <= -2.05e-135) {
		tmp = t_0;
	} else if (B <= -1.25e-198) {
		tmp = t_1;
	} else if (B <= -3.6e-283) {
		tmp = t_0;
	} else if (B <= 6e-270) {
		tmp = t_1;
	} else if (B <= 6.5e-192) {
		tmp = t_0;
	} else if (B <= 7.2e-58) {
		tmp = t_1;
	} else if (B <= 3.3e+60) {
		tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
	} else {
		tmp = 180.0 * (atan(((C / B) - (1.0 + (A / B)))) / ((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 = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
	double t_1 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
	double tmp;
	if (B <= -3e-32) {
		tmp = 180.0 * (Math.atan((-1.0 + ((1.0 + (1.0 - (A / B))) + (C / B)))) / Math.PI);
	} else if (B <= -9e-63) {
		tmp = t_1;
	} else if (B <= -2.05e-135) {
		tmp = t_0;
	} else if (B <= -1.25e-198) {
		tmp = t_1;
	} else if (B <= -3.6e-283) {
		tmp = t_0;
	} else if (B <= 6e-270) {
		tmp = t_1;
	} else if (B <= 6.5e-192) {
		tmp = t_0;
	} else if (B <= 7.2e-58) {
		tmp = t_1;
	} else if (B <= 3.3e+60) {
		tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
	} else {
		tmp = 180.0 * (Math.atan(((C / B) - (1.0 + (A / B)))) / 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 = 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
	t_1 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi)
	tmp = 0
	if B <= -3e-32:
		tmp = 180.0 * (math.atan((-1.0 + ((1.0 + (1.0 - (A / B))) + (C / B)))) / math.pi)
	elif B <= -9e-63:
		tmp = t_1
	elif B <= -2.05e-135:
		tmp = t_0
	elif B <= -1.25e-198:
		tmp = t_1
	elif B <= -3.6e-283:
		tmp = t_0
	elif B <= 6e-270:
		tmp = t_1
	elif B <= 6.5e-192:
		tmp = t_0
	elif B <= 7.2e-58:
		tmp = t_1
	elif B <= 3.3e+60:
		tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
	else:
		tmp = 180.0 * (math.atan(((C / B) - (1.0 + (A / B)))) / 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 = 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))
	t_1 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi))
	tmp = 0.0
	if (B <= -3e-32)
		tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(Float64(1.0 + Float64(1.0 - Float64(A / B))) + Float64(C / B)))) / pi));
	elseif (B <= -9e-63)
		tmp = t_1;
	elseif (B <= -2.05e-135)
		tmp = t_0;
	elseif (B <= -1.25e-198)
		tmp = t_1;
	elseif (B <= -3.6e-283)
		tmp = t_0;
	elseif (B <= 6e-270)
		tmp = t_1;
	elseif (B <= 6.5e-192)
		tmp = t_0;
	elseif (B <= 7.2e-58)
		tmp = t_1;
	elseif (B <= 3.3e+60)
		tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) - Float64(1.0 + Float64(A / B)))) / 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 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi);
	t_1 = 180.0 * (atan((-0.5 * (B / C))) / pi);
	tmp = 0.0;
	if (B <= -3e-32)
		tmp = 180.0 * (atan((-1.0 + ((1.0 + (1.0 - (A / B))) + (C / B)))) / pi);
	elseif (B <= -9e-63)
		tmp = t_1;
	elseif (B <= -2.05e-135)
		tmp = t_0;
	elseif (B <= -1.25e-198)
		tmp = t_1;
	elseif (B <= -3.6e-283)
		tmp = t_0;
	elseif (B <= 6e-270)
		tmp = t_1;
	elseif (B <= 6.5e-192)
		tmp = t_0;
	elseif (B <= 7.2e-58)
		tmp = t_1;
	elseif (B <= 3.3e+60)
		tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
	else
		tmp = 180.0 * (atan(((C / B) - (1.0 + (A / B)))) / 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[(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]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3e-32], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(N[(1.0 + N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(C / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9e-63], t$95$1, If[LessEqual[B, -2.05e-135], t$95$0, If[LessEqual[B, -1.25e-198], t$95$1, If[LessEqual[B, -3.6e-283], t$95$0, If[LessEqual[B, 6e-270], t$95$1, If[LessEqual[B, 6.5e-192], t$95$0, If[LessEqual[B, 7.2e-58], t$95$1, If[LessEqual[B, 3.3e+60], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] - N[(1.0 + N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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 := 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}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq -3 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \left(\left(1 + \left(1 - \frac{A}{B}\right)\right) + \frac{C}{B}\right)\right)}{\pi}\\

\mathbf{elif}\;B \leq -9 \cdot 10^{-63}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;B \leq -2.05 \cdot 10^{-135}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;B \leq -1.25 \cdot 10^{-198}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;B \leq -3.6 \cdot 10^{-283}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;B \leq 6 \cdot 10^{-270}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;B \leq 6.5 \cdot 10^{-192}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;B \leq 7.2 \cdot 10^{-58}:\\
\;\;\;\;t_1\\

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

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 5 regimes
  2. if B < -3e-32

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

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

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

    if -3e-32 < B < -8.9999999999999999e-63 or -2.05000000000000005e-135 < B < -1.25e-198 or -3.6e-283 < B < 6.00000000000000025e-270 or 6.49999999999999966e-192 < B < 7.20000000000000019e-58

    1. Initial program 27.0

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

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

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

      [Start]53.2

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

      exponential.json-simplify-26 [=>]53.2

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

      metadata-eval [=>]53.2

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

      rational.json-simplify-6 [=>]53.2

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

      rational.json-simplify-1 [=>]53.2

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

      rational.json-simplify-48 [=>]51.3

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

      rational.json-simplify-3 [=>]45.1

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

      rational.json-simplify-4 [=>]45.1

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

      rational.json-simplify-2 [=>]45.1

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

      rational.json-simplify-9 [=>]45.1

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

      rational.json-simplify-2 [=>]45.1

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

      rational.json-simplify-8 [<=]45.1

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

      rational.json-simplify-10 [=>]45.1

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

      rational.json-simplify-31 [=>]45.1

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

      metadata-eval [=>]45.1

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

      rational.json-simplify-10 [<=]45.1

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

      rational.json-simplify-8 [=>]45.1

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

      rational.json-simplify-2 [<=]45.1

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

      rational.json-simplify-2 [=>]45.1

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

      rational.json-simplify-14 [=>]45.1

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

      metadata-eval [=>]45.1

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

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

    if -8.9999999999999999e-63 < B < -2.05000000000000005e-135 or -1.25e-198 < B < -3.6e-283 or 6.00000000000000025e-270 < B < 6.49999999999999966e-192

    1. Initial program 25.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} \]

    if 7.20000000000000019e-58 < B < 3.2999999999999998e60

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

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

    if 3.2999999999999998e60 < B

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \left(\left(1 + \left(1 - \frac{A}{B}\right)\right) + \frac{C}{B}\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq -9 \cdot 10^{-63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-135}:\\ \;\;\;\;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}\\ \mathbf{elif}\;B \leq -1.25 \cdot 10^{-198}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq -3.6 \cdot 10^{-283}:\\ \;\;\;\;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}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-270}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-192}:\\ \;\;\;\;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}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-58}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.3 \cdot 10^{+60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}{\pi}\\ \end{array} \]

Alternatives

Alternative 1
Error27.8
Cost33756
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}{\pi}\\ \mathbf{if}\;B \leq -3 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \left(\left(1 + \left(1 - \frac{A}{B}\right)\right) + \frac{C}{B}\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.3 \cdot 10^{-67}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -5.45 \cdot 10^{-135}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.55 \cdot 10^{-210}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -9.2 \cdot 10^{-279}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 2.35 \cdot 10^{-262}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 3.3 \cdot 10^{-186}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A + \sqrt{{B}^{2} + {A}^{2}}}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.95 \cdot 10^{-57}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 3.15 \cdot 10^{+60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error27.6
Cost14756
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -6.5 \cdot 10^{-29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -1.05 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -2.35 \cdot 10^{-133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -2.5 \cdot 10^{-210}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -9.5 \cdot 10^{-282}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-267}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-179}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 8.8 \cdot 10^{-58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 3.15 \cdot 10^{+60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error27.8
Cost14756
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}{\pi}\\ \mathbf{if}\;B \leq -2.35 \cdot 10^{-32}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \left(\left(1 + \left(1 - \frac{A}{B}\right)\right) + \frac{C}{B}\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq -3.4 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -3.3 \cdot 10^{-133}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -2.95 \cdot 10^{-210}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -1.62 \cdot 10^{-282}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-255}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.55 \cdot 10^{-189}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 5.3 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 3.15 \cdot 10^{+60}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error30.6
Cost14500
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_3 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{if}\;B \leq -4.7 \cdot 10^{-32}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -2.3 \cdot 10^{-64}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -1.02 \cdot 10^{-132}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -6.8 \cdot 10^{-193}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -8.2 \cdot 10^{-240}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;B \leq 1.75 \cdot 10^{-248}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-189}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 4.7 \cdot 10^{-57}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 4800000000:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error27.7
Cost14500
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{C}{B}\right) - \frac{A}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -3 \cdot 10^{-32}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -7 \cdot 10^{-69}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -1.3 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -2.95 \cdot 10^{-210}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -3.8 \cdot 10^{-281}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-267}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 4.5 \cdot 10^{-58}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 5300000000:\\ \;\;\;\;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 6
Error34.9
Cost14236
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{if}\;B \leq -39:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -4.8 \cdot 10^{-191}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -6 \cdot 10^{-240}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 8.8 \cdot 10^{-267}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 3.9 \cdot 10^{-189}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-59}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{+90}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 7
Error32.9
Cost14236
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ t_1 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\ t_2 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\ \mathbf{if}\;B \leq -36:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3 \cdot 10^{-193}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -6 \cdot 10^{-240}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-267}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 4.2 \cdot 10^{-180}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 4.7 \cdot 10^{-57}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 11200000000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error34.5
Cost13972
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -2.3 \cdot 10^{-7}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -3.7 \cdot 10^{-113}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -8 \cdot 10^{-175}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-227}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 4.9 \cdot 10^{+64}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 9
Error34.5
Cost13908
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -3.15 \cdot 10^{-7}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -5.2 \cdot 10^{-114}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -3.7 \cdot 10^{-174}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-226}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{+63}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 10
Error35.0
Cost13840
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\ \mathbf{if}\;B \leq -55:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-257}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 3.3 \cdot 10^{-184}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 4.7 \cdot 10^{+86}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 11
Error34.8
Cost13712
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{if}\;B \leq -7.3 \cdot 10^{-7}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq -7.5 \cdot 10^{-119}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-171}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{0}{B}\right)}{\pi}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-192}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 12
Error34.7
Cost13448
\[\begin{array}{l} \mathbf{if}\;B \leq -2.35 \cdot 10^{-7}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-192}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 13
Error38.1
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 14
Error50.9
Cost13056
\[180 \cdot \frac{\tan^{-1} -1}{\pi} \]

Error

Reproduce?

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