
(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 21 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 (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)))
(t_1 (atan (+ (/ (- A A) B) (* -0.5 (/ B C))))))
(if (<= C 5.4e+154)
t_0
(if (<= C 3.5e+199)
(* 180.0 (/ t_1 PI))
(if (<= C 5.6e+234) t_0 (/ 180.0 (/ PI t_1)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
double t_1 = atan((((A - A) / B) + (-0.5 * (B / C))));
double tmp;
if (C <= 5.4e+154) {
tmp = t_0;
} else if (C <= 3.5e+199) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (C <= 5.6e+234) {
tmp = t_0;
} else {
tmp = 180.0 / (((double) M_PI) / t_1);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
double t_1 = Math.atan((((A - A) / B) + (-0.5 * (B / C))));
double tmp;
if (C <= 5.4e+154) {
tmp = t_0;
} else if (C <= 3.5e+199) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (C <= 5.6e+234) {
tmp = t_0;
} else {
tmp = 180.0 / (Math.PI / t_1);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) t_1 = math.atan((((A - A) / B) + (-0.5 * (B / C)))) tmp = 0 if C <= 5.4e+154: tmp = t_0 elif C <= 3.5e+199: tmp = 180.0 * (t_1 / math.pi) elif C <= 5.6e+234: tmp = t_0 else: tmp = 180.0 / (math.pi / t_1) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)) t_1 = atan(Float64(Float64(Float64(A - A) / B) + Float64(-0.5 * Float64(B / C)))) tmp = 0.0 if (C <= 5.4e+154) tmp = t_0; elseif (C <= 3.5e+199) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (C <= 5.6e+234) tmp = t_0; else tmp = Float64(180.0 / Float64(pi / t_1)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); t_1 = atan((((A - A) / B) + (-0.5 * (B / C)))); tmp = 0.0; if (C <= 5.4e+154) tmp = t_0; elseif (C <= 3.5e+199) tmp = 180.0 * (t_1 / pi); elseif (C <= 5.6e+234) tmp = t_0; else tmp = 180.0 / (pi / t_1); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[ArcTan[N[(N[(N[(A - A), $MachinePrecision] / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[C, 5.4e+154], t$95$0, If[LessEqual[C, 3.5e+199], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.6e+234], t$95$0, N[(180.0 / N[(Pi / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
t_1 := \tan^{-1} \left(\frac{A - A}{B} + -0.5 \cdot \frac{B}{C}\right)\\
\mathbf{if}\;C \leq 5.4 \cdot 10^{+154}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 3.5 \cdot 10^{+199}:\\
\;\;\;\;180 \cdot \frac{t\_1}{\pi}\\
\mathbf{elif}\;C \leq 5.6 \cdot 10^{+234}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t\_1}}\\
\end{array}
\end{array}
if C < 5.40000000000000011e154 or 3.49999999999999981e199 < C < 5.5999999999999997e234Initial program 60.5%
associate-*l/60.5%
*-lft-identity60.5%
+-commutative60.5%
unpow260.5%
unpow260.5%
hypot-define84.6%
Simplified84.6%
if 5.40000000000000011e154 < C < 3.49999999999999981e199Initial program 6.2%
Taylor expanded in C around inf 86.9%
if 5.5999999999999997e234 < C Initial program 4.5%
Applied egg-rr45.5%
Taylor expanded in C around inf 99.7%
Final simplification85.5%
(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 (or (<= t_0 -0.02) (not (<= t_0 0.0)))
(/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B))))
(/ 180.0 (/ PI (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- A))))))))
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 <= -0.02) || !(t_0 <= 0.0)) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
} else {
tmp = 180.0 / (((double) M_PI) / atan(((-0.5 * (B + (B * (C / A)))) / -A)));
}
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 <= -0.02) || !(t_0 <= 0.0)) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
} else {
tmp = 180.0 / (Math.PI / Math.atan(((-0.5 * (B + (B * (C / A)))) / -A)));
}
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 <= -0.02) or not (t_0 <= 0.0): tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) else: tmp = 180.0 / (math.pi / math.atan(((-0.5 * (B + (B * (C / A)))) / -A))) 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 <= -0.02) || !(t_0 <= 0.0)) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-A))))); 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 <= -0.02) || ~((t_0 <= 0.0))) tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); else tmp = 180.0 / (pi / atan(((-0.5 * (B + (B * (C / A)))) / -A))); 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[Or[LessEqual[t$95$0, -0.02], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(-0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision]), $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 -0.02 \lor \neg \left(t\_0 \leq 0\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}}\\
\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)))))) < -0.0200000000000000004 or -0.0 < (*.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 60.3%
Applied egg-rr88.8%
if -0.0200000000000000004 < (*.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)))))) < -0.0Initial program 17.7%
Applied egg-rr17.7%
Taylor expanded in A around -inf 55.9%
mul-1-neg55.9%
distribute-neg-frac255.9%
distribute-lft-out55.9%
associate-/l*56.8%
Simplified56.8%
Final simplification85.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (- C (hypot B C)) B)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -5.2e+166)
t_1
(if (<= A -2.7e-20)
(* 180.0 (/ t_0 PI))
(if (<= A -2.25e-61)
t_1
(if (<= A 8e+84)
(/ 180.0 (/ PI t_0))
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan(((C - hypot(B, C)) / B));
double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -5.2e+166) {
tmp = t_1;
} else if (A <= -2.7e-20) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -2.25e-61) {
tmp = t_1;
} else if (A <= 8e+84) {
tmp = 180.0 / (((double) M_PI) / t_0);
} else {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((C - Math.hypot(B, C)) / B));
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -5.2e+166) {
tmp = t_1;
} else if (A <= -2.7e-20) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -2.25e-61) {
tmp = t_1;
} else if (A <= 8e+84) {
tmp = 180.0 / (Math.PI / t_0);
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((C - math.hypot(B, C)) / B)) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -5.2e+166: tmp = t_1 elif A <= -2.7e-20: tmp = 180.0 * (t_0 / math.pi) elif A <= -2.25e-61: tmp = t_1 elif A <= 8e+84: tmp = 180.0 / (math.pi / t_0) else: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(C - hypot(B, C)) / B)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -5.2e+166) tmp = t_1; elseif (A <= -2.7e-20) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -2.25e-61) tmp = t_1; elseif (A <= 8e+84) tmp = Float64(180.0 / Float64(pi / t_0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((C - hypot(B, C)) / B)); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -5.2e+166) tmp = t_1; elseif (A <= -2.7e-20) tmp = 180.0 * (t_0 / pi); elseif (A <= -2.25e-61) tmp = t_1; elseif (A <= 8e+84) tmp = 180.0 / (pi / t_0); else tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / 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]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.2e+166], t$95$1, If[LessEqual[A, -2.7e-20], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.25e-61], t$95$1, If[LessEqual[A, 8e+84], N[(180.0 / N[(Pi / t$95$0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -5.2 \cdot 10^{+166}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 8 \cdot 10^{+84}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.1999999999999999e166 or -2.7e-20 < A < -2.25e-61Initial program 13.8%
Taylor expanded in A around -inf 80.9%
associate-*r/80.9%
Simplified80.9%
if -5.1999999999999999e166 < A < -2.7e-20Initial program 47.2%
Taylor expanded in A around 0 39.0%
unpow239.0%
unpow239.0%
hypot-define72.3%
Simplified72.3%
if -2.25e-61 < A < 8.00000000000000046e84Initial program 60.3%
Applied egg-rr84.8%
Taylor expanded in A around 0 57.0%
unpow257.0%
unpow257.0%
hypot-define81.6%
Simplified81.6%
if 8.00000000000000046e84 < A Initial program 75.5%
Taylor expanded in C around 0 75.5%
mul-1-neg75.5%
distribute-neg-frac275.5%
+-commutative75.5%
unpow275.5%
unpow275.5%
hypot-define92.6%
Simplified92.6%
Final simplification82.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (- C (hypot B C)) B)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -1.8e+167)
t_1
(if (<= A -2.7e-20)
(* 180.0 (/ t_0 PI))
(if (<= A -2.25e-61)
t_1
(if (<= A 8e+84)
(/ 180.0 (/ PI t_0))
(/ 180.0 (/ PI (atan (/ (- (- A) (hypot A B)) B))))))))))
double code(double A, double B, double C) {
double t_0 = atan(((C - hypot(B, C)) / B));
double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -1.8e+167) {
tmp = t_1;
} else if (A <= -2.7e-20) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -2.25e-61) {
tmp = t_1;
} else if (A <= 8e+84) {
tmp = 180.0 / (((double) M_PI) / t_0);
} else {
tmp = 180.0 / (((double) M_PI) / atan(((-A - hypot(A, B)) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((C - Math.hypot(B, C)) / B));
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -1.8e+167) {
tmp = t_1;
} else if (A <= -2.7e-20) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -2.25e-61) {
tmp = t_1;
} else if (A <= 8e+84) {
tmp = 180.0 / (Math.PI / t_0);
} else {
tmp = 180.0 / (Math.PI / Math.atan(((-A - Math.hypot(A, B)) / B)));
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((C - math.hypot(B, C)) / B)) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -1.8e+167: tmp = t_1 elif A <= -2.7e-20: tmp = 180.0 * (t_0 / math.pi) elif A <= -2.25e-61: tmp = t_1 elif A <= 8e+84: tmp = 180.0 / (math.pi / t_0) else: tmp = 180.0 / (math.pi / math.atan(((-A - math.hypot(A, B)) / B))) return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(C - hypot(B, C)) / B)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -1.8e+167) tmp = t_1; elseif (A <= -2.7e-20) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -2.25e-61) tmp = t_1; elseif (A <= 8e+84) tmp = Float64(180.0 / Float64(pi / t_0)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((C - hypot(B, C)) / B)); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -1.8e+167) tmp = t_1; elseif (A <= -2.7e-20) tmp = 180.0 * (t_0 / pi); elseif (A <= -2.25e-61) tmp = t_1; elseif (A <= 8e+84) tmp = 180.0 / (pi / t_0); else tmp = 180.0 / (pi / atan(((-A - hypot(A, B)) / B))); 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]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.8e+167], t$95$1, If[LessEqual[A, -2.7e-20], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.25e-61], t$95$1, If[LessEqual[A, 8e+84], N[(180.0 / N[(Pi / t$95$0), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.8 \cdot 10^{+167}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 8 \cdot 10^{+84}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -1.80000000000000012e167 or -2.7e-20 < A < -2.25e-61Initial program 13.8%
Taylor expanded in A around -inf 80.9%
associate-*r/80.9%
Simplified80.9%
if -1.80000000000000012e167 < A < -2.7e-20Initial program 47.2%
Taylor expanded in A around 0 39.0%
unpow239.0%
unpow239.0%
hypot-define72.3%
Simplified72.3%
if -2.25e-61 < A < 8.00000000000000046e84Initial program 60.3%
Applied egg-rr84.8%
Taylor expanded in A around 0 57.0%
unpow257.0%
unpow257.0%
hypot-define81.6%
Simplified81.6%
if 8.00000000000000046e84 < A Initial program 75.5%
Applied egg-rr92.6%
Taylor expanded in C around 0 75.5%
distribute-lft-in75.5%
+-commutative75.5%
unpow275.5%
unpow275.5%
hypot-undefine92.7%
neg-mul-192.7%
unsub-neg92.7%
neg-mul-192.7%
hypot-undefine75.5%
unpow275.5%
unpow275.5%
+-commutative75.5%
unpow275.5%
unpow275.5%
hypot-define92.7%
Simplified92.7%
Final simplification82.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -9.5e+166)
t_1
(if (<= A -2.7e-20)
t_0
(if (<= A -2.25e-61)
t_1
(if (<= A 1.05e+85)
t_0
(* 180.0 (/ (atan (/ (+ B A) (- B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -9.5e+166) {
tmp = t_1;
} else if (A <= -2.7e-20) {
tmp = t_0;
} else if (A <= -2.25e-61) {
tmp = t_1;
} else if (A <= 1.05e+85) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B + A) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -9.5e+166) {
tmp = t_1;
} else if (A <= -2.7e-20) {
tmp = t_0;
} else if (A <= -2.25e-61) {
tmp = t_1;
} else if (A <= 1.05e+85) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B + A) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -9.5e+166: tmp = t_1 elif A <= -2.7e-20: tmp = t_0 elif A <= -2.25e-61: tmp = t_1 elif A <= 1.05e+85: tmp = t_0 else: tmp = 180.0 * (math.atan(((B + A) / -B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -9.5e+166) tmp = t_1; elseif (A <= -2.7e-20) tmp = t_0; elseif (A <= -2.25e-61) tmp = t_1; elseif (A <= 1.05e+85) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + A) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -9.5e+166) tmp = t_1; elseif (A <= -2.7e-20) tmp = t_0; elseif (A <= -2.25e-61) tmp = t_1; elseif (A <= 1.05e+85) tmp = t_0; else tmp = 180.0 * (atan(((B + A) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -9.5e+166], t$95$1, If[LessEqual[A, -2.7e-20], t$95$0, If[LessEqual[A, -2.25e-61], t$95$1, If[LessEqual[A, 1.05e+85], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B + A), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -9.5 \cdot 10^{+166}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 1.05 \cdot 10^{+85}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + A}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.49999999999999984e166 or -2.7e-20 < A < -2.25e-61Initial program 13.8%
Taylor expanded in A around -inf 80.9%
associate-*r/80.9%
Simplified80.9%
if -9.49999999999999984e166 < A < -2.7e-20 or -2.25e-61 < A < 1.05000000000000005e85Initial program 57.2%
Taylor expanded in A around 0 52.8%
unpow252.8%
unpow252.8%
hypot-define79.4%
Simplified79.4%
if 1.05000000000000005e85 < A Initial program 75.5%
Taylor expanded in C around 0 75.5%
mul-1-neg75.5%
distribute-neg-frac275.5%
+-commutative75.5%
unpow275.5%
unpow275.5%
hypot-define92.6%
Simplified92.6%
Taylor expanded in A around 0 81.7%
Final simplification80.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (- C (hypot B C)) B)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -9.5e+166)
t_1
(if (<= A -2.7e-20)
(* 180.0 (/ t_0 PI))
(if (<= A -2.25e-61)
t_1
(if (<= A 5.8e+85)
(/ 180.0 (/ PI t_0))
(* 180.0 (/ (atan (/ (+ B A) (- B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan(((C - hypot(B, C)) / B));
double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -9.5e+166) {
tmp = t_1;
} else if (A <= -2.7e-20) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -2.25e-61) {
tmp = t_1;
} else if (A <= 5.8e+85) {
tmp = 180.0 / (((double) M_PI) / t_0);
} else {
tmp = 180.0 * (atan(((B + A) / -B)) / ((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 t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -9.5e+166) {
tmp = t_1;
} else if (A <= -2.7e-20) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -2.25e-61) {
tmp = t_1;
} else if (A <= 5.8e+85) {
tmp = 180.0 / (Math.PI / t_0);
} else {
tmp = 180.0 * (Math.atan(((B + A) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((C - math.hypot(B, C)) / B)) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -9.5e+166: tmp = t_1 elif A <= -2.7e-20: tmp = 180.0 * (t_0 / math.pi) elif A <= -2.25e-61: tmp = t_1 elif A <= 5.8e+85: tmp = 180.0 / (math.pi / t_0) else: tmp = 180.0 * (math.atan(((B + A) / -B)) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(C - hypot(B, C)) / B)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -9.5e+166) tmp = t_1; elseif (A <= -2.7e-20) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -2.25e-61) tmp = t_1; elseif (A <= 5.8e+85) tmp = Float64(180.0 / Float64(pi / t_0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + A) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((C - hypot(B, C)) / B)); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -9.5e+166) tmp = t_1; elseif (A <= -2.7e-20) tmp = 180.0 * (t_0 / pi); elseif (A <= -2.25e-61) tmp = t_1; elseif (A <= 5.8e+85) tmp = 180.0 / (pi / t_0); else tmp = 180.0 * (atan(((B + A) / -B)) / 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]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -9.5e+166], t$95$1, If[LessEqual[A, -2.7e-20], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.25e-61], t$95$1, If[LessEqual[A, 5.8e+85], N[(180.0 / N[(Pi / t$95$0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B + A), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -9.5 \cdot 10^{+166}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -2.7 \cdot 10^{-20}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{elif}\;A \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 5.8 \cdot 10^{+85}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + A}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.49999999999999984e166 or -2.7e-20 < A < -2.25e-61Initial program 13.8%
Taylor expanded in A around -inf 80.9%
associate-*r/80.9%
Simplified80.9%
if -9.49999999999999984e166 < A < -2.7e-20Initial program 47.2%
Taylor expanded in A around 0 39.0%
unpow239.0%
unpow239.0%
hypot-define72.3%
Simplified72.3%
if -2.25e-61 < A < 5.79999999999999995e85Initial program 60.3%
Applied egg-rr84.8%
Taylor expanded in A around 0 57.0%
unpow257.0%
unpow257.0%
hypot-define81.6%
Simplified81.6%
if 5.79999999999999995e85 < A Initial program 75.5%
Taylor expanded in C around 0 75.5%
mul-1-neg75.5%
distribute-neg-frac275.5%
+-commutative75.5%
unpow275.5%
unpow275.5%
hypot-define92.6%
Simplified92.6%
Taylor expanded in A around 0 81.7%
Final simplification80.1%
(FPCore (A B C) :precision binary64 (if (or (<= A -5.2e+166) (and (not (<= A -2.7e-20)) (<= A -2.25e-61))) (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if ((A <= -5.2e+166) || (!(A <= -2.7e-20) && (A <= -2.25e-61))) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if ((A <= -5.2e+166) || (!(A <= -2.7e-20) && (A <= -2.25e-61))) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if (A <= -5.2e+166) or (not (A <= -2.7e-20) and (A <= -2.25e-61)): tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if ((A <= -5.2e+166) || (!(A <= -2.7e-20) && (A <= -2.25e-61))) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if ((A <= -5.2e+166) || (~((A <= -2.7e-20)) && (A <= -2.25e-61))) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[Or[LessEqual[A, -5.2e+166], And[N[Not[LessEqual[A, -2.7e-20]], $MachinePrecision], LessEqual[A, -2.25e-61]]], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.2 \cdot 10^{+166} \lor \neg \left(A \leq -2.7 \cdot 10^{-20}\right) \land A \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.1999999999999999e166 or -2.7e-20 < A < -2.25e-61Initial program 13.8%
Taylor expanded in A around -inf 80.9%
associate-*r/80.9%
Simplified80.9%
if -5.1999999999999999e166 < A < -2.7e-20 or -2.25e-61 < A Initial program 61.5%
Simplified85.3%
Final simplification84.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ 180.0 (/ PI (atan 0.0)))))
(if (<= B -4.8e-53)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= B -2.4e-245)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= B -9.6e-273)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 7.2e-293)
t_0
(if (<= B 1.8e-252)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 2.2e-221)
t_0
(* 180.0 (/ (atan (/ (+ B A) (- B))) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 / (((double) M_PI) / atan(0.0));
double tmp;
if (B <= -4.8e-53) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (B <= -2.4e-245) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (B <= -9.6e-273) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 7.2e-293) {
tmp = t_0;
} else if (B <= 1.8e-252) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 2.2e-221) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B + A) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 / (Math.PI / Math.atan(0.0));
double tmp;
if (B <= -4.8e-53) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (B <= -2.4e-245) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (B <= -9.6e-273) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 7.2e-293) {
tmp = t_0;
} else if (B <= 1.8e-252) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 2.2e-221) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B + A) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 / (math.pi / math.atan(0.0)) tmp = 0 if B <= -4.8e-53: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif B <= -2.4e-245: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif B <= -9.6e-273: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 7.2e-293: tmp = t_0 elif B <= 1.8e-252: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 2.2e-221: tmp = t_0 else: tmp = 180.0 * (math.atan(((B + A) / -B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 / Float64(pi / atan(0.0))) tmp = 0.0 if (B <= -4.8e-53) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (B <= -2.4e-245) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (B <= -9.6e-273) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 7.2e-293) tmp = t_0; elseif (B <= 1.8e-252) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 2.2e-221) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + A) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 / (pi / atan(0.0)); tmp = 0.0; if (B <= -4.8e-53) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (B <= -2.4e-245) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (B <= -9.6e-273) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 7.2e-293) tmp = t_0; elseif (B <= 1.8e-252) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 2.2e-221) tmp = t_0; else tmp = 180.0 * (atan(((B + A) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.8e-53], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.4e-245], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.6e-273], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.2e-293], t$95$0, If[LessEqual[B, 1.8e-252], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.2e-221], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B + A), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{if}\;B \leq -4.8 \cdot 10^{-53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.4 \cdot 10^{-245}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;B \leq -9.6 \cdot 10^{-273}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.2 \cdot 10^{-293}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-252}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.2 \cdot 10^{-221}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + A}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.80000000000000015e-53Initial program 55.0%
Taylor expanded in B around -inf 82.5%
associate--l+82.5%
div-sub82.5%
Simplified82.5%
Taylor expanded in C around inf 76.3%
if -4.80000000000000015e-53 < B < -2.4e-245Initial program 46.7%
Applied egg-rr69.9%
Taylor expanded in A around -inf 43.8%
if -2.4e-245 < B < -9.59999999999999926e-273Initial program 100.0%
Taylor expanded in C around -inf 100.0%
if -9.59999999999999926e-273 < B < 7.1999999999999997e-293 or 1.80000000000000011e-252 < B < 2.20000000000000001e-221Initial program 40.6%
Applied egg-rr75.3%
div-sub23.3%
sub-neg23.3%
Applied egg-rr23.3%
sub-neg23.3%
Simplified23.3%
Taylor expanded in C around inf 32.7%
distribute-lft1-in32.7%
metadata-eval32.7%
mul0-lft54.6%
metadata-eval54.6%
Simplified54.6%
if 7.1999999999999997e-293 < B < 1.80000000000000011e-252Initial program 57.6%
Taylor expanded in A around inf 57.0%
if 2.20000000000000001e-221 < B Initial program 58.9%
Taylor expanded in C around 0 51.2%
mul-1-neg51.2%
distribute-neg-frac251.2%
+-commutative51.2%
unpow251.2%
unpow251.2%
hypot-define70.0%
Simplified70.0%
Taylor expanded in A around 0 64.5%
Final simplification65.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ 180.0 (/ PI (atan 0.0))))
(t_1 (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))))
(if (<= B -6.5e-273)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= B 2.7e-295)
t_0
(if (<= B 1.35e-249)
t_1
(if (<= B 1.4e-217)
t_0
(if (<= B 1.1e-175)
t_1
(if (<= B 1.35e-41)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 / (((double) M_PI) / atan(0.0));
double t_1 = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
double tmp;
if (B <= -6.5e-273) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (B <= 2.7e-295) {
tmp = t_0;
} else if (B <= 1.35e-249) {
tmp = t_1;
} else if (B <= 1.4e-217) {
tmp = t_0;
} else if (B <= 1.1e-175) {
tmp = t_1;
} else if (B <= 1.35e-41) {
tmp = 180.0 * (atan((2.0 * (C / 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 t_0 = 180.0 / (Math.PI / Math.atan(0.0));
double t_1 = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
double tmp;
if (B <= -6.5e-273) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (B <= 2.7e-295) {
tmp = t_0;
} else if (B <= 1.35e-249) {
tmp = t_1;
} else if (B <= 1.4e-217) {
tmp = t_0;
} else if (B <= 1.1e-175) {
tmp = t_1;
} else if (B <= 1.35e-41) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 / (math.pi / math.atan(0.0)) t_1 = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) tmp = 0 if B <= -6.5e-273: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif B <= 2.7e-295: tmp = t_0 elif B <= 1.35e-249: tmp = t_1 elif B <= 1.4e-217: tmp = t_0 elif B <= 1.1e-175: tmp = t_1 elif B <= 1.35e-41: tmp = 180.0 * (math.atan((2.0 * (C / B))) / 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(pi / atan(0.0))) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)) tmp = 0.0 if (B <= -6.5e-273) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (B <= 2.7e-295) tmp = t_0; elseif (B <= 1.35e-249) tmp = t_1; elseif (B <= 1.4e-217) tmp = t_0; elseif (B <= 1.1e-175) tmp = t_1; elseif (B <= 1.35e-41) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / 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 / (pi / atan(0.0)); t_1 = 180.0 * (atan(((A / B) * -2.0)) / pi); tmp = 0.0; if (B <= -6.5e-273) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (B <= 2.7e-295) tmp = t_0; elseif (B <= 1.35e-249) tmp = t_1; elseif (B <= 1.4e-217) tmp = t_0; elseif (B <= 1.1e-175) tmp = t_1; elseif (B <= 1.35e-41) tmp = 180.0 * (atan((2.0 * (C / B))) / 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[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6.5e-273], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.7e-295], t$95$0, If[LessEqual[B, 1.35e-249], t$95$1, If[LessEqual[B, 1.4e-217], t$95$0, If[LessEqual[B, 1.1e-175], t$95$1, If[LessEqual[B, 1.35e-41], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $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 := \frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{if}\;B \leq -6.5 \cdot 10^{-273}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{-295}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.35 \cdot 10^{-249}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-217}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-175}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 1.35 \cdot 10^{-41}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.49999999999999979e-273Initial program 53.9%
Taylor expanded in B around -inf 69.2%
associate--l+69.2%
div-sub71.5%
Simplified71.5%
Taylor expanded in C around inf 63.1%
if -6.49999999999999979e-273 < B < 2.7000000000000001e-295 or 1.35e-249 < B < 1.4e-217Initial program 33.7%
Applied egg-rr75.3%
div-sub16.1%
sub-neg16.1%
Applied egg-rr16.1%
sub-neg16.1%
Simplified16.1%
Taylor expanded in C around inf 32.7%
distribute-lft1-in32.7%
metadata-eval32.7%
mul0-lft61.5%
metadata-eval61.5%
Simplified61.5%
if 2.7000000000000001e-295 < B < 1.35e-249 or 1.4e-217 < B < 1.1e-175Initial program 61.8%
Taylor expanded in A around inf 61.2%
if 1.1e-175 < B < 1.35e-41Initial program 77.5%
Taylor expanded in C around -inf 56.2%
if 1.35e-41 < B Initial program 53.6%
Taylor expanded in B around inf 60.7%
Final simplification61.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
(if (<= B -5.1e-52)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -6.3e-273)
t_0
(if (<= B 4e-295)
(/ 180.0 (/ PI (atan 0.0)))
(if (<= B 1.5e-175)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 1e-40) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
double tmp;
if (B <= -5.1e-52) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -6.3e-273) {
tmp = t_0;
} else if (B <= 4e-295) {
tmp = 180.0 / (((double) M_PI) / atan(0.0));
} else if (B <= 1.5e-175) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 1e-40) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
double tmp;
if (B <= -5.1e-52) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -6.3e-273) {
tmp = t_0;
} else if (B <= 4e-295) {
tmp = 180.0 / (Math.PI / Math.atan(0.0));
} else if (B <= 1.5e-175) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 1e-40) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) tmp = 0 if B <= -5.1e-52: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -6.3e-273: tmp = t_0 elif B <= 4e-295: tmp = 180.0 / (math.pi / math.atan(0.0)) elif B <= 1.5e-175: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 1e-40: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)) tmp = 0.0 if (B <= -5.1e-52) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -6.3e-273) tmp = t_0; elseif (B <= 4e-295) tmp = Float64(180.0 / Float64(pi / atan(0.0))); elseif (B <= 1.5e-175) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 1e-40) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((2.0 * (C / B))) / pi); tmp = 0.0; if (B <= -5.1e-52) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -6.3e-273) tmp = t_0; elseif (B <= 4e-295) tmp = 180.0 / (pi / atan(0.0)); elseif (B <= 1.5e-175) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 1e-40) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.1e-52], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.3e-273], t$95$0, If[LessEqual[B, 4e-295], N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.5e-175], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1e-40], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -5.1 \cdot 10^{-52}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -6.3 \cdot 10^{-273}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-295}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-175}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 10^{-40}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.09999999999999989e-52Initial program 54.4%
Taylor expanded in B around -inf 68.3%
if -5.09999999999999989e-52 < B < -6.29999999999999977e-273 or 1.5e-175 < B < 9.9999999999999993e-41Initial program 61.2%
Taylor expanded in C around -inf 43.6%
if -6.29999999999999977e-273 < B < 4.00000000000000024e-295Initial program 35.8%
Applied egg-rr77.3%
div-sub16.0%
sub-neg16.0%
Applied egg-rr16.0%
sub-neg16.0%
Simplified16.0%
Taylor expanded in C around inf 20.1%
distribute-lft1-in20.1%
metadata-eval20.1%
mul0-lft63.4%
metadata-eval63.4%
Simplified63.4%
if 4.00000000000000024e-295 < B < 1.5e-175Initial program 54.0%
Taylor expanded in A around inf 49.9%
if 9.9999999999999993e-41 < B Initial program 53.6%
Taylor expanded in B around inf 60.7%
Final simplification57.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -5.2e+166)
t_1
(if (<= A -4.5e+103)
t_0
(if (<= A -2.4e-62)
t_1
(if (<= A 8.2e-176) t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -5.2e+166) {
tmp = t_1;
} else if (A <= -4.5e+103) {
tmp = t_0;
} else if (A <= -2.4e-62) {
tmp = t_1;
} else if (A <= 8.2e-176) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -5.2e+166) {
tmp = t_1;
} else if (A <= -4.5e+103) {
tmp = t_0;
} else if (A <= -2.4e-62) {
tmp = t_1;
} else if (A <= 8.2e-176) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -5.2e+166: tmp = t_1 elif A <= -4.5e+103: tmp = t_0 elif A <= -2.4e-62: tmp = t_1 elif A <= 8.2e-176: tmp = t_0 else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -5.2e+166) tmp = t_1; elseif (A <= -4.5e+103) tmp = t_0; elseif (A <= -2.4e-62) tmp = t_1; elseif (A <= 8.2e-176) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + (C / B))) / pi); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -5.2e+166) tmp = t_1; elseif (A <= -4.5e+103) tmp = t_0; elseif (A <= -2.4e-62) tmp = t_1; elseif (A <= 8.2e-176) tmp = t_0; else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.2e+166], t$95$1, If[LessEqual[A, -4.5e+103], t$95$0, If[LessEqual[A, -2.4e-62], t$95$1, If[LessEqual[A, 8.2e-176], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -5.2 \cdot 10^{+166}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -4.5 \cdot 10^{+103}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -2.4 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 8.2 \cdot 10^{-176}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.1999999999999999e166 or -4.50000000000000001e103 < A < -2.39999999999999984e-62Initial program 29.7%
Taylor expanded in A around -inf 62.0%
associate-*r/62.0%
Simplified62.0%
if -5.1999999999999999e166 < A < -4.50000000000000001e103 or -2.39999999999999984e-62 < A < 8.2000000000000005e-176Initial program 56.1%
Taylor expanded in B around -inf 54.0%
associate--l+54.0%
div-sub55.1%
Simplified55.1%
Taylor expanded in C around inf 55.0%
if 8.2000000000000005e-176 < A Initial program 70.3%
Taylor expanded in C around 0 68.3%
mul-1-neg68.3%
distribute-neg-frac268.3%
+-commutative68.3%
unpow268.3%
unpow268.3%
hypot-define82.1%
Simplified82.1%
Taylor expanded in B around -inf 67.0%
neg-mul-167.0%
unsub-neg67.0%
Simplified67.0%
Final simplification61.3%
(FPCore (A B C)
:precision binary64
(if (<= B -6.5e-61)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.85e-7)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.5e-61) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.85e-7) {
tmp = 180.0 * (atan(((A / B) * -2.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 <= -6.5e-61) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.85e-7) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.5e-61: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.85e-7: tmp = 180.0 * (math.atan(((A / B) * -2.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 <= -6.5e-61) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.85e-7) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.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 <= -6.5e-61) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.85e-7) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.5e-61], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.85e-7], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $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 -6.5 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.85 \cdot 10^{-7}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.4999999999999994e-61Initial program 53.8%
Taylor expanded in B around -inf 66.4%
if -6.4999999999999994e-61 < B < 1.85000000000000002e-7Initial program 58.8%
Taylor expanded in A around inf 36.1%
if 1.85000000000000002e-7 < B Initial program 52.2%
Taylor expanded in B around inf 62.1%
Final simplification53.4%
(FPCore (A B C)
:precision binary64
(if (<= A -3.5e+167)
(/ 180.0 (/ PI (atan 0.0)))
(if (<= A 1.22e-176)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e+167) {
tmp = 180.0 / (((double) M_PI) / atan(0.0));
} else if (A <= 1.22e-176) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e+167) {
tmp = 180.0 / (Math.PI / Math.atan(0.0));
} else if (A <= 1.22e-176) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.5e+167: tmp = 180.0 / (math.pi / math.atan(0.0)) elif A <= 1.22e-176: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.5e+167) tmp = Float64(180.0 / Float64(pi / atan(0.0))); elseif (A <= 1.22e-176) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.5e+167) tmp = 180.0 / (pi / atan(0.0)); elseif (A <= 1.22e-176) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.5e+167], N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.22e-176], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.5 \cdot 10^{+167}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{elif}\;A \leq 1.22 \cdot 10^{-176}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.49999999999999987e167Initial program 13.1%
Applied egg-rr52.8%
div-sub16.7%
sub-neg16.7%
Applied egg-rr16.7%
sub-neg16.7%
Simplified16.7%
Taylor expanded in C around inf 2.8%
distribute-lft1-in2.8%
metadata-eval2.8%
mul0-lft39.0%
metadata-eval39.0%
Simplified39.0%
if -3.49999999999999987e167 < A < 1.2200000000000001e-176Initial program 52.0%
Taylor expanded in B around -inf 47.2%
associate--l+47.2%
div-sub48.0%
Simplified48.0%
Taylor expanded in C around inf 48.1%
if 1.2200000000000001e-176 < A Initial program 70.3%
Taylor expanded in C around 0 68.3%
mul-1-neg68.3%
distribute-neg-frac268.3%
+-commutative68.3%
unpow268.3%
unpow268.3%
hypot-define82.1%
Simplified82.1%
Taylor expanded in B around -inf 67.0%
neg-mul-167.0%
unsub-neg67.0%
Simplified67.0%
Final simplification54.6%
(FPCore (A B C) :precision binary64 (if (<= B -8.4e-53) (/ (* 180.0 (atan (- 1.0 (/ (- A C) B)))) PI) (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.4e-53) {
tmp = (180.0 * atan((1.0 - ((A - C) / B)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8.4e-53) {
tmp = (180.0 * Math.atan((1.0 - ((A - C) / B)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.4e-53: tmp = (180.0 * math.atan((1.0 - ((A - C) / B)))) / math.pi else: tmp = 180.0 * (math.atan(((1.0 / B) * ((C - A) - B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.4e-53) tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(Float64(A - C) / B)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.4e-53) tmp = (180.0 * atan((1.0 - ((A - C) / B)))) / pi; else tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.4e-53], N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.4 \cdot 10^{-53}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A - C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -8.3999999999999991e-53Initial program 54.4%
associate-*r/54.4%
associate-*l/54.4%
*-un-lft-identity54.4%
unpow254.4%
unpow254.4%
hypot-define84.2%
Applied egg-rr84.2%
Taylor expanded in B around -inf 82.3%
associate--l+82.3%
div-sub82.3%
Simplified82.3%
if -8.3999999999999991e-53 < B Initial program 55.8%
Taylor expanded in B around inf 62.7%
Final simplification69.2%
(FPCore (A B C) :precision binary64 (if (<= B 7.5e-95) (* 180.0 (/ (atan (- 1.0 (/ (- A C) B))) PI)) (* 180.0 (/ (atan (/ (+ B A) (- B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 7.5e-95) {
tmp = 180.0 * (atan((1.0 - ((A - C) / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B + A) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 7.5e-95) {
tmp = 180.0 * (Math.atan((1.0 - ((A - C) / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B + A) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 7.5e-95: tmp = 180.0 * (math.atan((1.0 - ((A - C) / B))) / math.pi) else: tmp = 180.0 * (math.atan(((B + A) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 7.5e-95) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(Float64(A - C) / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + A) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 7.5e-95) tmp = 180.0 * (atan((1.0 - ((A - C) / B))) / pi); else tmp = 180.0 * (atan(((B + A) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 7.5e-95], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B + A), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 7.5 \cdot 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A - C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + A}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 7.5000000000000003e-95Initial program 55.4%
Taylor expanded in B around -inf 63.8%
associate--l+63.8%
div-sub65.5%
Simplified65.5%
if 7.5000000000000003e-95 < B Initial program 55.3%
Taylor expanded in C around 0 51.7%
mul-1-neg51.7%
distribute-neg-frac251.7%
+-commutative51.7%
unpow251.7%
unpow251.7%
hypot-define74.9%
Simplified74.9%
Taylor expanded in A around 0 71.2%
Final simplification67.2%
(FPCore (A B C) :precision binary64 (if (<= B 1.8e-97) (* 180.0 (/ (atan (- 1.0 (/ (- A C) B))) PI)) (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1.8e-97) {
tmp = 180.0 * (atan((1.0 - ((A - C) / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 1.8e-97) {
tmp = 180.0 * (Math.atan((1.0 - ((A - C) / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1.8e-97: tmp = 180.0 * (math.atan((1.0 - ((A - C) / B))) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 1.8e-97) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(Float64(A - C) / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 1.8e-97) tmp = 180.0 * (atan((1.0 - ((A - C) / B))) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1.8e-97], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.8 \cdot 10^{-97}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A - C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.79999999999999999e-97Initial program 55.4%
Taylor expanded in B around -inf 63.8%
associate--l+63.8%
div-sub65.5%
Simplified65.5%
if 1.79999999999999999e-97 < B Initial program 55.3%
Taylor expanded in C around 0 51.7%
mul-1-neg51.7%
distribute-neg-frac251.7%
+-commutative51.7%
unpow251.7%
unpow251.7%
hypot-define74.9%
Simplified74.9%
Taylor expanded in A around 0 71.2%
Final simplification67.2%
(FPCore (A B C) :precision binary64 (if (<= B -8.4e-53) (* 180.0 (/ (atan (- 1.0 (/ (- A C) B))) PI)) (/ 180.0 (/ PI (atan (+ -1.0 (/ (- C A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.4e-53) {
tmp = 180.0 * (atan((1.0 - ((A - C) / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-1.0 + ((C - A) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8.4e-53) {
tmp = 180.0 * (Math.atan((1.0 - ((A - C) / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-1.0 + ((C - A) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.4e-53: tmp = 180.0 * (math.atan((1.0 - ((A - C) / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-1.0 + ((C - A) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.4e-53) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(Float64(A - C) / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-1.0 + Float64(Float64(C - A) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.4e-53) tmp = 180.0 * (atan((1.0 - ((A - C) / B))) / pi); else tmp = 180.0 / (pi / atan((-1.0 + ((C - A) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.4e-53], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.4 \cdot 10^{-53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A - C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-1 + \frac{C - A}{B}\right)}}\\
\end{array}
\end{array}
if B < -8.3999999999999991e-53Initial program 54.4%
Taylor expanded in B around -inf 82.3%
associate--l+82.3%
div-sub82.3%
Simplified82.3%
if -8.3999999999999991e-53 < B Initial program 55.8%
Applied egg-rr78.6%
div-sub65.1%
sub-neg65.1%
Applied egg-rr65.1%
sub-neg65.1%
Simplified65.1%
Taylor expanded in B around inf 60.9%
+-commutative60.9%
associate--r+60.9%
div-sub62.7%
Simplified62.7%
Final simplification69.2%
(FPCore (A B C) :precision binary64 (if (<= B -8.4e-53) (/ (* 180.0 (atan (- 1.0 (/ (- A C) B)))) PI) (/ 180.0 (/ PI (atan (+ -1.0 (/ (- C A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.4e-53) {
tmp = (180.0 * atan((1.0 - ((A - C) / B)))) / ((double) M_PI);
} else {
tmp = 180.0 / (((double) M_PI) / atan((-1.0 + ((C - A) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8.4e-53) {
tmp = (180.0 * Math.atan((1.0 - ((A - C) / B)))) / Math.PI;
} else {
tmp = 180.0 / (Math.PI / Math.atan((-1.0 + ((C - A) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.4e-53: tmp = (180.0 * math.atan((1.0 - ((A - C) / B)))) / math.pi else: tmp = 180.0 / (math.pi / math.atan((-1.0 + ((C - A) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.4e-53) tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(Float64(A - C) / B)))) / pi); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-1.0 + Float64(Float64(C - A) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.4e-53) tmp = (180.0 * atan((1.0 - ((A - C) / B)))) / pi; else tmp = 180.0 / (pi / atan((-1.0 + ((C - A) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.4e-53], N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.4 \cdot 10^{-53}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A - C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-1 + \frac{C - A}{B}\right)}}\\
\end{array}
\end{array}
if B < -8.3999999999999991e-53Initial program 54.4%
associate-*r/54.4%
associate-*l/54.4%
*-un-lft-identity54.4%
unpow254.4%
unpow254.4%
hypot-define84.2%
Applied egg-rr84.2%
Taylor expanded in B around -inf 82.3%
associate--l+82.3%
div-sub82.3%
Simplified82.3%
if -8.3999999999999991e-53 < B Initial program 55.8%
Applied egg-rr78.6%
div-sub65.1%
sub-neg65.1%
Applied egg-rr65.1%
sub-neg65.1%
Simplified65.1%
Taylor expanded in B around inf 60.9%
+-commutative60.9%
associate--r+60.9%
div-sub62.7%
Simplified62.7%
Final simplification69.2%
(FPCore (A B C)
:precision binary64
(if (<= B -1.46e-74)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.45e-174)
(/ 180.0 (/ PI (atan 0.0)))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.46e-74) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.45e-174) {
tmp = 180.0 / (((double) M_PI) / atan(0.0));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.46e-74) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.45e-174) {
tmp = 180.0 / (Math.PI / Math.atan(0.0));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.46e-74: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.45e-174: tmp = 180.0 / (math.pi / math.atan(0.0)) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.46e-74) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.45e-174) tmp = Float64(180.0 / Float64(pi / atan(0.0))); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.46e-74) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.45e-174) tmp = 180.0 / (pi / atan(0.0)); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.46e-74], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.45e-174], N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.46 \cdot 10^{-74}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.45 \cdot 10^{-174}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.46e-74Initial program 54.3%
Taylor expanded in B around -inf 65.8%
if -1.46e-74 < B < 2.45000000000000005e-174Initial program 52.8%
Applied egg-rr76.2%
div-sub46.8%
sub-neg46.8%
Applied egg-rr46.8%
sub-neg46.8%
Simplified46.8%
Taylor expanded in C around inf 16.9%
distribute-lft1-in16.9%
metadata-eval16.9%
mul0-lft32.3%
metadata-eval32.3%
Simplified32.3%
if 2.45000000000000005e-174 < B Initial program 58.4%
Taylor expanded in B around inf 52.6%
Final simplification51.2%
(FPCore (A B C) :precision binary64 (if (<= B -1e-309) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-309) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1e-309) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1e-309: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1e-309) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1e-309) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-309], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-309}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.000000000000002e-309Initial program 53.3%
Taylor expanded in B around -inf 47.2%
if -1.000000000000002e-309 < B Initial program 57.5%
Taylor expanded in B around inf 42.3%
Final simplification44.9%
(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 55.3%
Taylor expanded in B around inf 21.1%
Final simplification21.1%
herbie shell --seed 2024130
(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)))