
(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 18 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 (<= A -1.9e+128) (* 180.0 (/ (atan (* 0.5 (/ (* B (+ 1.0 (/ C A))) 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 <= -1.9e+128) {
tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / 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 <= -1.9e+128) {
tmp = 180.0 * (Math.atan((0.5 * ((B * (1.0 + (C / A))) / 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 <= -1.9e+128: tmp = 180.0 * (math.atan((0.5 * ((B * (1.0 + (C / A))) / 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 <= -1.9e+128) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B * Float64(1.0 + Float64(C / A))) / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.9e+128) tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / 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, -1.9e+128], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B * N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.9 \cdot 10^{+128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B \cdot \left(1 + \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.89999999999999995e128Initial program 14.4%
Taylor expanded in A around -inf 77.0%
mul-1-neg77.0%
distribute-neg-frac277.0%
distribute-lft-out77.0%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in B around 0 82.1%
if -1.89999999999999995e128 < A Initial program 62.3%
associate-*l/62.3%
*-lft-identity62.3%
+-commutative62.3%
unpow262.3%
unpow262.3%
hypot-define84.8%
Simplified84.8%
Final simplification84.4%
(FPCore (A B C)
:precision binary64
(if (<= A -2.05e+119)
(* 180.0 (/ (atan (* 0.5 (/ (* B (+ 1.0 (/ C A))) A))) PI))
(if (<= A 1.9e+17)
(* 180.0 (/ (atan (* (/ 1.0 B) (- C (hypot B C)))) PI))
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.05e+119) {
tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / ((double) M_PI));
} else if (A <= 1.9e+17) {
tmp = 180.0 * (atan(((1.0 / B) * (C - hypot(B, C)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.05e+119) {
tmp = 180.0 * (Math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / Math.PI);
} else if (A <= 1.9e+17) {
tmp = 180.0 * (Math.atan(((1.0 / B) * (C - Math.hypot(B, C)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.05e+119: tmp = 180.0 * (math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / math.pi) elif A <= 1.9e+17: tmp = 180.0 * (math.atan(((1.0 / B) * (C - math.hypot(B, C)))) / math.pi) else: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.05e+119) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B * Float64(1.0 + Float64(C / A))) / A))) / pi)); elseif (A <= 1.9e+17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(C - hypot(B, C)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.05e+119) tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / pi); elseif (A <= 1.9e+17) tmp = 180.0 * (atan(((1.0 / B) * (C - hypot(B, C)))) / pi); else tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.05e+119], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B * N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.9e+17], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.05 \cdot 10^{+119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B \cdot \left(1 + \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.9 \cdot 10^{+17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.0499999999999999e119Initial program 16.2%
Taylor expanded in A around -inf 75.8%
mul-1-neg75.8%
distribute-neg-frac275.8%
distribute-lft-out75.8%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in B around 0 80.7%
if -2.0499999999999999e119 < A < 1.9e17Initial program 57.7%
Taylor expanded in A around 0 53.5%
unpow253.5%
unpow253.5%
hypot-define78.3%
Simplified78.3%
if 1.9e17 < A Initial program 74.7%
Taylor expanded in C around 0 74.6%
mul-1-neg74.6%
distribute-neg-frac274.6%
+-commutative74.6%
unpow274.6%
unpow274.6%
hypot-define89.1%
Simplified89.1%
Final simplification81.2%
(FPCore (A B C)
:precision binary64
(if (<= A -1.22e+121)
(* 180.0 (/ (atan (* 0.5 (/ (* B (+ 1.0 (/ C A))) A))) PI))
(if (<= A 1.85e+17)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.22e+121) {
tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / ((double) M_PI));
} else if (A <= 1.85e+17) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.22e+121) {
tmp = 180.0 * (Math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / Math.PI);
} else if (A <= 1.85e+17) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.22e+121: tmp = 180.0 * (math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / math.pi) elif A <= 1.85e+17: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.22e+121) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B * Float64(1.0 + Float64(C / A))) / A))) / pi)); elseif (A <= 1.85e+17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.22e+121) tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / pi); elseif (A <= 1.85e+17) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.22e+121], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B * N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.85e+17], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.22 \cdot 10^{+121}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B \cdot \left(1 + \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.85 \cdot 10^{+17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.22000000000000011e121Initial program 16.2%
Taylor expanded in A around -inf 75.8%
mul-1-neg75.8%
distribute-neg-frac275.8%
distribute-lft-out75.8%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in B around 0 80.7%
if -1.22000000000000011e121 < A < 1.85e17Initial program 57.7%
Taylor expanded in A around 0 53.5%
unpow253.5%
unpow253.5%
hypot-define78.3%
Simplified78.3%
if 1.85e17 < A Initial program 74.7%
Taylor expanded in C around 0 74.6%
mul-1-neg74.6%
distribute-neg-frac274.6%
+-commutative74.6%
unpow274.6%
unpow274.6%
hypot-define89.1%
Simplified89.1%
Final simplification81.2%
(FPCore (A B C)
:precision binary64
(if (<= A -7.4e+118)
(* 180.0 (/ (atan (* 0.5 (/ (* B (+ 1.0 (/ C A))) A))) PI))
(if (<= A 1.35e+35)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.4e+118) {
tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / ((double) M_PI));
} else if (A <= 1.35e+35) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((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 (A <= -7.4e+118) {
tmp = 180.0 * (Math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / Math.PI);
} else if (A <= 1.35e+35) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / 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 A <= -7.4e+118: tmp = 180.0 * (math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / math.pi) elif A <= 1.35e+35: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / 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 (A <= -7.4e+118) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B * Float64(1.0 + Float64(C / A))) / A))) / pi)); elseif (A <= 1.35e+35) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / 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 (A <= -7.4e+118) tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / pi); elseif (A <= 1.35e+35) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.4e+118], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B * N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.35e+35], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.4 \cdot 10^{+118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B \cdot \left(1 + \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.35 \cdot 10^{+35}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\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 A < -7.39999999999999973e118Initial program 16.2%
Taylor expanded in A around -inf 75.8%
mul-1-neg75.8%
distribute-neg-frac275.8%
distribute-lft-out75.8%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in B around 0 80.7%
if -7.39999999999999973e118 < A < 1.35000000000000001e35Initial program 57.7%
Taylor expanded in A around 0 52.9%
unpow252.9%
unpow252.9%
hypot-define78.0%
Simplified78.0%
if 1.35000000000000001e35 < A Initial program 75.3%
Taylor expanded in B around inf 80.1%
Final simplification78.9%
(FPCore (A B C)
:precision binary64
(if (<= A -1.75e+120)
(* 180.0 (/ (atan (* 0.5 (/ (* B (+ 1.0 (/ C A))) A))) PI))
(if (<= A 1.8e+17)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* -180.0 (atan (/ (+ A (hypot B A)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.75e+120) {
tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / ((double) M_PI));
} else if (A <= 1.8e+17) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.75e+120) {
tmp = 180.0 * (Math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / Math.PI);
} else if (A <= 1.8e+17) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (-180.0 * Math.atan(((A + Math.hypot(B, A)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.75e+120: tmp = 180.0 * (math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / math.pi) elif A <= 1.8e+17: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (-180.0 * math.atan(((A + math.hypot(B, A)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.75e+120) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B * Float64(1.0 + Float64(C / A))) / A))) / pi)); elseif (A <= 1.8e+17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(B, A)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.75e+120) tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / pi); elseif (A <= 1.8e+17) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.75e+120], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B * N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.8e+17], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.75 \cdot 10^{+120}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B \cdot \left(1 + \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.8 \cdot 10^{+17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.75000000000000004e120Initial program 16.2%
Taylor expanded in A around -inf 75.8%
mul-1-neg75.8%
distribute-neg-frac275.8%
distribute-lft-out75.8%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in B around 0 80.7%
if -1.75000000000000004e120 < A < 1.8e17Initial program 57.7%
Taylor expanded in A around 0 53.5%
unpow253.5%
unpow253.5%
hypot-define78.3%
Simplified78.3%
if 1.8e17 < A Initial program 74.7%
Taylor expanded in C around 0 74.6%
mul-1-neg74.6%
distribute-neg-frac274.6%
+-commutative74.6%
unpow274.6%
unpow274.6%
hypot-define89.1%
Simplified89.1%
associate-*r/89.0%
distribute-frac-neg289.0%
atan-neg89.0%
Applied egg-rr89.0%
distribute-rgt-neg-out89.0%
distribute-lft-neg-in89.0%
metadata-eval89.0%
Simplified89.0%
Final simplification81.2%
(FPCore (A B C) :precision binary64 (if (<= A -6.2e+120) (* 180.0 (/ (atan (* 0.5 (/ (* B (+ 1.0 (/ C A))) 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 <= -6.2e+120) {
tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / 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 <= -6.2e+120) {
tmp = 180.0 * (Math.atan((0.5 * ((B * (1.0 + (C / A))) / 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 <= -6.2e+120: tmp = 180.0 * (math.atan((0.5 * ((B * (1.0 + (C / A))) / 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 <= -6.2e+120) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B * Float64(1.0 + Float64(C / A))) / 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 <= -6.2e+120) tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / 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, -6.2e+120], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B * N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $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 -6.2 \cdot 10^{+120}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B \cdot \left(1 + \frac{C}{A}\right)}{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 < -6.19999999999999947e120Initial program 16.2%
Taylor expanded in A around -inf 75.8%
mul-1-neg75.8%
distribute-neg-frac275.8%
distribute-lft-out75.8%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in B around 0 80.7%
if -6.19999999999999947e120 < A Initial program 62.4%
Simplified84.5%
Final simplification83.8%
(FPCore (A B C)
:precision binary64
(if (<= C -3.3e-48)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= C -1.4e-113)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= C 4.2e-196)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= C 1.02e-48)
(* 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 <= -3.3e-48) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (C <= -1.4e-113) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (C <= 4.2e-196) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (C <= 1.02e-48) {
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 <= -3.3e-48) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (C <= -1.4e-113) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (C <= 4.2e-196) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (C <= 1.02e-48) {
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 <= -3.3e-48: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif C <= -1.4e-113: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif C <= 4.2e-196: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif C <= 1.02e-48: 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 <= -3.3e-48) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (C <= -1.4e-113) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (C <= 4.2e-196) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (C <= 1.02e-48) 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 <= -3.3e-48) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (C <= -1.4e-113) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (C <= 4.2e-196) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (C <= 1.02e-48) 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, -3.3e-48], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.4e-113], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.2e-196], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.02e-48], 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 -3.3 \cdot 10^{-48}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.4 \cdot 10^{-113}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.2 \cdot 10^{-196}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.02 \cdot 10^{-48}:\\
\;\;\;\;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 < -3.3e-48Initial program 76.6%
Taylor expanded in C around -inf 66.6%
if -3.3e-48 < C < -1.4e-113Initial program 10.0%
Taylor expanded in A around -inf 68.7%
if -1.4e-113 < C < 4.19999999999999977e-196Initial program 64.8%
Taylor expanded in A around inf 36.8%
if 4.19999999999999977e-196 < C < 1.02000000000000005e-48Initial program 55.3%
Taylor expanded in B around -inf 41.1%
if 1.02000000000000005e-48 < C Initial program 22.0%
Taylor expanded in C around inf 62.0%
Taylor expanded in A around inf 62.0%
Final simplification54.7%
(FPCore (A B C)
:precision binary64
(if (<= C -2e+32)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= C 1.8e-167)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(if (<= C 5.4e-52)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 1.32e-48)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2e+32) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (C <= 1.8e-167) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 5.4e-52) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 1.32e-48) {
tmp = 180.0 * (atan(((A / B) * -2.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 <= -2e+32) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (C <= 1.8e-167) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else if (C <= 5.4e-52) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 1.32e-48) {
tmp = 180.0 * (Math.atan(((A / B) * -2.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 <= -2e+32: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif C <= 1.8e-167: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) elif C <= 5.4e-52: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 1.32e-48: tmp = 180.0 * (math.atan(((A / B) * -2.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 <= -2e+32) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (C <= 1.8e-167) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); elseif (C <= 5.4e-52) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 1.32e-48) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.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 <= -2e+32) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (C <= 1.8e-167) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); elseif (C <= 5.4e-52) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 1.32e-48) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2e+32], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.8e-167], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.4e-52], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.32e-48], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $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 -2 \cdot 10^{+32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.8 \cdot 10^{-167}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.4 \cdot 10^{-52}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 1.32 \cdot 10^{-48}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.00000000000000011e32Initial program 78.6%
Taylor expanded in C around -inf 75.4%
if -2.00000000000000011e32 < C < 1.8e-167Initial program 60.7%
Taylor expanded in C around 0 57.2%
mul-1-neg57.2%
distribute-neg-frac257.2%
+-commutative57.2%
unpow257.2%
unpow257.2%
hypot-define77.4%
Simplified77.4%
Taylor expanded in A around 0 55.7%
sub-neg55.7%
metadata-eval55.7%
+-commutative55.7%
mul-1-neg55.7%
unsub-neg55.7%
Simplified55.7%
if 1.8e-167 < C < 5.40000000000000019e-52Initial program 50.2%
Taylor expanded in B around -inf 45.8%
if 5.40000000000000019e-52 < C < 1.32e-48Initial program 100.0%
Taylor expanded in A around inf 100.0%
if 1.32e-48 < C Initial program 20.8%
Taylor expanded in C around inf 62.9%
Taylor expanded in A around inf 62.9%
Final simplification62.0%
(FPCore (A B C)
:precision binary64
(if (<= B -1.2e-43)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.52e-294)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 1.4e-86)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.2e-43) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.52e-294) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 1.4e-86) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((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.2e-43) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.52e-294) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 1.4e-86) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.2e-43: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.52e-294: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 1.4e-86: tmp = 180.0 * (math.atan((0.5 * (B / A))) / 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.2e-43) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.52e-294) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 1.4e-86) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / 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.2e-43) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.52e-294) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 1.4e-86) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.2e-43], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.52e-294], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e-86], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $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.2 \cdot 10^{-43}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.52 \cdot 10^{-294}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.2000000000000001e-43Initial program 52.0%
Taylor expanded in B around -inf 55.8%
if -1.2000000000000001e-43 < B < 1.52000000000000007e-294Initial program 67.3%
Taylor expanded in A around inf 43.8%
if 1.52000000000000007e-294 < B < 1.40000000000000005e-86Initial program 50.3%
Taylor expanded in A around -inf 48.4%
if 1.40000000000000005e-86 < B Initial program 51.2%
Taylor expanded in B around inf 54.2%
Final simplification51.7%
(FPCore (A B C)
:precision binary64
(if (<= B -3.8e-43)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.05e-294)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 4.9e-88)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e-43) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.05e-294) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 4.9e-88) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e-43) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.05e-294) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 4.9e-88) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.8e-43: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.05e-294: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 4.9e-88: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.8e-43) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.05e-294) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 4.9e-88) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / 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 <= -3.8e-43) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.05e-294) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 4.9e-88) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.8e-43], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.05e-294], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.9e-88], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $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 -3.8 \cdot 10^{-43}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{-294}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.9 \cdot 10^{-88}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.7999999999999997e-43Initial program 52.0%
Taylor expanded in B around -inf 55.8%
if -3.7999999999999997e-43 < B < 1.04999999999999992e-294Initial program 67.3%
Taylor expanded in A around inf 43.8%
if 1.04999999999999992e-294 < B < 4.90000000000000028e-88Initial program 50.3%
Taylor expanded in C around inf 35.4%
associate-*r/35.4%
distribute-rgt1-in35.4%
metadata-eval35.4%
mul0-lft35.4%
metadata-eval35.4%
Simplified35.4%
if 4.90000000000000028e-88 < B Initial program 51.2%
Taylor expanded in B around inf 54.2%
Final simplification49.9%
(FPCore (A B C) :precision binary64 (if (<= A -2.4e-92) (* 180.0 (/ (atan (* 0.5 (/ (* B (+ 1.0 (/ C A))) A))) PI)) (* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e-92) {
tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / 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) {
double tmp;
if (A <= -2.4e-92) {
tmp = 180.0 * (Math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / 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 A <= -2.4e-92: tmp = 180.0 * (math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / 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 (A <= -2.4e-92) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B * Float64(1.0 + Float64(C / A))) / 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_2 = code(A, B, C) tmp = 0.0; if (A <= -2.4e-92) tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / pi); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.4e-92], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B * N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.4 \cdot 10^{-92}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B \cdot \left(1 + \frac{C}{A}\right)}{A}\right)}{\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 A < -2.4000000000000001e-92Initial program 30.7%
Taylor expanded in A around -inf 66.2%
mul-1-neg66.2%
distribute-neg-frac266.2%
distribute-lft-out66.2%
associate-/l*68.9%
Simplified68.9%
Taylor expanded in B around 0 68.9%
if -2.4000000000000001e-92 < A Initial program 65.3%
Taylor expanded in B around inf 62.5%
Final simplification64.4%
(FPCore (A B C)
:precision binary64
(if (<= A -4.5e-88)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 3.2e-134)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.5e-88) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 3.2e-134) {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.5e-88) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 3.2e-134) {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.5e-88: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 3.2e-134: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.5e-88) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 3.2e-134) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.5e-88) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 3.2e-134) tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.5e-88], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.2e-134], 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[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.5 \cdot 10^{-88}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.49999999999999991e-88Initial program 30.7%
Taylor expanded in A around -inf 67.5%
if -4.49999999999999991e-88 < A < 3.2000000000000001e-134Initial program 60.2%
Taylor expanded in A around 0 59.3%
unpow259.3%
unpow259.3%
hypot-define84.1%
Simplified84.1%
Taylor expanded in B around inf 49.7%
if 3.2000000000000001e-134 < A Initial program 70.0%
Taylor expanded in C around 0 66.6%
mul-1-neg66.6%
distribute-neg-frac266.6%
+-commutative66.6%
unpow266.6%
unpow266.6%
hypot-define83.6%
Simplified83.6%
Taylor expanded in A around 0 69.0%
sub-neg69.0%
metadata-eval69.0%
+-commutative69.0%
mul-1-neg69.0%
unsub-neg69.0%
Simplified69.0%
Final simplification62.2%
(FPCore (A B C)
:precision binary64
(if (<= A -4.8e-86)
(/ (* 180.0 (atan (/ (* 0.5 B) A))) PI)
(if (<= A 5.5e-134)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.8e-86) {
tmp = (180.0 * atan(((0.5 * B) / A))) / ((double) M_PI);
} else if (A <= 5.5e-134) {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.8e-86) {
tmp = (180.0 * Math.atan(((0.5 * B) / A))) / Math.PI;
} else if (A <= 5.5e-134) {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.8e-86: tmp = (180.0 * math.atan(((0.5 * B) / A))) / math.pi elif A <= 5.5e-134: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.8e-86) tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * B) / A))) / pi); elseif (A <= 5.5e-134) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.8e-86) tmp = (180.0 * atan(((0.5 * B) / A))) / pi; elseif (A <= 5.5e-134) tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.8e-86], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 5.5e-134], 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[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.8 \cdot 10^{-86}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.5 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.80000000000000026e-86Initial program 30.7%
Taylor expanded in A around -inf 67.5%
associate-*r/67.5%
associate-*r/67.5%
Applied egg-rr67.5%
if -4.80000000000000026e-86 < A < 5.5000000000000002e-134Initial program 60.2%
Taylor expanded in A around 0 59.3%
unpow259.3%
unpow259.3%
hypot-define84.1%
Simplified84.1%
Taylor expanded in B around inf 49.7%
if 5.5000000000000002e-134 < A Initial program 70.0%
Taylor expanded in C around 0 66.6%
mul-1-neg66.6%
distribute-neg-frac266.6%
+-commutative66.6%
unpow266.6%
unpow266.6%
hypot-define83.6%
Simplified83.6%
Taylor expanded in A around 0 69.0%
sub-neg69.0%
metadata-eval69.0%
+-commutative69.0%
mul-1-neg69.0%
unsub-neg69.0%
Simplified69.0%
Final simplification62.2%
(FPCore (A B C)
:precision binary64
(if (<= A -2.8e-92)
(/ (* 180.0 (atan (/ (* 0.5 B) A))) PI)
(if (<= A 5e-136)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e-92) {
tmp = (180.0 * atan(((0.5 * B) / A))) / ((double) M_PI);
} else if (A <= 5e-136) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e-92) {
tmp = (180.0 * Math.atan(((0.5 * B) / A))) / Math.PI;
} else if (A <= 5e-136) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.8e-92: tmp = (180.0 * math.atan(((0.5 * B) / A))) / math.pi elif A <= 5e-136: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.8e-92) tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * B) / A))) / pi); elseif (A <= 5e-136) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.8e-92) tmp = (180.0 * atan(((0.5 * B) / A))) / pi; elseif (A <= 5e-136) tmp = (180.0 * atan(((C - B) / B))) / pi; else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.8e-92], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 5e-136], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.8 \cdot 10^{-92}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5 \cdot 10^{-136}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.8e-92Initial program 30.7%
Taylor expanded in A around -inf 67.5%
associate-*r/67.5%
associate-*r/67.5%
Applied egg-rr67.5%
if -2.8e-92 < A < 5.0000000000000002e-136Initial program 60.2%
Taylor expanded in A around 0 59.3%
unpow259.3%
unpow259.3%
hypot-define84.1%
Simplified84.1%
associate-*r/84.1%
associate-*l/84.1%
*-un-lft-identity84.1%
Applied egg-rr84.1%
Taylor expanded in C around 0 49.7%
if 5.0000000000000002e-136 < A Initial program 70.0%
Taylor expanded in C around 0 66.6%
mul-1-neg66.6%
distribute-neg-frac266.6%
+-commutative66.6%
unpow266.6%
unpow266.6%
hypot-define83.6%
Simplified83.6%
Taylor expanded in A around 0 69.0%
sub-neg69.0%
metadata-eval69.0%
+-commutative69.0%
mul-1-neg69.0%
unsub-neg69.0%
Simplified69.0%
Final simplification62.2%
(FPCore (A B C) :precision binary64 (if (<= A -5.2e-88) (/ (* 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) {
double tmp;
if (A <= -5.2e-88) {
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) {
double tmp;
if (A <= -5.2e-88) {
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): tmp = 0 if A <= -5.2e-88: 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) tmp = 0.0 if (A <= -5.2e-88) tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * 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_2 = code(A, B, C) tmp = 0.0; if (A <= -5.2e-88) 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_] := If[LessEqual[A, -5.2e-88], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $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}\;A \leq -5.2 \cdot 10^{-88}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot 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}
\end{array}
if A < -5.20000000000000027e-88Initial program 30.7%
Taylor expanded in A around -inf 67.5%
associate-*r/67.5%
associate-*r/67.5%
Applied egg-rr67.5%
if -5.20000000000000027e-88 < A Initial program 65.3%
Taylor expanded in B around inf 62.5%
Final simplification64.0%
(FPCore (A B C)
:precision binary64
(if (<= B -5.3e-107)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.5e-88)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.3e-107) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.5e-88) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.3e-107) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.5e-88) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.3e-107: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.5e-88: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.3e-107) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.5e-88) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / 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 <= -5.3e-107) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.5e-88) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.3e-107], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.5e-88], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $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 -5.3 \cdot 10^{-107}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{-88}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.3e-107Initial program 54.1%
Taylor expanded in B around -inf 52.1%
if -5.3e-107 < B < 3.5000000000000001e-88Initial program 59.1%
Taylor expanded in C around inf 29.2%
associate-*r/29.2%
distribute-rgt1-in29.2%
metadata-eval29.2%
mul0-lft29.2%
metadata-eval29.2%
Simplified29.2%
if 3.5000000000000001e-88 < B Initial program 51.2%
Taylor expanded in B around inf 54.2%
Final simplification45.8%
(FPCore (A B C) :precision binary64 (if (<= B -1e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-310) {
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 <= -1e-310) {
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 <= -1e-310: 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 <= -1e-310) 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 <= -1e-310) 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, -1e-310], 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 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.999999999999969e-311Initial program 57.5%
Taylor expanded in B around -inf 39.5%
if -9.999999999999969e-311 < B Initial program 51.7%
Taylor expanded in B around inf 41.7%
Final simplification40.6%
(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 54.6%
Taylor expanded in B around inf 21.5%
Final simplification21.5%
herbie shell --seed 2024078
(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)))