
(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 24 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
(let* ((t_0 (hypot B (- A C)))
(t_1
(/
(* 180.0 (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A)))))))
PI)))
(if (<= A -3.4e+88)
t_1
(if (<= A -2.05e+27)
(* 180.0 (/ (atan (/ (- (- C A) t_0) B)) PI))
(if (<= A -3.9e-8)
t_1
(* (/ 180.0 PI) (atan (/ (- C (+ A t_0)) B))))))))
double code(double A, double B, double C) {
double t_0 = hypot(B, (A - C));
double t_1 = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / ((double) M_PI);
double tmp;
if (A <= -3.4e+88) {
tmp = t_1;
} else if (A <= -2.05e+27) {
tmp = 180.0 * (atan((((C - A) - t_0) / B)) / ((double) M_PI));
} else if (A <= -3.9e-8) {
tmp = t_1;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + t_0)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.hypot(B, (A - C));
double t_1 = (180.0 * Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / Math.PI;
double tmp;
if (A <= -3.4e+88) {
tmp = t_1;
} else if (A <= -2.05e+27) {
tmp = 180.0 * (Math.atan((((C - A) - t_0) / B)) / Math.PI);
} else if (A <= -3.9e-8) {
tmp = t_1;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + t_0)) / B));
}
return tmp;
}
def code(A, B, C): t_0 = math.hypot(B, (A - C)) t_1 = (180.0 * math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / math.pi tmp = 0 if A <= -3.4e+88: tmp = t_1 elif A <= -2.05e+27: tmp = 180.0 * (math.atan((((C - A) - t_0) / B)) / math.pi) elif A <= -3.9e-8: tmp = t_1 else: tmp = (180.0 / math.pi) * math.atan(((C - (A + t_0)) / B)) return tmp
function code(A, B, C) t_0 = hypot(B, Float64(A - C)) t_1 = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A))))))) / pi) tmp = 0.0 if (A <= -3.4e+88) tmp = t_1; elseif (A <= -2.05e+27) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - t_0) / B)) / pi)); elseif (A <= -3.9e-8) tmp = t_1; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + t_0)) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = hypot(B, (A - C)); t_1 = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / pi; tmp = 0.0; if (A <= -3.4e+88) tmp = t_1; elseif (A <= -2.05e+27) tmp = 180.0 * (atan((((C - A) - t_0) / B)) / pi); elseif (A <= -3.9e-8) tmp = t_1; else tmp = (180.0 / pi) * atan(((C - (A + t_0)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[A, -3.4e+88], t$95$1, If[LessEqual[A, -2.05e+27], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - t$95$0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.9e-8], t$95$1, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + t$95$0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(B, A - C\right)\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\mathbf{if}\;A \leq -3.4 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -2.05 \cdot 10^{+27}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - t\_0}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.9 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + t\_0\right)}{B}\right)\\
\end{array}
\end{array}
if A < -3.40000000000000004e88 or -2.0500000000000001e27 < A < -3.89999999999999985e-8Initial program 14.6%
associate-*r/14.6%
associate-*l/14.6%
*-un-lft-identity14.6%
unpow214.6%
unpow214.6%
hypot-define37.1%
Applied egg-rr37.1%
clear-num37.1%
inv-pow37.1%
Applied egg-rr37.1%
unpow-137.1%
associate--l-16.9%
Simplified16.9%
Taylor expanded in A around -inf 84.8%
associate-*r*84.8%
mul-1-neg84.8%
associate-*r/84.8%
*-commutative84.8%
associate-*r/84.8%
metadata-eval84.8%
Simplified84.8%
if -3.40000000000000004e88 < A < -2.0500000000000001e27Initial program 52.4%
associate-*l/52.4%
*-lft-identity52.4%
+-commutative52.4%
unpow252.4%
unpow252.4%
hypot-define74.7%
Simplified74.7%
if -3.89999999999999985e-8 < A Initial program 68.3%
Taylor expanded in B around 0 68.4%
Simplified87.6%
Final simplification86.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (<= t_0 -5e-9)
(/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI)
(if (<= t_0 4e-5)
(/
(* 180.0 (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A)))))))
PI)
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if (t_0 <= -5e-9) {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
} else if (t_0 <= 4e-5) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * 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 t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if (t_0 <= -5e-9) {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
} else if (t_0 <= 4e-5) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * 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): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if t_0 <= -5e-9: tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi elif t_0 <= 4e-5: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * 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) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if (t_0 <= -5e-9) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi); elseif (t_0 <= 4e-5) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * 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) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if (t_0 <= -5e-9) tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; elseif (t_0 <= 4e-5) tmp = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / pi; else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, -5e-9], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 4e-5], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-9}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-5}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\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 (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -5.0000000000000001e-9Initial program 64.4%
associate-*r/64.4%
associate-*l/64.4%
*-un-lft-identity64.4%
unpow264.4%
unpow264.4%
hypot-define88.7%
Applied egg-rr88.7%
if -5.0000000000000001e-9 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 4.00000000000000033e-5Initial program 17.8%
associate-*r/17.8%
associate-*l/17.8%
*-un-lft-identity17.8%
unpow217.8%
unpow217.8%
hypot-define17.8%
Applied egg-rr17.8%
clear-num17.8%
inv-pow17.8%
Applied egg-rr17.8%
unpow-117.8%
associate--l-7.3%
Simplified7.3%
Taylor expanded in A around -inf 74.8%
associate-*r*74.8%
mul-1-neg74.8%
associate-*r/74.8%
*-commutative74.8%
associate-*r/74.8%
metadata-eval74.8%
Simplified74.8%
if 4.00000000000000033e-5 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 62.6%
associate-*l/62.7%
*-lft-identity62.7%
+-commutative62.7%
unpow262.7%
unpow262.7%
hypot-define84.6%
Simplified84.6%
Final simplification85.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (- C (hypot B C)) B))))
(if (<= A -3.6e-7)
(/ (* 180.0 (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A))))))) PI)
(if (<= A 6e-35)
(* (/ 180.0 PI) t_0)
(if (or (<= A 9.5e+96) (not (<= A 9e+132)))
(/ (* 180.0 (atan (/ (+ A (hypot A B)) (- B)))) PI)
(* 180.0 (/ t_0 PI)))))))
double code(double A, double B, double C) {
double t_0 = atan(((C - hypot(B, C)) / B));
double tmp;
if (A <= -3.6e-7) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / ((double) M_PI);
} else if (A <= 6e-35) {
tmp = (180.0 / ((double) M_PI)) * t_0;
} else if ((A <= 9.5e+96) || !(A <= 9e+132)) {
tmp = (180.0 * atan(((A + hypot(A, B)) / -B))) / ((double) M_PI);
} else {
tmp = 180.0 * (t_0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((C - Math.hypot(B, C)) / B));
double tmp;
if (A <= -3.6e-7) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / Math.PI;
} else if (A <= 6e-35) {
tmp = (180.0 / Math.PI) * t_0;
} else if ((A <= 9.5e+96) || !(A <= 9e+132)) {
tmp = (180.0 * Math.atan(((A + Math.hypot(A, B)) / -B))) / Math.PI;
} else {
tmp = 180.0 * (t_0 / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((C - math.hypot(B, C)) / B)) tmp = 0 if A <= -3.6e-7: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / math.pi elif A <= 6e-35: tmp = (180.0 / math.pi) * t_0 elif (A <= 9.5e+96) or not (A <= 9e+132): tmp = (180.0 * math.atan(((A + math.hypot(A, B)) / -B))) / math.pi else: tmp = 180.0 * (t_0 / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(C - hypot(B, C)) / B)) tmp = 0.0 if (A <= -3.6e-7) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A))))))) / pi); elseif (A <= 6e-35) tmp = Float64(Float64(180.0 / pi) * t_0); elseif ((A <= 9.5e+96) || !(A <= 9e+132)) tmp = Float64(Float64(180.0 * atan(Float64(Float64(A + hypot(A, B)) / Float64(-B)))) / pi); else tmp = Float64(180.0 * Float64(t_0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((C - hypot(B, C)) / B)); tmp = 0.0; if (A <= -3.6e-7) tmp = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / pi; elseif (A <= 6e-35) tmp = (180.0 / pi) * t_0; elseif ((A <= 9.5e+96) || ~((A <= 9e+132))) tmp = (180.0 * atan(((A + hypot(A, B)) / -B))) / pi; else tmp = 180.0 * (t_0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -3.6e-7], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 6e-35], N[(N[(180.0 / Pi), $MachinePrecision] * t$95$0), $MachinePrecision], If[Or[LessEqual[A, 9.5e+96], N[Not[LessEqual[A, 9e+132]], $MachinePrecision]], 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[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{if}\;A \leq -3.6 \cdot 10^{-7}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6 \cdot 10^{-35}:\\
\;\;\;\;\frac{180}{\pi} \cdot t\_0\\
\mathbf{elif}\;A \leq 9.5 \cdot 10^{+96} \lor \neg \left(A \leq 9 \cdot 10^{+132}\right):\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\end{array}
\end{array}
if A < -3.59999999999999994e-7Initial program 23.6%
associate-*r/23.6%
associate-*l/23.6%
*-un-lft-identity23.6%
unpow223.6%
unpow223.6%
hypot-define46.1%
Applied egg-rr46.1%
clear-num46.1%
inv-pow46.1%
Applied egg-rr46.1%
unpow-146.1%
associate--l-27.6%
Simplified27.6%
Taylor expanded in A around -inf 76.0%
associate-*r*76.0%
mul-1-neg76.0%
associate-*r/76.0%
*-commutative76.0%
associate-*r/76.0%
metadata-eval76.0%
Simplified76.0%
if -3.59999999999999994e-7 < A < 5.99999999999999978e-35Initial program 65.0%
Taylor expanded in B around 0 65.1%
Simplified82.8%
Taylor expanded in A around 0 62.3%
unpow262.3%
unpow262.3%
hypot-define79.9%
Simplified79.9%
if 5.99999999999999978e-35 < A < 9.50000000000000089e96 or 8.99999999999999944e132 < A Initial program 75.2%
associate-*r/75.2%
associate-*l/75.2%
*-un-lft-identity75.2%
unpow275.2%
unpow275.2%
hypot-define96.7%
Applied egg-rr96.7%
Taylor expanded in C around 0 75.2%
mul-1-neg75.2%
distribute-neg-frac275.2%
unpow275.2%
unpow275.2%
hypot-define93.4%
Simplified93.4%
if 9.50000000000000089e96 < A < 8.99999999999999944e132Initial program 72.3%
Taylor expanded in A around 0 72.3%
unpow272.3%
unpow272.3%
hypot-define100.0%
Simplified100.0%
Final simplification82.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (hypot B (- A C)))
(t_1
(/
(* 180.0 (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A)))))))
PI)))
(if (<= A -1.22e+86)
t_1
(if (<= A -2.15e+27)
(* 180.0 (/ (atan (/ (- (- C A) t_0) B)) PI))
(if (<= A -3.5e-7)
t_1
(* 180.0 (/ (atan (/ (- C (+ A t_0)) B)) PI)))))))
double code(double A, double B, double C) {
double t_0 = hypot(B, (A - C));
double t_1 = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / ((double) M_PI);
double tmp;
if (A <= -1.22e+86) {
tmp = t_1;
} else if (A <= -2.15e+27) {
tmp = 180.0 * (atan((((C - A) - t_0) / B)) / ((double) M_PI));
} else if (A <= -3.5e-7) {
tmp = t_1;
} else {
tmp = 180.0 * (atan(((C - (A + t_0)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.hypot(B, (A - C));
double t_1 = (180.0 * Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / Math.PI;
double tmp;
if (A <= -1.22e+86) {
tmp = t_1;
} else if (A <= -2.15e+27) {
tmp = 180.0 * (Math.atan((((C - A) - t_0) / B)) / Math.PI);
} else if (A <= -3.5e-7) {
tmp = t_1;
} else {
tmp = 180.0 * (Math.atan(((C - (A + t_0)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.hypot(B, (A - C)) t_1 = (180.0 * math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / math.pi tmp = 0 if A <= -1.22e+86: tmp = t_1 elif A <= -2.15e+27: tmp = 180.0 * (math.atan((((C - A) - t_0) / B)) / math.pi) elif A <= -3.5e-7: tmp = t_1 else: tmp = 180.0 * (math.atan(((C - (A + t_0)) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = hypot(B, Float64(A - C)) t_1 = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A))))))) / pi) tmp = 0.0 if (A <= -1.22e+86) tmp = t_1; elseif (A <= -2.15e+27) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - t_0) / B)) / pi)); elseif (A <= -3.5e-7) tmp = t_1; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + t_0)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = hypot(B, (A - C)); t_1 = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / pi; tmp = 0.0; if (A <= -1.22e+86) tmp = t_1; elseif (A <= -2.15e+27) tmp = 180.0 * (atan((((C - A) - t_0) / B)) / pi); elseif (A <= -3.5e-7) tmp = t_1; else tmp = 180.0 * (atan(((C - (A + t_0)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[A, -1.22e+86], t$95$1, If[LessEqual[A, -2.15e+27], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - t$95$0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.5e-7], t$95$1, N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + t$95$0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(B, A - C\right)\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.22 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -2.15 \cdot 10^{+27}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - t\_0}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.5 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + t\_0\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.21999999999999996e86 or -2.15000000000000004e27 < A < -3.49999999999999984e-7Initial program 14.6%
associate-*r/14.6%
associate-*l/14.6%
*-un-lft-identity14.6%
unpow214.6%
unpow214.6%
hypot-define37.1%
Applied egg-rr37.1%
clear-num37.1%
inv-pow37.1%
Applied egg-rr37.1%
unpow-137.1%
associate--l-16.9%
Simplified16.9%
Taylor expanded in A around -inf 84.8%
associate-*r*84.8%
mul-1-neg84.8%
associate-*r/84.8%
*-commutative84.8%
associate-*r/84.8%
metadata-eval84.8%
Simplified84.8%
if -1.21999999999999996e86 < A < -2.15000000000000004e27Initial program 52.4%
associate-*l/52.4%
*-lft-identity52.4%
+-commutative52.4%
unpow252.4%
unpow252.4%
hypot-define74.7%
Simplified74.7%
if -3.49999999999999984e-7 < A Initial program 68.3%
Simplified87.6%
Final simplification86.3%
(FPCore (A B C)
:precision binary64
(if (<= A -7.5e-8)
(/ (* 180.0 (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A))))))) PI)
(if (<= A 4.1e+109)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.5e-8) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / ((double) M_PI);
} else if (A <= 4.1e+109) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.5e-8) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / Math.PI;
} else if (A <= 4.1e+109) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.5e-8: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / math.pi elif A <= 4.1e+109: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.5e-8) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A))))))) / pi); elseif (A <= 4.1e+109) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.5e-8) tmp = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / pi; elseif (A <= 4.1e+109) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.5e-8], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 4.1e+109], 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[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.1 \cdot 10^{+109}:\\
\;\;\;\;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{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.4999999999999997e-8Initial program 23.6%
associate-*r/23.6%
associate-*l/23.6%
*-un-lft-identity23.6%
unpow223.6%
unpow223.6%
hypot-define46.1%
Applied egg-rr46.1%
clear-num46.1%
inv-pow46.1%
Applied egg-rr46.1%
unpow-146.1%
associate--l-27.6%
Simplified27.6%
Taylor expanded in A around -inf 76.0%
associate-*r*76.0%
mul-1-neg76.0%
associate-*r/76.0%
*-commutative76.0%
associate-*r/76.0%
metadata-eval76.0%
Simplified76.0%
if -7.4999999999999997e-8 < A < 4.0999999999999997e109Initial program 65.0%
Taylor expanded in A around 0 59.8%
unpow259.8%
unpow259.8%
hypot-define80.0%
Simplified80.0%
if 4.0999999999999997e109 < A Initial program 83.0%
associate-*r/83.0%
associate-*l/83.0%
*-un-lft-identity83.0%
unpow283.0%
unpow283.0%
hypot-define97.3%
Applied egg-rr97.3%
Taylor expanded in B around inf 86.2%
+-commutative86.2%
associate--r+86.2%
div-sub89.2%
Simplified89.2%
Final simplification80.3%
(FPCore (A B C)
:precision binary64
(if (<= A -1.65e-9)
(/ (* 180.0 (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A))))))) PI)
(if (<= A 1.85e+109)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.65e-9) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / ((double) M_PI);
} else if (A <= 1.85e+109) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.65e-9) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / Math.PI;
} else if (A <= 1.85e+109) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.65e-9: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / math.pi elif A <= 1.85e+109: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.65e-9) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A))))))) / pi); elseif (A <= 1.85e+109) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.65e-9) tmp = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / pi; elseif (A <= 1.85e+109) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.65e-9], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.85e+109], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.65 \cdot 10^{-9}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.85 \cdot 10^{+109}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.65000000000000009e-9Initial program 23.6%
associate-*r/23.6%
associate-*l/23.6%
*-un-lft-identity23.6%
unpow223.6%
unpow223.6%
hypot-define46.1%
Applied egg-rr46.1%
clear-num46.1%
inv-pow46.1%
Applied egg-rr46.1%
unpow-146.1%
associate--l-27.6%
Simplified27.6%
Taylor expanded in A around -inf 76.0%
associate-*r*76.0%
mul-1-neg76.0%
associate-*r/76.0%
*-commutative76.0%
associate-*r/76.0%
metadata-eval76.0%
Simplified76.0%
if -1.65000000000000009e-9 < A < 1.8500000000000001e109Initial program 65.0%
Taylor expanded in B around 0 65.0%
Simplified85.4%
Taylor expanded in A around 0 59.8%
unpow259.8%
unpow259.8%
hypot-define80.1%
Simplified80.1%
if 1.8500000000000001e109 < A Initial program 83.0%
associate-*r/83.0%
associate-*l/83.0%
*-un-lft-identity83.0%
unpow283.0%
unpow283.0%
hypot-define97.3%
Applied egg-rr97.3%
Taylor expanded in B around inf 86.2%
+-commutative86.2%
associate--r+86.2%
div-sub89.2%
Simplified89.2%
Final simplification80.3%
(FPCore (A B C) :precision binary64 (if (<= A -2.9e-9) (/ (* 180.0 (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B 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 <= -2.9e-9) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * 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 <= -2.9e-9) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * 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 <= -2.9e-9: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * 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 <= -2.9e-9) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * 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 <= -2.9e-9) tmp = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * 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, -2.9e-9], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -2.9 \cdot 10^{-9}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\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 < -2.89999999999999991e-9Initial program 23.6%
associate-*r/23.6%
associate-*l/23.6%
*-un-lft-identity23.6%
unpow223.6%
unpow223.6%
hypot-define46.1%
Applied egg-rr46.1%
clear-num46.1%
inv-pow46.1%
Applied egg-rr46.1%
unpow-146.1%
associate--l-27.6%
Simplified27.6%
Taylor expanded in A around -inf 76.0%
associate-*r*76.0%
mul-1-neg76.0%
associate-*r/76.0%
*-commutative76.0%
associate-*r/76.0%
metadata-eval76.0%
Simplified76.0%
if -2.89999999999999991e-9 < A Initial program 68.3%
Simplified87.6%
Final simplification84.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))))
(if (<= B -1.06e-117)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.3e-204)
t_0
(if (<= B 5.6e-198)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 4.4e-159)
t_0
(if (<= B 3.6e-124)
(/ (* 180.0 (atan (/ B A))) PI)
(if (<= B 5.2e-82)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
double tmp;
if (B <= -1.06e-117) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.3e-204) {
tmp = t_0;
} else if (B <= 5.6e-198) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 4.4e-159) {
tmp = t_0;
} else if (B <= 3.6e-124) {
tmp = (180.0 * atan((B / A))) / ((double) M_PI);
} else if (B <= 5.2e-82) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((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 t_0 = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
double tmp;
if (B <= -1.06e-117) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.3e-204) {
tmp = t_0;
} else if (B <= 5.6e-198) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 4.4e-159) {
tmp = t_0;
} else if (B <= 3.6e-124) {
tmp = (180.0 * Math.atan((B / A))) / Math.PI;
} else if (B <= 5.2e-82) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) tmp = 0 if B <= -1.06e-117: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.3e-204: tmp = t_0 elif B <= 5.6e-198: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 4.4e-159: tmp = t_0 elif B <= 3.6e-124: tmp = (180.0 * math.atan((B / A))) / math.pi elif B <= 5.2e-82: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) 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(Float64(A / B) * -2.0)) / pi)) tmp = 0.0 if (B <= -1.06e-117) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.3e-204) tmp = t_0; elseif (B <= 5.6e-198) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 4.4e-159) tmp = t_0; elseif (B <= 3.6e-124) tmp = Float64(Float64(180.0 * atan(Float64(B / A))) / pi); elseif (B <= 5.2e-82) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); 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(((A / B) * -2.0)) / pi); tmp = 0.0; if (B <= -1.06e-117) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.3e-204) tmp = t_0; elseif (B <= 5.6e-198) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 4.4e-159) tmp = t_0; elseif (B <= 3.6e-124) tmp = (180.0 * atan((B / A))) / pi; elseif (B <= 5.2e-82) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); 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[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.06e-117], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.3e-204], t$95$0, If[LessEqual[B, 5.6e-198], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.4e-159], t$95$0, If[LessEqual[B, 3.6e-124], N[(N[(180.0 * N[ArcTan[N[(B / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 5.2e-82], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{if}\;B \leq -1.06 \cdot 10^{-117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.3 \cdot 10^{-204}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 5.6 \cdot 10^{-198}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.4 \cdot 10^{-159}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-124}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-82}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.06000000000000008e-117Initial program 56.1%
Taylor expanded in B around -inf 50.4%
if -1.06000000000000008e-117 < B < -1.29999999999999991e-204 or 5.5999999999999998e-198 < B < 4.4e-159Initial program 73.6%
Taylor expanded in A around inf 51.6%
if -1.29999999999999991e-204 < B < 5.5999999999999998e-198Initial program 48.6%
Taylor expanded in C around inf 45.9%
associate-*r/45.9%
distribute-rgt1-in45.9%
metadata-eval45.9%
mul0-lft45.9%
metadata-eval45.9%
Simplified45.9%
if 4.4e-159 < B < 3.6000000000000001e-124Initial program 51.8%
associate-*r/51.8%
associate-*l/51.8%
*-un-lft-identity51.8%
unpow251.8%
unpow251.8%
hypot-define88.1%
Applied egg-rr88.1%
clear-num88.1%
inv-pow88.1%
Applied egg-rr88.1%
unpow-188.1%
associate--l-51.9%
Simplified51.9%
Taylor expanded in B around inf 41.1%
Taylor expanded in A around inf 71.0%
if 3.6000000000000001e-124 < B < 5.2e-82Initial program 48.8%
Taylor expanded in C around inf 53.5%
Taylor expanded in A around inf 53.5%
if 5.2e-82 < B Initial program 58.2%
Taylor expanded in B around inf 58.0%
Final simplification53.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))))
(if (<= B -2.6e-117)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -6e-205)
t_0
(if (<= B 1e-197)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.1e-158)
t_0
(if (<= B 2.3e-123)
(/ (* 180.0 (atan (/ B A))) PI)
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
double tmp;
if (B <= -2.6e-117) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -6e-205) {
tmp = t_0;
} else if (B <= 1e-197) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.1e-158) {
tmp = t_0;
} else if (B <= 2.3e-123) {
tmp = (180.0 * atan((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 t_0 = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
double tmp;
if (B <= -2.6e-117) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -6e-205) {
tmp = t_0;
} else if (B <= 1e-197) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.1e-158) {
tmp = t_0;
} else if (B <= 2.3e-123) {
tmp = (180.0 * Math.atan((B / A))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) tmp = 0 if B <= -2.6e-117: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -6e-205: tmp = t_0 elif B <= 1e-197: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.1e-158: tmp = t_0 elif B <= 2.3e-123: tmp = (180.0 * math.atan((B / A))) / math.pi 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(Float64(A / B) * -2.0)) / pi)) tmp = 0.0 if (B <= -2.6e-117) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -6e-205) tmp = t_0; elseif (B <= 1e-197) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.1e-158) tmp = t_0; elseif (B <= 2.3e-123) tmp = Float64(Float64(180.0 * atan(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) t_0 = 180.0 * (atan(((A / B) * -2.0)) / pi); tmp = 0.0; if (B <= -2.6e-117) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -6e-205) tmp = t_0; elseif (B <= 1e-197) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.1e-158) tmp = t_0; elseif (B <= 2.3e-123) tmp = (180.0 * atan((B / A))) / pi; 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[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.6e-117], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6e-205], t$95$0, If[LessEqual[B, 1e-197], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.1e-158], t$95$0, If[LessEqual[B, 2.3e-123], N[(N[(180.0 * N[ArcTan[N[(B / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], 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{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{if}\;B \leq -2.6 \cdot 10^{-117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -6 \cdot 10^{-205}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 10^{-197}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-158}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{-123}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.59999999999999983e-117Initial program 56.1%
Taylor expanded in B around -inf 50.4%
if -2.59999999999999983e-117 < B < -6e-205 or 9.9999999999999999e-198 < B < 1.1000000000000001e-158Initial program 73.6%
Taylor expanded in A around inf 51.6%
if -6e-205 < B < 9.9999999999999999e-198Initial program 48.6%
Taylor expanded in C around inf 45.9%
associate-*r/45.9%
distribute-rgt1-in45.9%
metadata-eval45.9%
mul0-lft45.9%
metadata-eval45.9%
Simplified45.9%
if 1.1000000000000001e-158 < B < 2.29999999999999987e-123Initial program 51.8%
associate-*r/51.8%
associate-*l/51.8%
*-un-lft-identity51.8%
unpow251.8%
unpow251.8%
hypot-define88.1%
Applied egg-rr88.1%
clear-num88.1%
inv-pow88.1%
Applied egg-rr88.1%
unpow-188.1%
associate--l-51.9%
Simplified51.9%
Taylor expanded in B around inf 41.1%
Taylor expanded in A around inf 71.0%
if 2.29999999999999987e-123 < B Initial program 57.0%
Taylor expanded in B around inf 52.7%
Final simplification51.4%
(FPCore (A B C)
:precision binary64
(if (<= A -6.4e-65)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (or (<= A -1.3e-183) (not (<= A -1.25e-272)))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e-65) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if ((A <= -1.3e-183) || !(A <= -1.25e-272)) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((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 (A <= -6.4e-65) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if ((A <= -1.3e-183) || !(A <= -1.25e-272)) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.4e-65: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif (A <= -1.3e-183) or not (A <= -1.25e-272): tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / 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 (A <= -6.4e-65) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif ((A <= -1.3e-183) || !(A <= -1.25e-272)) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.4e-65) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif ((A <= -1.3e-183) || ~((A <= -1.25e-272))) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.4e-65], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[A, -1.3e-183], N[Not[LessEqual[A, -1.25e-272]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.4 \cdot 10^{-65}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.3 \cdot 10^{-183} \lor \neg \left(A \leq -1.25 \cdot 10^{-272}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.3999999999999998e-65Initial program 27.0%
associate-*r/27.0%
associate-*l/27.0%
*-un-lft-identity27.0%
unpow227.0%
unpow227.0%
hypot-define48.8%
Applied egg-rr48.8%
Taylor expanded in A around -inf 65.1%
associate-*r/65.1%
*-commutative65.1%
Simplified65.1%
if -6.3999999999999998e-65 < A < -1.2999999999999999e-183 or -1.24999999999999995e-272 < A Initial program 72.6%
Taylor expanded in B around -inf 66.5%
associate--l+66.5%
div-sub67.2%
Simplified67.2%
if -1.2999999999999999e-183 < A < -1.24999999999999995e-272Initial program 44.1%
associate-*r/44.1%
associate-*l/44.2%
*-un-lft-identity44.2%
unpow244.2%
unpow244.2%
hypot-define65.5%
Applied egg-rr65.5%
clear-num65.5%
inv-pow65.5%
Applied egg-rr65.5%
unpow-165.5%
associate--l-65.4%
Simplified65.4%
Taylor expanded in C around inf 54.7%
metadata-eval54.7%
cancel-sign-sub-inv54.7%
distribute-rgt1-in54.7%
metadata-eval54.7%
mul0-lft54.7%
div054.7%
metadata-eval54.7%
neg-sub054.7%
distribute-lft-neg-in54.7%
metadata-eval54.7%
Simplified54.7%
Final simplification65.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (+ 1.0 (/ (- C A) B)))))
(if (<= A -5.8e-64)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (<= A -1.3e-183)
(* 180.0 (/ t_0 PI))
(if (<= A -1.3e-272)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)
(/ (* 180.0 t_0) PI))))))
double code(double A, double B, double C) {
double t_0 = atan((1.0 + ((C - A) / B)));
double tmp;
if (A <= -5.8e-64) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if (A <= -1.3e-183) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -1.3e-272) {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
} else {
tmp = (180.0 * t_0) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((1.0 + ((C - A) / B)));
double tmp;
if (A <= -5.8e-64) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if (A <= -1.3e-183) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -1.3e-272) {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
} else {
tmp = (180.0 * t_0) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((1.0 + ((C - A) / B))) tmp = 0 if A <= -5.8e-64: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif A <= -1.3e-183: tmp = 180.0 * (t_0 / math.pi) elif A <= -1.3e-272: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi else: tmp = (180.0 * t_0) / math.pi return tmp
function code(A, B, C) t_0 = atan(Float64(1.0 + Float64(Float64(C - A) / B))) tmp = 0.0 if (A <= -5.8e-64) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif (A <= -1.3e-183) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -1.3e-272) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); else tmp = Float64(Float64(180.0 * t_0) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((1.0 + ((C - A) / B))); tmp = 0.0; if (A <= -5.8e-64) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif (A <= -1.3e-183) tmp = 180.0 * (t_0 / pi); elseif (A <= -1.3e-272) tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; else tmp = (180.0 * t_0) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -5.8e-64], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -1.3e-183], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.3e-272], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\
\mathbf{if}\;A \leq -5.8 \cdot 10^{-64}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.3 \cdot 10^{-183}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{elif}\;A \leq -1.3 \cdot 10^{-272}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot t\_0}{\pi}\\
\end{array}
\end{array}
if A < -5.7999999999999998e-64Initial program 27.0%
associate-*r/27.0%
associate-*l/27.0%
*-un-lft-identity27.0%
unpow227.0%
unpow227.0%
hypot-define48.8%
Applied egg-rr48.8%
Taylor expanded in A around -inf 65.1%
associate-*r/65.1%
*-commutative65.1%
Simplified65.1%
if -5.7999999999999998e-64 < A < -1.2999999999999999e-183Initial program 76.0%
Taylor expanded in B around -inf 63.1%
associate--l+63.1%
div-sub63.1%
Simplified63.1%
if -1.2999999999999999e-183 < A < -1.29999999999999996e-272Initial program 44.1%
associate-*r/44.1%
associate-*l/44.2%
*-un-lft-identity44.2%
unpow244.2%
unpow244.2%
hypot-define65.5%
Applied egg-rr65.5%
clear-num65.5%
inv-pow65.5%
Applied egg-rr65.5%
unpow-165.5%
associate--l-65.4%
Simplified65.4%
Taylor expanded in C around inf 54.7%
metadata-eval54.7%
cancel-sign-sub-inv54.7%
distribute-rgt1-in54.7%
metadata-eval54.7%
mul0-lft54.7%
div054.7%
metadata-eval54.7%
neg-sub054.7%
distribute-lft-neg-in54.7%
metadata-eval54.7%
Simplified54.7%
if -1.29999999999999996e-272 < A Initial program 71.8%
associate-*r/71.8%
associate-*l/71.8%
*-un-lft-identity71.8%
unpow271.8%
unpow271.8%
hypot-define91.2%
Applied egg-rr91.2%
Taylor expanded in B around -inf 67.4%
associate--l+67.4%
div-sub68.2%
Simplified68.2%
Final simplification65.5%
(FPCore (A B C)
:precision binary64
(if (<= B -2.1e-204)
(* 180.0 (/ (atan (* (/ 1.0 B) (+ B (- C A)))) PI))
(if (<= B -1.75e-281)
(/ (* 180.0 (atan (/ (* 0.5 (+ B (* B (/ C A)))) A))) PI)
(/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.1e-204) {
tmp = 180.0 * (atan(((1.0 / B) * (B + (C - A)))) / ((double) M_PI));
} else if (B <= -1.75e-281) {
tmp = (180.0 * atan(((0.5 * (B + (B * (C / A)))) / A))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.1e-204) {
tmp = 180.0 * (Math.atan(((1.0 / B) * (B + (C - A)))) / Math.PI);
} else if (B <= -1.75e-281) {
tmp = (180.0 * Math.atan(((0.5 * (B + (B * (C / A)))) / A))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.1e-204: tmp = 180.0 * (math.atan(((1.0 / B) * (B + (C - A)))) / math.pi) elif B <= -1.75e-281: tmp = (180.0 * math.atan(((0.5 * (B + (B * (C / A)))) / A))) / math.pi else: tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.1e-204) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(B + Float64(C - A)))) / pi)); elseif (B <= -1.75e-281) tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * Float64(B + Float64(B * Float64(C / A)))) / A))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.1e-204) tmp = 180.0 * (atan(((1.0 / B) * (B + (C - A)))) / pi); elseif (B <= -1.75e-281) tmp = (180.0 * atan(((0.5 * (B + (B * (C / A)))) / A))) / pi; else tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.1e-204], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(B + N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.75e-281], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.1 \cdot 10^{-204}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(B + \left(C - A\right)\right)\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.75 \cdot 10^{-281}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.10000000000000009e-204Initial program 59.7%
Taylor expanded in B around -inf 69.6%
neg-mul-169.6%
Simplified69.6%
if -2.10000000000000009e-204 < B < -1.75000000000000011e-281Initial program 39.5%
associate-*r/39.5%
associate-*l/39.5%
*-un-lft-identity39.5%
unpow239.5%
unpow239.5%
hypot-define80.4%
Applied egg-rr80.4%
Taylor expanded in A around -inf 63.9%
associate-*r/63.9%
distribute-lft-out63.9%
associate-*r*63.9%
metadata-eval63.9%
associate-/l*63.9%
Simplified63.9%
if -1.75000000000000011e-281 < B Initial program 58.1%
associate-*r/58.1%
associate-*l/58.2%
*-un-lft-identity58.2%
unpow258.2%
unpow258.2%
hypot-define79.1%
Applied egg-rr79.1%
Taylor expanded in B around inf 67.5%
+-commutative67.5%
associate--r+67.5%
div-sub68.2%
Simplified68.2%
Final simplification68.4%
(FPCore (A B C)
:precision binary64
(if (<= C -1.95e-69)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -2.65e-241)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 1.45e-72)
(* 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 <= -1.95e-69) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -2.65e-241) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 1.45e-72) {
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 <= -1.95e-69) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -2.65e-241) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 1.45e-72) {
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 <= -1.95e-69: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -2.65e-241: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 1.45e-72: 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 <= -1.95e-69) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -2.65e-241) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 1.45e-72) 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 <= -1.95e-69) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -2.65e-241) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 1.45e-72) 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, -1.95e-69], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.65e-241], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.45e-72], 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 -1.95 \cdot 10^{-69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.65 \cdot 10^{-241}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.45 \cdot 10^{-72}:\\
\;\;\;\;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 < -1.9499999999999999e-69Initial program 77.5%
Taylor expanded in C around -inf 66.2%
if -1.9499999999999999e-69 < C < -2.6499999999999999e-241Initial program 59.2%
Taylor expanded in A around -inf 44.4%
associate-*r/44.4%
Simplified44.4%
if -2.6499999999999999e-241 < C < 1.44999999999999999e-72Initial program 66.2%
Taylor expanded in B around inf 38.6%
if 1.44999999999999999e-72 < C Initial program 29.4%
Taylor expanded in C around inf 63.3%
Taylor expanded in A around inf 63.3%
Final simplification56.1%
(FPCore (A B C)
:precision binary64
(if (<= C -7.2e-69)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -6.8e-243)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 1.22e-73)
(* 180.0 (/ (atan -1.0) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C)))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -7.2e-69) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -6.8e-243) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 1.22e-73) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -7.2e-69) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -6.8e-243) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 1.22e-73) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -7.2e-69: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -6.8e-243: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 1.22e-73: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -7.2e-69) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -6.8e-243) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 1.22e-73) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -7.2e-69) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -6.8e-243) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 1.22e-73) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -7.2e-69], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -6.8e-243], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.22e-73], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -7.2 \cdot 10^{-69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -6.8 \cdot 10^{-243}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.22 \cdot 10^{-73}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -7.20000000000000035e-69Initial program 77.5%
Taylor expanded in C around -inf 66.2%
if -7.20000000000000035e-69 < C < -6.79999999999999992e-243Initial program 59.2%
Taylor expanded in A around -inf 44.4%
associate-*r/44.4%
Simplified44.4%
if -6.79999999999999992e-243 < C < 1.22e-73Initial program 66.2%
Taylor expanded in B around inf 38.6%
if 1.22e-73 < C Initial program 29.4%
Taylor expanded in C around inf 63.3%
clear-num63.4%
inv-pow63.4%
+-commutative63.4%
fma-define63.4%
mul-1-neg63.4%
distribute-rgt1-in63.4%
metadata-eval63.4%
Applied egg-rr63.4%
unpow-163.4%
fma-undefine63.4%
neg-mul-163.4%
mul0-lft63.4%
mul0-lft63.4%
metadata-eval63.4%
distribute-rgt1-in63.4%
+-commutative63.4%
metadata-eval63.4%
distribute-rgt1-in63.4%
metadata-eval63.4%
mul0-lft63.4%
div063.4%
metadata-eval63.4%
cancel-sign-sub-inv63.4%
neg-sub063.4%
distribute-lft-neg-in63.4%
metadata-eval63.4%
Simplified63.4%
un-div-inv63.4%
Applied egg-rr63.4%
Final simplification56.1%
(FPCore (A B C)
:precision binary64
(if (<= C -2.2e-69)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -7.5e-246)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 1.12e-71)
(* 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 <= -2.2e-69) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -7.5e-246) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 1.12e-71) {
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 <= -2.2e-69) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -7.5e-246) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 1.12e-71) {
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 <= -2.2e-69: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -7.5e-246: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 1.12e-71: 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 <= -2.2e-69) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -7.5e-246) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 1.12e-71) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.2e-69) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -7.5e-246) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 1.12e-71) 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, -2.2e-69], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -7.5e-246], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.12e-71], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.2 \cdot 10^{-69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -7.5 \cdot 10^{-246}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.12 \cdot 10^{-71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.2e-69Initial program 77.5%
Taylor expanded in C around -inf 66.2%
if -2.2e-69 < C < -7.50000000000000049e-246Initial program 59.2%
Taylor expanded in A around -inf 44.4%
associate-*r/44.4%
Simplified44.4%
if -7.50000000000000049e-246 < C < 1.1199999999999999e-71Initial program 66.2%
Taylor expanded in B around inf 38.6%
if 1.1199999999999999e-71 < C Initial program 29.4%
associate-*r/29.4%
associate-*l/29.4%
*-un-lft-identity29.4%
unpow229.4%
unpow229.4%
hypot-define53.3%
Applied egg-rr53.3%
clear-num53.2%
inv-pow53.2%
Applied egg-rr53.2%
unpow-153.2%
associate--l-50.3%
Simplified50.3%
Taylor expanded in C around inf 63.5%
metadata-eval63.5%
cancel-sign-sub-inv63.5%
distribute-rgt1-in63.5%
metadata-eval63.5%
mul0-lft63.5%
div063.5%
metadata-eval63.5%
neg-sub063.5%
distribute-lft-neg-in63.5%
metadata-eval63.5%
Simplified63.5%
Final simplification56.2%
(FPCore (A B C)
:precision binary64
(if (<= C -4.3e-69)
(/ (* 180.0 (atan (/ (* C 2.0) B))) PI)
(if (<= C -2.4e-243)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 2.9e-74)
(* 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.3e-69) {
tmp = (180.0 * atan(((C * 2.0) / B))) / ((double) M_PI);
} else if (C <= -2.4e-243) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 2.9e-74) {
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.3e-69) {
tmp = (180.0 * Math.atan(((C * 2.0) / B))) / Math.PI;
} else if (C <= -2.4e-243) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 2.9e-74) {
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.3e-69: tmp = (180.0 * math.atan(((C * 2.0) / B))) / math.pi elif C <= -2.4e-243: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 2.9e-74: 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.3e-69) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C * 2.0) / B))) / pi); elseif (C <= -2.4e-243) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 2.9e-74) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(Float64(180.0 * 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.3e-69) tmp = (180.0 * atan(((C * 2.0) / B))) / pi; elseif (C <= -2.4e-243) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 2.9e-74) 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.3e-69], N[(N[(180.0 * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -2.4e-243], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.9e-74], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.3 \cdot 10^{-69}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.4 \cdot 10^{-243}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.9 \cdot 10^{-74}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.3e-69Initial program 77.5%
associate-*r/77.5%
associate-*l/77.5%
*-un-lft-identity77.5%
unpow277.5%
unpow277.5%
hypot-define95.3%
Applied egg-rr95.3%
Taylor expanded in C around -inf 66.2%
if -4.3e-69 < C < -2.4000000000000001e-243Initial program 59.2%
Taylor expanded in A around -inf 44.4%
associate-*r/44.4%
Simplified44.4%
if -2.4000000000000001e-243 < C < 2.9e-74Initial program 66.2%
Taylor expanded in B around inf 38.6%
if 2.9e-74 < C Initial program 29.4%
associate-*r/29.4%
associate-*l/29.4%
*-un-lft-identity29.4%
unpow229.4%
unpow229.4%
hypot-define53.3%
Applied egg-rr53.3%
clear-num53.2%
inv-pow53.2%
Applied egg-rr53.2%
unpow-153.2%
associate--l-50.3%
Simplified50.3%
Taylor expanded in C around inf 63.5%
metadata-eval63.5%
cancel-sign-sub-inv63.5%
distribute-rgt1-in63.5%
metadata-eval63.5%
mul0-lft63.5%
div063.5%
metadata-eval63.5%
neg-sub063.5%
distribute-lft-neg-in63.5%
metadata-eval63.5%
Simplified63.5%
Final simplification56.2%
(FPCore (A B C)
:precision binary64
(if (<= C -1.65e-69)
(/ (* 180.0 (atan (/ (* C 2.0) B))) PI)
(if (<= C -2.65e-244)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (<= C 1.65e-72)
(* 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 <= -1.65e-69) {
tmp = (180.0 * atan(((C * 2.0) / B))) / ((double) M_PI);
} else if (C <= -2.65e-244) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if (C <= 1.65e-72) {
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 <= -1.65e-69) {
tmp = (180.0 * Math.atan(((C * 2.0) / B))) / Math.PI;
} else if (C <= -2.65e-244) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if (C <= 1.65e-72) {
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 <= -1.65e-69: tmp = (180.0 * math.atan(((C * 2.0) / B))) / math.pi elif C <= -2.65e-244: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif C <= 1.65e-72: 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 <= -1.65e-69) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C * 2.0) / B))) / pi); elseif (C <= -2.65e-244) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif (C <= 1.65e-72) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.65e-69) tmp = (180.0 * atan(((C * 2.0) / B))) / pi; elseif (C <= -2.65e-244) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif (C <= 1.65e-72) 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, -1.65e-69], N[(N[(180.0 * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -2.65e-244], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 1.65e-72], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.65 \cdot 10^{-69}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.65 \cdot 10^{-244}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.65 \cdot 10^{-72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.65e-69Initial program 77.5%
associate-*r/77.5%
associate-*l/77.5%
*-un-lft-identity77.5%
unpow277.5%
unpow277.5%
hypot-define95.3%
Applied egg-rr95.3%
Taylor expanded in C around -inf 66.2%
if -1.65e-69 < C < -2.6500000000000001e-244Initial program 59.2%
associate-*r/59.2%
associate-*l/59.3%
*-un-lft-identity59.3%
unpow259.3%
unpow259.3%
hypot-define78.6%
Applied egg-rr78.6%
Taylor expanded in A around -inf 44.5%
associate-*r/44.5%
*-commutative44.5%
Simplified44.5%
if -2.6500000000000001e-244 < C < 1.65e-72Initial program 66.2%
Taylor expanded in B around inf 38.6%
if 1.65e-72 < C Initial program 29.4%
associate-*r/29.4%
associate-*l/29.4%
*-un-lft-identity29.4%
unpow229.4%
unpow229.4%
hypot-define53.3%
Applied egg-rr53.3%
clear-num53.2%
inv-pow53.2%
Applied egg-rr53.2%
unpow-153.2%
associate--l-50.3%
Simplified50.3%
Taylor expanded in C around inf 63.5%
metadata-eval63.5%
cancel-sign-sub-inv63.5%
distribute-rgt1-in63.5%
metadata-eval63.5%
mul0-lft63.5%
div063.5%
metadata-eval63.5%
neg-sub063.5%
distribute-lft-neg-in63.5%
metadata-eval63.5%
Simplified63.5%
Final simplification56.2%
(FPCore (A B C)
:precision binary64
(if (<= A -9.8e-8)
(/ (* 180.0 (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A))))))) PI)
(if (<= A -2.5e-288)
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))
(* 180.0 (/ (atan (* (/ 1.0 B) (+ B (- C A)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9.8e-8) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / ((double) M_PI);
} else if (A <= -2.5e-288) {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((1.0 / B) * (B + (C - A)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9.8e-8) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / Math.PI;
} else if (A <= -2.5e-288) {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((1.0 / B) * (B + (C - A)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9.8e-8: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / math.pi elif A <= -2.5e-288: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) else: tmp = 180.0 * (math.atan(((1.0 / B) * (B + (C - A)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9.8e-8) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A))))))) / pi); elseif (A <= -2.5e-288) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(B + Float64(C - A)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9.8e-8) tmp = (180.0 * atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A))))))) / pi; elseif (A <= -2.5e-288) tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); else tmp = 180.0 * (atan(((1.0 / B) * (B + (C - A)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9.8e-8], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -2.5e-288], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(B + N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.8 \cdot 10^{-8}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.5 \cdot 10^{-288}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(B + \left(C - A\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.8000000000000004e-8Initial program 23.6%
associate-*r/23.6%
associate-*l/23.6%
*-un-lft-identity23.6%
unpow223.6%
unpow223.6%
hypot-define46.1%
Applied egg-rr46.1%
clear-num46.1%
inv-pow46.1%
Applied egg-rr46.1%
unpow-146.1%
associate--l-27.6%
Simplified27.6%
Taylor expanded in A around -inf 76.0%
associate-*r*76.0%
mul-1-neg76.0%
associate-*r/76.0%
*-commutative76.0%
associate-*r/76.0%
metadata-eval76.0%
Simplified76.0%
if -9.8000000000000004e-8 < A < -2.50000000000000005e-288Initial program 62.3%
Taylor expanded in B around inf 59.8%
if -2.50000000000000005e-288 < A Initial program 71.5%
Taylor expanded in B around -inf 69.6%
neg-mul-169.6%
Simplified69.6%
Final simplification68.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -8.6e-225)
(/ (* 180.0 (atan (+ 1.0 t_0))) PI)
(if (<= B -3.6e-279)
(/ (* 180.0 (atan (/ (* B 0.5) A))) 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 <= -8.6e-225) {
tmp = (180.0 * atan((1.0 + t_0))) / ((double) M_PI);
} else if (B <= -3.6e-279) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((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 <= -8.6e-225) {
tmp = (180.0 * Math.atan((1.0 + t_0))) / Math.PI;
} else if (B <= -3.6e-279) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / 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 <= -8.6e-225: tmp = (180.0 * math.atan((1.0 + t_0))) / math.pi elif B <= -3.6e-279: tmp = (180.0 * math.atan(((B * 0.5) / A))) / 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 <= -8.6e-225) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + t_0))) / pi); elseif (B <= -3.6e-279) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / 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 <= -8.6e-225) tmp = (180.0 * atan((1.0 + t_0))) / pi; elseif (B <= -3.6e-279) tmp = (180.0 * atan(((B * 0.5) / A))) / 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, -8.6e-225], N[(N[(180.0 * N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -3.6e-279], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $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 -8.6 \cdot 10^{-225}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq -3.6 \cdot 10^{-279}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -8.59999999999999959e-225Initial program 59.3%
associate-*r/59.4%
associate-*l/59.3%
*-un-lft-identity59.3%
unpow259.3%
unpow259.3%
hypot-define75.3%
Applied egg-rr75.3%
Taylor expanded in B around -inf 68.9%
associate--l+68.9%
div-sub68.9%
Simplified68.9%
if -8.59999999999999959e-225 < B < -3.5999999999999997e-279Initial program 36.3%
associate-*r/36.3%
associate-*l/36.3%
*-un-lft-identity36.3%
unpow236.3%
unpow236.3%
hypot-define75.2%
Applied egg-rr75.2%
Taylor expanded in A around -inf 61.0%
associate-*r/61.0%
*-commutative61.0%
Simplified61.0%
if -3.5999999999999997e-279 < B Initial program 58.1%
associate-*r/58.1%
associate-*l/58.2%
*-un-lft-identity58.2%
unpow258.2%
unpow258.2%
hypot-define79.1%
Applied egg-rr79.1%
Taylor expanded in B around inf 67.5%
+-commutative67.5%
associate--r+67.5%
div-sub68.2%
Simplified68.2%
Final simplification68.1%
(FPCore (A B C)
:precision binary64
(if (<= B -8.6e-225)
(* 180.0 (/ (atan (* (/ 1.0 B) (+ B (- C A)))) PI))
(if (<= B -2.2e-279)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.6e-225) {
tmp = 180.0 * (atan(((1.0 / B) * (B + (C - A)))) / ((double) M_PI));
} else if (B <= -2.2e-279) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8.6e-225) {
tmp = 180.0 * (Math.atan(((1.0 / B) * (B + (C - A)))) / Math.PI);
} else if (B <= -2.2e-279) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.6e-225: tmp = 180.0 * (math.atan(((1.0 / B) * (B + (C - A)))) / math.pi) elif B <= -2.2e-279: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi else: tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.6e-225) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(B + Float64(C - A)))) / pi)); elseif (B <= -2.2e-279) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.6e-225) tmp = 180.0 * (atan(((1.0 / B) * (B + (C - A)))) / pi); elseif (B <= -2.2e-279) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; else tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.6e-225], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(B + N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.2e-279], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.6 \cdot 10^{-225}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(B + \left(C - A\right)\right)\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.2 \cdot 10^{-279}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -8.59999999999999959e-225Initial program 59.3%
Taylor expanded in B around -inf 68.9%
neg-mul-168.9%
Simplified68.9%
if -8.59999999999999959e-225 < B < -2.2e-279Initial program 36.3%
associate-*r/36.3%
associate-*l/36.3%
*-un-lft-identity36.3%
unpow236.3%
unpow236.3%
hypot-define75.2%
Applied egg-rr75.2%
Taylor expanded in A around -inf 61.0%
associate-*r/61.0%
*-commutative61.0%
Simplified61.0%
if -2.2e-279 < B Initial program 58.1%
associate-*r/58.1%
associate-*l/58.2%
*-un-lft-identity58.2%
unpow258.2%
unpow258.2%
hypot-define79.1%
Applied egg-rr79.1%
Taylor expanded in B around inf 67.5%
+-commutative67.5%
associate--r+67.5%
div-sub68.2%
Simplified68.2%
Final simplification68.1%
(FPCore (A B C)
:precision binary64
(if (<= C -3.3e+17)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 9.5e-71)
(* 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+17) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 9.5e-71) {
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+17) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 9.5e-71) {
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+17: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 9.5e-71: 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+17) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 9.5e-71) 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+17) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 9.5e-71) 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+17], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.5e-71], 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^{+17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 9.5 \cdot 10^{-71}:\\
\;\;\;\;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.3e17Initial program 79.4%
Taylor expanded in C around -inf 75.0%
if -3.3e17 < C < 9.4999999999999994e-71Initial program 64.3%
Taylor expanded in B around inf 34.4%
if 9.4999999999999994e-71 < C Initial program 29.4%
Taylor expanded in C around inf 63.3%
Taylor expanded in A around inf 63.3%
Final simplification54.1%
(FPCore (A B C)
:precision binary64
(if (<= B -9.2e-179)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.5e-127)
(* 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 <= -9.2e-179) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.5e-127) {
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 <= -9.2e-179) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.5e-127) {
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 <= -9.2e-179: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.5e-127: 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 <= -9.2e-179) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.5e-127) 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 <= -9.2e-179) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.5e-127) 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, -9.2e-179], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.5e-127], 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 -9.2 \cdot 10^{-179}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-127}:\\
\;\;\;\;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 < -9.1999999999999995e-179Initial program 59.4%
Taylor expanded in B around -inf 47.1%
if -9.1999999999999995e-179 < B < 2.4999999999999999e-127Initial program 54.6%
Taylor expanded in C around inf 38.6%
associate-*r/38.6%
distribute-rgt1-in38.6%
metadata-eval38.6%
mul0-lft38.6%
metadata-eval38.6%
Simplified38.6%
if 2.4999999999999999e-127 < B Initial program 57.4%
Taylor expanded in B around inf 52.3%
Final simplification46.9%
(FPCore (A B C) :precision binary64 (if (<= B -2e-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 <= -2e-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 <= -2e-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 <= -2e-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 <= -2e-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 <= -2e-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, -2e-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 -2 \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 < -1.999999999999994e-310Initial program 56.3%
Taylor expanded in B around -inf 37.5%
if -1.999999999999994e-310 < B Initial program 58.2%
Taylor expanded in B around inf 41.8%
Final simplification39.8%
(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.3%
Taylor expanded in B around inf 23.2%
Final simplification23.2%
herbie shell --seed 2024095
(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)))