
(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:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(FPCore (A B C) :precision binary64 (if (<= C 3.5e+79) (/ (* 180.0 (atan (/ (- (- C A) (hypot B (- A C))) B))) PI) (* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 3.5e+79) {
tmp = (180.0 * atan((((C - A) - hypot(B, (A - C))) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 3.5e+79) {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot(B, (A - C))) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 3.5e+79: tmp = (180.0 * math.atan((((C - A) - math.hypot(B, (A - C))) / B))) / math.pi else: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 3.5e+79) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 3.5e+79) tmp = (180.0 * atan((((C - A) - hypot(B, (A - C))) / B))) / pi; else tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 3.5e+79], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 3.5 \cdot 10^{+79}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 3.4999999999999998e79Initial program 63.4%
associate-*r/63.4%
Applied egg-rr83.0%
if 3.4999999999999998e79 < C Initial program 23.5%
+-commutative23.5%
unpow223.5%
unpow223.5%
hypot-undefine50.4%
sub-neg50.4%
distribute-lft-in24.7%
Applied egg-rr24.7%
Taylor expanded in C around inf 79.0%
distribute-lft-out79.0%
associate-/l*80.9%
Simplified80.9%
(FPCore (A B C)
:precision binary64
(if (<= C -19000000000000.0)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(if (<= C 3.5e+79)
(/ (* 180.0 (atan (/ (+ A (hypot A B)) (- B)))) PI)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -19000000000000.0) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else if (C <= 3.5e+79) {
tmp = (180.0 * atan(((A + hypot(A, B)) / -B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -19000000000000.0) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else if (C <= 3.5e+79) {
tmp = (180.0 * Math.atan(((A + Math.hypot(A, B)) / -B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -19000000000000.0: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi elif C <= 3.5e+79: tmp = (180.0 * math.atan(((A + math.hypot(A, B)) / -B))) / math.pi else: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -19000000000000.0) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); elseif (C <= 3.5e+79) tmp = Float64(Float64(180.0 * atan(Float64(Float64(A + hypot(A, B)) / Float64(-B)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -19000000000000.0) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; elseif (C <= 3.5e+79) tmp = (180.0 * atan(((A + hypot(A, B)) / -B))) / pi; else tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -19000000000000.0], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 3.5e+79], N[(N[(180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -19000000000000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.5 \cdot 10^{+79}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.9e13Initial program 72.9%
associate-*r/72.9%
Applied egg-rr90.7%
Taylor expanded in A around 0 71.3%
+-commutative71.3%
unpow271.3%
unpow271.3%
hypot-define86.0%
Simplified86.0%
if -1.9e13 < C < 3.4999999999999998e79Initial program 59.7%
associate-*r/59.7%
Applied egg-rr80.0%
Taylor expanded in C around 0 57.7%
mul-1-neg57.7%
distribute-neg-frac257.7%
unpow257.7%
unpow257.7%
hypot-define78.1%
Simplified78.1%
if 3.4999999999999998e79 < C Initial program 23.5%
+-commutative23.5%
unpow223.5%
unpow223.5%
hypot-undefine50.4%
sub-neg50.4%
distribute-lft-in24.7%
Applied egg-rr24.7%
Taylor expanded in C around inf 79.0%
distribute-lft-out79.0%
associate-/l*80.9%
Simplified80.9%
(FPCore (A B C)
:precision binary64
(if (<= C -5200000.0)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(if (<= C 3.4e+79)
(* 180.0 (/ (atan (/ (+ A (hypot A B)) (- B))) PI))
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5200000.0) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else if (C <= 3.4e+79) {
tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -5200000.0) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else if (C <= 3.4e+79) {
tmp = 180.0 * (Math.atan(((A + Math.hypot(A, B)) / -B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -5200000.0: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi elif C <= 3.4e+79: tmp = 180.0 * (math.atan(((A + math.hypot(A, B)) / -B)) / math.pi) else: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -5200000.0) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); elseif (C <= 3.4e+79) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(-B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -5200000.0) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; elseif (C <= 3.4e+79) tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / pi); else tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -5200000.0], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 3.4e+79], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5200000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.4 \cdot 10^{+79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.2e6Initial program 72.9%
associate-*r/72.9%
Applied egg-rr90.7%
Taylor expanded in A around 0 71.3%
+-commutative71.3%
unpow271.3%
unpow271.3%
hypot-define86.0%
Simplified86.0%
if -5.2e6 < C < 3.40000000000000032e79Initial program 59.7%
Taylor expanded in C around 0 57.7%
associate-*r/57.7%
mul-1-neg57.7%
unpow257.7%
unpow257.7%
hypot-define78.0%
Simplified78.0%
if 3.40000000000000032e79 < C Initial program 23.5%
+-commutative23.5%
unpow223.5%
unpow223.5%
hypot-undefine50.4%
sub-neg50.4%
distribute-lft-in24.7%
Applied egg-rr24.7%
Taylor expanded in C around inf 79.0%
distribute-lft-out79.0%
associate-/l*80.9%
Simplified80.9%
Final simplification80.4%
(FPCore (A B C)
:precision binary64
(if (<= A -7.8e+81)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 2.3e+57)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(if (<= A 3.4e+91)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI))
(* 180.0 (+ (+ 1.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) -1.0))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.8e+81) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 2.3e+57) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else if (A <= 3.4e+91) {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
} else {
tmp = 180.0 * ((1.0 + (atan((1.0 + ((C - A) / B))) / ((double) M_PI))) + -1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.8e+81) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 2.3e+57) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else if (A <= 3.4e+91) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
} else {
tmp = 180.0 * ((1.0 + (Math.atan((1.0 + ((C - A) / B))) / Math.PI)) + -1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.8e+81: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 2.3e+57: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) elif A <= 3.4e+91: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) else: tmp = 180.0 * ((1.0 + (math.atan((1.0 + ((C - A) / B))) / math.pi)) + -1.0) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.8e+81) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 2.3e+57) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); elseif (A <= 3.4e+91) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); else tmp = Float64(180.0 * Float64(Float64(1.0 + Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) + -1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.8e+81) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 2.3e+57) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); elseif (A <= 3.4e+91) tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); else tmp = 180.0 * ((1.0 + (atan((1.0 + ((C - A) / B))) / pi)) + -1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.8e+81], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.3e+57], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.4e+91], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[(1.0 + N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.8 \cdot 10^{+81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.3 \cdot 10^{+57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.4 \cdot 10^{+91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \left(\left(1 + \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\right) + -1\right)\\
\end{array}
\end{array}
if A < -7.8000000000000002e81Initial program 26.4%
Taylor expanded in A around -inf 73.3%
associate-*r/73.3%
Simplified73.3%
if -7.8000000000000002e81 < A < 2.2999999999999999e57Initial program 62.0%
Taylor expanded in A around 0 59.0%
+-commutative59.0%
unpow259.0%
unpow259.0%
hypot-define80.6%
Simplified80.6%
if 2.2999999999999999e57 < A < 3.4000000000000001e91Initial program 32.7%
+-commutative32.7%
unpow232.7%
unpow232.7%
hypot-undefine43.7%
sub-neg43.7%
distribute-lft-in33.7%
Applied egg-rr33.7%
Taylor expanded in C around inf 99.7%
distribute-lft-out99.7%
associate-/l*99.7%
Simplified99.7%
if 3.4000000000000001e91 < A Initial program 85.7%
*-commutative85.7%
associate--l-85.7%
+-commutative85.7%
unpow285.7%
unpow285.7%
hypot-undefine95.0%
div-inv95.0%
expm1-log1p-u95.0%
expm1-undefine95.1%
Applied egg-rr95.1%
Taylor expanded in A around -inf 85.7%
+-commutative85.7%
mul-1-neg85.7%
sub-neg85.7%
unpow285.7%
mul-1-neg85.7%
sub-neg85.7%
unpow285.7%
hypot-define95.1%
Simplified95.1%
Taylor expanded in B around -inf 91.2%
associate--l+91.2%
div-sub91.2%
Simplified91.2%
Final simplification81.5%
(FPCore (A B C) :precision binary64 (if (<= C 3.5e+79) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 3.5e+79) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 3.5e+79) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 3.5e+79: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 3.5e+79) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 3.5e+79) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 3.5e+79], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 3.5 \cdot 10^{+79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 3.4999999999999998e79Initial program 63.4%
associate-*l/63.4%
*-lft-identity63.4%
+-commutative63.4%
unpow263.4%
unpow263.4%
hypot-define83.0%
Simplified83.0%
if 3.4999999999999998e79 < C Initial program 23.5%
+-commutative23.5%
unpow223.5%
unpow223.5%
hypot-undefine50.4%
sub-neg50.4%
distribute-lft-in24.7%
Applied egg-rr24.7%
Taylor expanded in C around inf 79.0%
distribute-lft-out79.0%
associate-/l*80.9%
Simplified80.9%
(FPCore (A B C) :precision binary64 (if (<= A -4.7e+81) (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.7e+81) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.7e+81) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.7e+81: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.7e+81) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.7e+81) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.7e+81], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.7 \cdot 10^{+81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.7000000000000002e81Initial program 26.4%
Taylor expanded in A around -inf 73.3%
associate-*r/73.3%
Simplified73.3%
if -4.7000000000000002e81 < A Initial program 65.2%
Simplified83.7%
Final simplification81.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -3.2e-55)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.3e-195)
t_0
(if (<= B 1.65e-228)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 2.45e-34) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -3.2e-55) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.3e-195) {
tmp = t_0;
} else if (B <= 1.65e-228) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 2.45e-34) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -3.2e-55) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.3e-195) {
tmp = t_0;
} else if (B <= 1.65e-228) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 2.45e-34) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -3.2e-55: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.3e-195: tmp = t_0 elif B <= 1.65e-228: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 2.45e-34: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -3.2e-55) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.3e-195) tmp = t_0; elseif (B <= 1.65e-228) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 2.45e-34) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -3.2e-55) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.3e-195) tmp = t_0; elseif (B <= 1.65e-228) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 2.45e-34) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.2e-55], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.3e-195], t$95$0, If[LessEqual[B, 1.65e-228], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2.45e-34], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -3.2 \cdot 10^{-55}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.3 \cdot 10^{-195}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.65 \cdot 10^{-228}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 2.45 \cdot 10^{-34}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.2000000000000001e-55Initial program 50.3%
Taylor expanded in B around -inf 61.1%
if -3.2000000000000001e-55 < B < -1.3000000000000001e-195 or 1.65000000000000003e-228 < B < 2.44999999999999981e-34Initial program 64.9%
+-commutative64.9%
unpow264.9%
unpow264.9%
hypot-undefine68.4%
sub-neg68.4%
distribute-lft-in64.3%
Applied egg-rr64.3%
Taylor expanded in C around 0 62.0%
mul-1-neg62.0%
associate-*l/62.0%
*-lft-identity62.0%
distribute-neg-frac262.0%
unpow262.0%
unpow262.0%
hypot-define63.8%
Simplified63.8%
Taylor expanded in C around inf 43.0%
if -1.3000000000000001e-195 < B < 1.65000000000000003e-228Initial program 53.0%
associate-*r/53.0%
Applied egg-rr91.3%
Taylor expanded in C around inf 62.0%
distribute-rgt1-in62.0%
metadata-eval62.0%
mul0-lft62.0%
div062.0%
metadata-eval62.0%
Simplified62.0%
if 2.44999999999999981e-34 < B Initial program 61.3%
Taylor expanded in B around inf 52.5%
(FPCore (A B C)
:precision binary64
(if (<= B -1.15e-195)
(* 180.0 (+ (+ 1.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) -1.0))
(if (<= B 3.6e-271)
(* 180.0 (+ (+ 1.0 (/ (atan (* -0.5 (/ B (- C A)))) PI)) -1.0))
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.15e-195) {
tmp = 180.0 * ((1.0 + (atan((1.0 + ((C - A) / B))) / ((double) M_PI))) + -1.0);
} else if (B <= 3.6e-271) {
tmp = 180.0 * ((1.0 + (atan((-0.5 * (B / (C - A)))) / ((double) M_PI))) + -1.0);
} 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) {
double tmp;
if (B <= -1.15e-195) {
tmp = 180.0 * ((1.0 + (Math.atan((1.0 + ((C - A) / B))) / Math.PI)) + -1.0);
} else if (B <= 3.6e-271) {
tmp = 180.0 * ((1.0 + (Math.atan((-0.5 * (B / (C - A)))) / Math.PI)) + -1.0);
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.15e-195: tmp = 180.0 * ((1.0 + (math.atan((1.0 + ((C - A) / B))) / math.pi)) + -1.0) elif B <= 3.6e-271: tmp = 180.0 * ((1.0 + (math.atan((-0.5 * (B / (C - A)))) / math.pi)) + -1.0) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.15e-195) tmp = Float64(180.0 * Float64(Float64(1.0 + Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) + -1.0)); elseif (B <= 3.6e-271) tmp = Float64(180.0 * Float64(Float64(1.0 + Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / pi)) + -1.0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.15e-195) tmp = 180.0 * ((1.0 + (atan((1.0 + ((C - A) / B))) / pi)) + -1.0); elseif (B <= 3.6e-271) tmp = 180.0 * ((1.0 + (atan((-0.5 * (B / (C - A)))) / pi)) + -1.0); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.15e-195], N[(180.0 * N[(N[(1.0 + N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.6e-271], N[(180.0 * N[(N[(1.0 + N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision] + -1.0), $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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.15 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \left(\left(1 + \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\right) + -1\right)\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-271}:\\
\;\;\;\;180 \cdot \left(\left(1 + \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi}\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.1500000000000001e-195Initial program 53.9%
*-commutative53.9%
associate--l-53.8%
+-commutative53.8%
unpow253.8%
unpow253.8%
hypot-undefine74.3%
div-inv74.3%
expm1-log1p-u74.3%
expm1-undefine74.4%
Applied egg-rr74.5%
Taylor expanded in A around -inf 53.9%
+-commutative53.9%
mul-1-neg53.9%
sub-neg53.9%
unpow253.9%
mul-1-neg53.9%
sub-neg53.9%
unpow253.9%
hypot-define74.5%
Simplified74.5%
Taylor expanded in B around -inf 72.1%
associate--l+72.1%
div-sub72.1%
Simplified72.1%
if -1.1500000000000001e-195 < B < 3.5999999999999998e-271Initial program 51.6%
*-commutative51.6%
associate--l-36.7%
+-commutative36.7%
unpow236.7%
unpow236.7%
hypot-undefine51.6%
div-inv51.6%
expm1-log1p-u51.6%
expm1-undefine51.6%
Applied egg-rr89.0%
Taylor expanded in A around -inf 51.6%
+-commutative51.6%
mul-1-neg51.6%
sub-neg51.6%
unpow251.6%
mul-1-neg51.6%
sub-neg51.6%
unpow251.6%
hypot-define89.0%
Simplified89.0%
Taylor expanded in B around 0 66.6%
if 3.5999999999999998e-271 < B Initial program 62.0%
Taylor expanded in B around inf 71.1%
Final simplification71.1%
(FPCore (A B C)
:precision binary64
(if (<= B -1.65e-195)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 2.3e-271)
(* 180.0 (+ (+ 1.0 (/ (atan (* -0.5 (/ B (- C A)))) PI)) -1.0))
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.65e-195) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 2.3e-271) {
tmp = 180.0 * ((1.0 + (atan((-0.5 * (B / (C - A)))) / ((double) M_PI))) + -1.0);
} 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) {
double tmp;
if (B <= -1.65e-195) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 2.3e-271) {
tmp = 180.0 * ((1.0 + (Math.atan((-0.5 * (B / (C - A)))) / Math.PI)) + -1.0);
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.65e-195: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 2.3e-271: tmp = 180.0 * ((1.0 + (math.atan((-0.5 * (B / (C - A)))) / math.pi)) + -1.0) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.65e-195) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 2.3e-271) tmp = Float64(180.0 * Float64(Float64(1.0 + Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / pi)) + -1.0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.65e-195) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 2.3e-271) tmp = 180.0 * ((1.0 + (atan((-0.5 * (B / (C - A)))) / pi)) + -1.0); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.65e-195], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.3e-271], N[(180.0 * N[(N[(1.0 + N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision] + -1.0), $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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.65 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{-271}:\\
\;\;\;\;180 \cdot \left(\left(1 + \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi}\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.65e-195Initial program 53.9%
Taylor expanded in B around -inf 72.1%
associate--l+72.1%
div-sub72.1%
Simplified72.1%
if -1.65e-195 < B < 2.30000000000000009e-271Initial program 51.6%
*-commutative51.6%
associate--l-36.7%
+-commutative36.7%
unpow236.7%
unpow236.7%
hypot-undefine51.6%
div-inv51.6%
expm1-log1p-u51.6%
expm1-undefine51.6%
Applied egg-rr89.0%
Taylor expanded in A around -inf 51.6%
+-commutative51.6%
mul-1-neg51.6%
sub-neg51.6%
unpow251.6%
mul-1-neg51.6%
sub-neg51.6%
unpow251.6%
hypot-define89.0%
Simplified89.0%
Taylor expanded in B around 0 66.6%
if 2.30000000000000009e-271 < B Initial program 62.0%
Taylor expanded in B around inf 71.1%
Final simplification71.1%
(FPCore (A B C)
:precision binary64
(if (<= A -1.7e+38)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 3e+58)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= A 1.5e+91)
(* 180.0 (/ (atan (* B (/ -0.5 C))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.7e+38) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 3e+58) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (A <= 1.5e+91) {
tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.7e+38) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 3e+58) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (A <= 1.5e+91) {
tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.7e+38: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 3e+58: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif A <= 1.5e+91: tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.7e+38) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 3e+58) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (A <= 1.5e+91) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.7e+38) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 3e+58) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (A <= 1.5e+91) tmp = 180.0 * (atan((B * (-0.5 / C))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.7e+38], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3e+58], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.5e+91], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.7 \cdot 10^{+38}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3 \cdot 10^{+58}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.5 \cdot 10^{+91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.69999999999999998e38Initial program 29.8%
Taylor expanded in A around -inf 70.1%
associate-*r/70.1%
Simplified70.1%
if -1.69999999999999998e38 < A < 3.0000000000000002e58Initial program 63.5%
associate-*r/63.5%
Applied egg-rr85.3%
Taylor expanded in A around 0 60.2%
+-commutative60.2%
unpow260.2%
unpow260.2%
hypot-define82.2%
Simplified82.2%
Taylor expanded in B around -inf 55.2%
if 3.0000000000000002e58 < A < 1.50000000000000003e91Initial program 25.3%
Taylor expanded in C around inf 79.1%
Taylor expanded in B around inf 68.0%
distribute-rgt1-in68.0%
metadata-eval68.0%
mul0-lft68.0%
div079.3%
metadata-eval79.3%
neg-sub079.3%
associate-*r/79.3%
metadata-eval79.3%
distribute-neg-frac79.3%
metadata-eval79.3%
Simplified79.3%
if 1.50000000000000003e91 < A Initial program 85.7%
associate-*l/85.7%
*-lft-identity85.7%
+-commutative85.7%
unpow285.7%
unpow285.7%
hypot-define95.0%
Simplified95.0%
Taylor expanded in A around inf 83.4%
*-commutative83.4%
Simplified83.4%
Final simplification64.2%
(FPCore (A B C)
:precision binary64
(if (<= B -2.1e-57)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.8e-195)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 4.6e-229)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.1e-57) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.8e-195) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 4.6e-229) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.1e-57) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.8e-195) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 4.6e-229) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.1e-57: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.8e-195: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 4.6e-229: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.1e-57) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.8e-195) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 4.6e-229) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.1e-57) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.8e-195) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 4.6e-229) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.1e-57], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.8e-195], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.6e-229], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.1 \cdot 10^{-57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.8 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{-229}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.0999999999999999e-57Initial program 50.3%
Taylor expanded in B around -inf 61.1%
if -2.0999999999999999e-57 < B < -2.80000000000000003e-195Initial program 65.3%
+-commutative65.3%
unpow265.3%
unpow265.3%
hypot-undefine65.7%
sub-neg65.7%
distribute-lft-in65.7%
Applied egg-rr65.7%
Taylor expanded in C around 0 64.8%
mul-1-neg64.8%
associate-*l/64.8%
*-lft-identity64.8%
distribute-neg-frac264.8%
unpow264.8%
unpow264.8%
hypot-define65.1%
Simplified65.1%
Taylor expanded in C around inf 45.1%
if -2.80000000000000003e-195 < B < 4.59999999999999992e-229Initial program 53.0%
associate-*r/53.0%
Applied egg-rr91.3%
Taylor expanded in C around inf 62.0%
distribute-rgt1-in62.0%
metadata-eval62.0%
mul0-lft62.0%
div062.0%
metadata-eval62.0%
Simplified62.0%
if 4.59999999999999992e-229 < B Initial program 62.3%
+-commutative62.3%
unpow262.3%
unpow262.3%
hypot-undefine77.4%
sub-neg77.4%
distribute-lft-in74.9%
Applied egg-rr74.9%
Taylor expanded in C around 0 59.9%
mul-1-neg59.9%
associate-*l/59.9%
*-lft-identity59.9%
distribute-neg-frac259.9%
unpow259.9%
unpow259.9%
hypot-define72.3%
Simplified72.3%
Taylor expanded in A around 0 61.7%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(if (<= B -1.15e-195)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 2.7e-271)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.15e-195) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 2.7e-271) {
tmp = (180.0 * atan(0.0)) / ((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) {
double tmp;
if (B <= -1.15e-195) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 2.7e-271) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.15e-195: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 2.7e-271: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.15e-195) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 2.7e-271) tmp = Float64(Float64(180.0 * atan(0.0)) / 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_2 = code(A, B, C) tmp = 0.0; if (B <= -1.15e-195) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 2.7e-271) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.15e-195], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.7e-271], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.15 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{-271}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.1500000000000001e-195Initial program 53.9%
Taylor expanded in B around -inf 72.1%
associate--l+72.1%
div-sub72.1%
Simplified72.1%
if -1.1500000000000001e-195 < B < 2.6999999999999999e-271Initial program 51.6%
associate-*r/51.6%
Applied egg-rr89.0%
Taylor expanded in C around inf 66.6%
distribute-rgt1-in66.6%
metadata-eval66.6%
mul0-lft66.6%
div066.6%
metadata-eval66.6%
Simplified66.6%
if 2.6999999999999999e-271 < B Initial program 62.0%
Taylor expanded in B around inf 71.1%
Final simplification71.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.15e-195)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 2.4e-271)
(/ (* 180.0 (atan 0.0)) PI)
(/ (* 180.0 (atan (+ t_0 -1.0))) PI)))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.15e-195) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 2.4e-271) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.15e-195) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 2.4e-271) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1.15e-195: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 2.4e-271: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1.15e-195) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 2.4e-271) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1.15e-195) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 2.4e-271) tmp = (180.0 * atan(0.0)) / pi; else tmp = (180.0 * atan((t_0 + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1.15e-195], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-271], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.15 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-271}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.1500000000000001e-195Initial program 53.9%
Taylor expanded in B around -inf 72.1%
associate--l+72.1%
div-sub72.1%
Simplified72.1%
if -1.1500000000000001e-195 < B < 2.4000000000000002e-271Initial program 51.6%
associate-*r/51.6%
Applied egg-rr89.0%
Taylor expanded in C around inf 66.6%
distribute-rgt1-in66.6%
metadata-eval66.6%
mul0-lft66.6%
div066.6%
metadata-eval66.6%
Simplified66.6%
if 2.4000000000000002e-271 < B Initial program 62.0%
associate-*r/62.0%
Applied egg-rr78.9%
Taylor expanded in B around inf 71.1%
+-commutative71.1%
associate--r+71.1%
div-sub71.1%
Simplified71.1%
Final simplification71.1%
(FPCore (A B C)
:precision binary64
(if (<= A -5.1e+27)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 0.00176)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.1e+27) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 0.00176) {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.1e+27) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 0.00176) {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.1e+27: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 0.00176: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.1e+27) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 0.00176) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.1e+27) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 0.00176) tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.1e+27], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 0.00176], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.1 \cdot 10^{+27}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 0.00176:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.1e27Initial program 29.6%
Taylor expanded in A around -inf 69.3%
associate-*r/69.3%
Simplified69.3%
if -5.1e27 < A < 0.00176000000000000006Initial program 61.8%
+-commutative61.8%
unpow261.8%
unpow261.8%
hypot-undefine84.2%
sub-neg84.2%
distribute-lft-in78.7%
Applied egg-rr78.7%
Taylor expanded in C around 0 58.7%
mul-1-neg58.7%
associate-*l/58.7%
*-lft-identity58.7%
distribute-neg-frac258.7%
unpow258.7%
unpow258.7%
hypot-define78.0%
Simplified78.0%
Taylor expanded in A around 0 50.0%
if 0.00176000000000000006 < A Initial program 76.2%
associate-*l/76.2%
*-lft-identity76.2%
+-commutative76.2%
unpow276.2%
unpow276.2%
hypot-define86.5%
Simplified86.5%
Taylor expanded in A around inf 65.4%
*-commutative65.4%
Simplified65.4%
Final simplification58.8%
(FPCore (A B C)
:precision binary64
(if (<= C -4.5e-52)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C 3.1e-86)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.5e-52) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= 3.1e-86) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.5e-52) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= 3.1e-86) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.5e-52: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= 3.1e-86: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.5e-52) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= 3.1e-86) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.5e-52) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= 3.1e-86) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.5e-52], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.1e-86], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.5 \cdot 10^{-52}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.1 \cdot 10^{-86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.5e-52Initial program 71.8%
+-commutative71.8%
unpow271.8%
unpow271.8%
hypot-undefine88.0%
sub-neg88.0%
distribute-lft-in81.7%
Applied egg-rr81.7%
Taylor expanded in C around 0 70.2%
mul-1-neg70.2%
associate-*l/70.2%
*-lft-identity70.2%
distribute-neg-frac270.2%
unpow270.2%
unpow270.2%
hypot-define80.6%
Simplified80.6%
Taylor expanded in C around inf 60.7%
if -4.5e-52 < C < 3.09999999999999989e-86Initial program 62.9%
Taylor expanded in B around -inf 38.0%
if 3.09999999999999989e-86 < C Initial program 30.4%
Taylor expanded in C around inf 63.8%
Taylor expanded in A around inf 63.8%
(FPCore (A B C) :precision binary64 (if (<= A -1.25e+40) (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e+40) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e+40) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.25e+40: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.25e+40) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.25e+40) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.25e+40], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.25 \cdot 10^{+40}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.25000000000000001e40Initial program 29.8%
Taylor expanded in A around -inf 70.1%
associate-*r/70.1%
Simplified70.1%
if -1.25000000000000001e40 < A Initial program 66.3%
Taylor expanded in B around -inf 63.7%
associate--l+63.7%
div-sub63.7%
Simplified63.7%
Final simplification65.3%
(FPCore (A B C)
:precision binary64
(if (<= B -2.4e-195)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.8e-161)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.4e-195) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.8e-161) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.4e-195) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.8e-161) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.4e-195: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.8e-161: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.4e-195) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.8e-161) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.4e-195) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.8e-161) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.4e-195], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.8e-161], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.4 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-161}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.4e-195Initial program 53.9%
Taylor expanded in B around -inf 49.6%
if -2.4e-195 < B < 4.79999999999999998e-161Initial program 56.0%
associate-*r/56.0%
Applied egg-rr88.3%
Taylor expanded in C around inf 51.7%
distribute-rgt1-in51.7%
metadata-eval51.7%
mul0-lft51.7%
div051.7%
metadata-eval51.7%
Simplified51.7%
if 4.79999999999999998e-161 < B Initial program 62.0%
Taylor expanded in B around inf 45.9%
(FPCore (A B C) :precision binary64 (if (<= B -1.05e-290) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e-290) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e-290) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.05e-290: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.05e-290) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.05e-290) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.05e-290], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.05 \cdot 10^{-290}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.0500000000000001e-290Initial program 52.3%
Taylor expanded in B around -inf 44.8%
if -1.0500000000000001e-290 < B Initial program 62.8%
Taylor expanded in B around inf 37.7%
(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}
Initial program 57.0%
Taylor expanded in B around inf 18.1%
herbie shell --seed 2024141
(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)))