?

Average Error: 29.0 → 11.8
Time: 23.8s
Precision: binary64
Cost: 20164

?

\[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} \mathbf{if}\;A \leq -1.15 \cdot 10^{+79}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} + 1\right)\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi \cdot 0.005555555555555556}\\ \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
 (if (<= A -1.15e+79)
   (/ (* 180.0 (atan (* 0.5 (* (/ B A) (+ (/ C A) 1.0))))) PI)
   (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) (* PI 0.005555555555555556))))
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 tmp;
	if (A <= -1.15e+79) {
		tmp = (180.0 * atan((0.5 * ((B / A) * ((C / A) + 1.0))))) / ((double) M_PI);
	} else {
		tmp = atan((((C - A) - hypot(B, (A - C))) / B)) / (((double) M_PI) * 0.005555555555555556);
	}
	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 tmp;
	if (A <= -1.15e+79) {
		tmp = (180.0 * Math.atan((0.5 * ((B / A) * ((C / A) + 1.0))))) / Math.PI;
	} else {
		tmp = Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / (Math.PI * 0.005555555555555556);
	}
	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):
	tmp = 0
	if A <= -1.15e+79:
		tmp = (180.0 * math.atan((0.5 * ((B / A) * ((C / A) + 1.0))))) / math.pi
	else:
		tmp = math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / (math.pi * 0.005555555555555556)
	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)
	tmp = 0.0
	if (A <= -1.15e+79)
		tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) + 1.0))))) / pi);
	else
		tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / Float64(pi * 0.005555555555555556));
	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)
	tmp = 0.0;
	if (A <= -1.15e+79)
		tmp = (180.0 * atan((0.5 * ((B / A) * ((C / A) + 1.0))))) / pi;
	else
		tmp = atan((((C - A) - hypot(B, (A - C))) / B)) / (pi * 0.005555555555555556);
	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_] := If[LessEqual[A, -1.15e+79], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $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}
\mathbf{if}\;A \leq -1.15 \cdot 10^{+79}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} + 1\right)\right)\right)}{\pi}\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. if A < -1.15e79

    1. Initial program 51.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. Simplified51.4

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

      [Start]51.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} \]

      associate-*r/ [=>]51.4

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

      sub-neg [=>]51.4

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

      sub-neg [<=]51.4

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

      unpow2 [=>]51.4

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

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

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

      [Start]18.5

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

      distribute-lft-out [=>]18.5

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

      +-commutative [=>]18.5

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

      *-commutative [=>]18.5

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

      associate-/l* [=>]16.8

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

      unpow2 [=>]16.8

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

      associate-/l* [=>]16.6

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

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

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

      [Start]16.9

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

      *-commutative [=>]16.9

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

      +-commutative [=>]16.9

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

      unpow2 [=>]16.9

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

      distribute-lft-in [=>]16.9

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

      associate-*r/ [=>]18.6

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

      +-commutative [=>]18.6

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

      *-commutative [<=]18.6

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

      associate-*l/ [=>]18.5

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

      associate-*r/ [<=]18.5

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

      metadata-eval [<=]18.5

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

      cancel-sign-sub-inv [<=]18.5

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

      times-frac [=>]16.2

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

      *-commutative [<=]16.2

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

      distribute-rgt-out-- [=>]16.2

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

    if -1.15e79 < A

    1. Initial program 24.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. Simplified10.8

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

      [Start]24.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} \]

      associate-*r/ [=>]24.0

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

      associate-*l/ [<=]24.0

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

      *-commutative [=>]24.0

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

      associate-*l/ [=>]24.0

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

      *-lft-identity [=>]24.0

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

      +-commutative [=>]24.0

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

      unpow2 [=>]24.0

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

      unpow2 [=>]24.0

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

      hypot-def [=>]10.8

      \[ \tan^{-1} \left(\frac{\left(C - A\right) - \color{blue}{\mathsf{hypot}\left(B, A - C\right)}}{B}\right) \cdot \frac{180}{\pi} \]
    3. Applied egg-rr11.0

      \[\leadsto \color{blue}{\frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi \cdot 0.005555555555555556}} \]
    4. Simplified10.8

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

      [Start]11.0

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

      associate--r+ [=>]10.8

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.15 \cdot 10^{+79}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} + 1\right)\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi \cdot 0.005555555555555556}\\ \end{array} \]

Alternatives

Alternative 1
Error11.9
Cost20164
\[\begin{array}{l} \mathbf{if}\;A \leq -1.85 \cdot 10^{+70}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} + 1\right)\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right) \cdot \frac{180}{\pi}\\ \end{array} \]
Alternative 2
Error25.2
Cost14616
\[\begin{array}{l} t_0 := \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi \cdot 0.005555555555555556}\\ t_1 := \frac{C - A}{B}\\ \mathbf{if}\;B \leq -6.5 \cdot 10^{+104}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \left(2 + t_1\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.9 \cdot 10^{+79}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\ \mathbf{elif}\;B \leq -0.2:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -2.65 \cdot 10^{-104}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} + 1\right)\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq -1.45 \cdot 10^{-200}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-72}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{\frac{A}{\frac{C}{A}}}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\pi} \cdot \frac{\tan^{-1} \left(-1 + t_1\right)}{0.005555555555555556}\\ \end{array} \]
Alternative 3
Error35.2
Cost14500
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ t_2 := \frac{180 \cdot \tan^{-1} 1}{\pi}\\ t_3 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \mathbf{if}\;B \leq -6.5 \cdot 10^{+106}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -2.4 \cdot 10^{+79}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -0.00094:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -2.7 \cdot 10^{-160}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -7.5 \cdot 10^{-198}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;B \leq -3.05 \cdot 10^{-294}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 4 \cdot 10^{-130}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 3.35 \cdot 10^{-34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{+46}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 4
Error25.0
Cost14488
\[\begin{array}{l} t_0 := \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi \cdot 0.005555555555555556}\\ t_1 := \frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} + 1\right)\right)\right)}{\pi}\\ t_2 := \frac{C - A}{B}\\ \mathbf{if}\;B \leq -6.5 \cdot 10^{+104}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \left(2 + t_2\right)\right)}{\pi}\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{+79}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\ \mathbf{elif}\;B \leq -0.00195:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -6.4 \cdot 10^{-104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -9.5 \cdot 10^{-195}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 2.65 \cdot 10^{-73}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\pi} \cdot \frac{\tan^{-1} \left(-1 + t_2\right)}{0.005555555555555556}\\ \end{array} \]
Alternative 5
Error35.0
Cost14236
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ t_1 := \frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{if}\;B \leq -6.5 \cdot 10^{+108}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -9.5 \cdot 10^{+78}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -7.5 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -3.7 \cdot 10^{-103}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-110}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{-296}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{elif}\;B \leq 9 \cdot 10^{+31}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 6
Error35.0
Cost14236
\[\begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ t_1 := \frac{180 \cdot \tan^{-1} 1}{\pi}\\ t_2 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{if}\;B \leq -6.6 \cdot 10^{+104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -2.2 \cdot 10^{+79}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -0.00024:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -1.22 \cdot 10^{-294}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 4 \cdot 10^{-126}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-37}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 2 \cdot 10^{+31}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 7
Error26.5
Cost14228
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -5.6 \cdot 10^{-65}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -5.6 \cdot 10^{-197}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -7.6 \cdot 10^{-288}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-102}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.02 \cdot 10^{-47}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\pi} \cdot \frac{\tan^{-1} \left(-1 + \frac{C - A}{B}\right)}{0.005555555555555556}\\ \end{array} \]
Alternative 8
Error26.5
Cost14228
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -2.9 \cdot 10^{-49}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -5.6 \cdot 10^{-197}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -7.6 \cdot 10^{-288}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \left(\frac{B}{C} \cdot \frac{B}{B}\right)\right)\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-102}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.02 \cdot 10^{-47}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\pi} \cdot \frac{\tan^{-1} \left(-1 + \frac{C - A}{B}\right)}{0.005555555555555556}\\ \end{array} \]
Alternative 9
Error28.3
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -1.75 \cdot 10^{-54}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\ \mathbf{elif}\;A \leq -6.2 \cdot 10^{-197}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -7.6 \cdot 10^{-288}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 2.65 \cdot 10^{-102}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.02 \cdot 10^{-47}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.05 \cdot 10^{+39}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \end{array} \]
Alternative 10
Error28.3
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -6.8 \cdot 10^{-52}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -8.2 \cdot 10^{-196}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -7.6 \cdot 10^{-288}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-102}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.02 \cdot 10^{-47}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.8 \cdot 10^{+39}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \end{array} \]
Alternative 11
Error28.4
Cost14104
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -4.6 \cdot 10^{-60}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -6.2 \cdot 10^{-197}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -7.6 \cdot 10^{-288}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.6 \cdot 10^{-102}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.3 \cdot 10^{-47}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;A \leq 1.12 \cdot 10^{+38}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\ \end{array} \]
Alternative 12
Error26.5
Cost14100
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -1.75 \cdot 10^{-54}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -8 \cdot 10^{-197}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -7.5 \cdot 10^{-288}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-102}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.02 \cdot 10^{-47}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)\\ \end{array} \]
Alternative 13
Error26.5
Cost14100
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -3.5 \cdot 10^{-57}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -9.8 \cdot 10^{-197}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -7.6 \cdot 10^{-288}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-102}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.02 \cdot 10^{-47}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(-1 + \frac{C - A}{B}\right)}{\pi \cdot 0.005555555555555556}\\ \end{array} \]
Alternative 14
Error26.5
Cost14100
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -2.85 \cdot 10^{-49}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -2.9 \cdot 10^{-196}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -7.6 \cdot 10^{-288}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-102}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.02 \cdot 10^{-47}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C - A}{B}\right)}{\pi}\\ \end{array} \]
Alternative 15
Error27.0
Cost13972
\[\begin{array}{l} t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\ \mathbf{if}\;A \leq -2.7 \cdot 10^{-49}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi \cdot 0.005555555555555556}\\ \mathbf{elif}\;A \leq -5.6 \cdot 10^{-197}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -7.6 \cdot 10^{-288}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\ \mathbf{elif}\;A \leq 3.9 \cdot 10^{-102}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 1.02 \cdot 10^{-47}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi \cdot 0.005555555555555556}\\ \end{array} \]
Alternative 16
Error35.4
Cost13320
\[\begin{array}{l} \mathbf{if}\;B \leq -3.3 \cdot 10^{-61}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{elif}\;B \leq 1.55 \cdot 10^{-150}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 17
Error38.5
Cost13188
\[\begin{array}{l} \mathbf{if}\;B \leq -1.26 \cdot 10^{-306}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} -1}{\pi}\\ \end{array} \]
Alternative 18
Error50.6
Cost13056
\[\frac{180 \cdot \tan^{-1} -1}{\pi} \]

Error

Reproduce?

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