
(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 22 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
(atan
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))))
(if (<= t_0 -0.5)
(/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B))))
(if (<= t_0 0.0)
(* 180.0 (/ (atan (* 0.5 (+ (/ B A) (/ B (/ (pow A 2.0) C))))) PI))
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))))
double code(double A, double B, double C) {
double t_0 = atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))))));
double tmp;
if (t_0 <= -0.5) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
} else if (t_0 <= 0.0) {
tmp = 180.0 * (atan((0.5 * ((B / A) + (B / (pow(A, 2.0) / C))))) / ((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 = Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))))));
double tmp;
if (t_0 <= -0.5) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
} else if (t_0 <= 0.0) {
tmp = 180.0 * (Math.atan((0.5 * ((B / A) + (B / (Math.pow(A, 2.0) / C))))) / 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 = math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) tmp = 0 if t_0 <= -0.5: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) elif t_0 <= 0.0: tmp = 180.0 * (math.atan((0.5 * ((B / A) + (B / (math.pow(A, 2.0) / C))))) / 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 = atan(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.5) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); elseif (t_0 <= 0.0) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B / A) + Float64(B / Float64((A ^ 2.0) / C))))) / 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 = atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))); tmp = 0.0; if (t_0 <= -0.5) tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); elseif (t_0 <= 0.0) tmp = 180.0 * (atan((0.5 * ((B / A) + (B / ((A ^ 2.0) / C))))) / 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[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]}, If[LessEqual[t$95$0, -0.5], 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], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(B / N[(N[Power[A, 2.0], $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\\
\mathbf{if}\;t_0 \leq -0.5:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{\frac{{A}^{2}}{C}}\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 (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) < -0.5Initial program 60.8%
Applied egg-rr90.5%
if -0.5 < (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) < -0.0Initial program 25.4%
Taylor expanded in A around -inf 63.9%
distribute-lft-out63.9%
associate-/l*64.7%
Simplified64.7%
if -0.0 < (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) Initial program 56.4%
associate-*l/56.4%
*-lft-identity56.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-def87.7%
Simplified87.7%
Final simplification85.5%
(FPCore (A B C) :precision binary64 (if (<= A -8000000000.0) (* (/ 180.0 PI) (atan (/ (* B 0.5) A))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8000000000.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} 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 <= -8000000000.0) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} 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 <= -8000000000.0: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) 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 <= -8000000000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); 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 <= -8000000000.0) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); 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, -8000000000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $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 -8000000000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\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 < -8e9Initial program 25.1%
Applied egg-rr62.7%
Taylor expanded in A around -inf 74.7%
associate-/r/74.7%
associate-*r/74.7%
Applied egg-rr74.7%
if -8e9 < A Initial program 64.0%
Simplified85.8%
Final simplification82.9%
(FPCore (A B C) :precision binary64 (if (<= A -6.4e+128) (* (/ 180.0 PI) (atan (/ (* B 0.5) A))) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e+128) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e+128) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.4e+128: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.4e+128) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.4e+128) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.4e+128], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.4 \cdot 10^{+128}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.39999999999999971e128Initial program 17.9%
Applied egg-rr61.1%
Taylor expanded in A around -inf 87.0%
associate-/r/87.0%
associate-*r/87.0%
Applied egg-rr87.0%
if -6.39999999999999971e128 < A Initial program 60.1%
associate-*l/60.1%
*-lft-identity60.1%
+-commutative60.1%
unpow260.1%
unpow260.1%
hypot-def83.0%
Simplified83.0%
Final simplification83.6%
(FPCore (A B C)
:precision binary64
(if (<= C -7.1e+28)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= C 4.2e+130)
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI))
(/ (* 180.0 (atan (+ (/ 0.0 B) (* -0.5 (/ B C))))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -7.1e+28) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (C <= 4.2e+130) {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((0.0 / B) + (-0.5 * (B / C))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -7.1e+28) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (C <= 4.2e+130) {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((0.0 / B) + (-0.5 * (B / C))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -7.1e+28: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif C <= 4.2e+130: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) else: tmp = (180.0 * math.atan(((0.0 / B) + (-0.5 * (B / C))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -7.1e+28) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (C <= 4.2e+130) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 / B) + Float64(-0.5 * Float64(B / C))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -7.1e+28) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (C <= 4.2e+130) tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); else tmp = (180.0 * atan(((0.0 / B) + (-0.5 * (B / C))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -7.1e+28], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.2e+130], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -7.1 \cdot 10^{+28}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.2 \cdot 10^{+130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -7.0999999999999999e28Initial program 82.8%
Simplified95.4%
Taylor expanded in B around -inf 88.2%
neg-mul-188.2%
unsub-neg88.2%
Simplified88.2%
if -7.0999999999999999e28 < C < 4.19999999999999981e130Initial program 51.1%
Taylor expanded in C around 0 48.9%
associate-*r/48.9%
mul-1-neg48.9%
+-commutative48.9%
unpow248.9%
unpow248.9%
hypot-def74.2%
Simplified74.2%
if 4.19999999999999981e130 < C Initial program 13.7%
associate-*r/13.7%
associate-*l/13.7%
*-un-lft-identity13.7%
unpow213.7%
unpow213.7%
hypot-def63.4%
Applied egg-rr63.4%
Taylor expanded in C around inf 51.3%
associate-*r/51.3%
distribute-rgt1-in51.3%
metadata-eval51.3%
mul0-lft51.3%
metadata-eval51.3%
associate--l+51.3%
unpow251.3%
mul-1-neg51.3%
mul-1-neg51.3%
sqr-neg51.3%
unpow251.3%
Simplified51.3%
Taylor expanded in A around 0 87.9%
Final simplification79.6%
(FPCore (A B C)
:precision binary64
(if (<= C -1.2e+28)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= C 5.5e+130)
(/ 180.0 (/ PI (atan (/ (- (- A) (hypot A B)) B))))
(/ (* 180.0 (atan (+ (/ 0.0 B) (* -0.5 (/ B C))))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.2e+28) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (C <= 5.5e+130) {
tmp = 180.0 / (((double) M_PI) / atan(((-A - hypot(A, B)) / B)));
} else {
tmp = (180.0 * atan(((0.0 / B) + (-0.5 * (B / C))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.2e+28) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (C <= 5.5e+130) {
tmp = 180.0 / (Math.PI / Math.atan(((-A - Math.hypot(A, B)) / B)));
} else {
tmp = (180.0 * Math.atan(((0.0 / B) + (-0.5 * (B / C))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.2e+28: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif C <= 5.5e+130: tmp = 180.0 / (math.pi / math.atan(((-A - math.hypot(A, B)) / B))) else: tmp = (180.0 * math.atan(((0.0 / B) + (-0.5 * (B / C))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.2e+28) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (C <= 5.5e+130) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 / B) + Float64(-0.5 * Float64(B / C))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.2e+28) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (C <= 5.5e+130) tmp = 180.0 / (pi / atan(((-A - hypot(A, B)) / B))); else tmp = (180.0 * atan(((0.0 / B) + (-0.5 * (B / C))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.2e+28], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.5e+130], N[(180.0 / N[(Pi / N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.2 \cdot 10^{+28}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.5 \cdot 10^{+130}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.19999999999999991e28Initial program 82.8%
Simplified95.4%
Taylor expanded in B around -inf 88.2%
neg-mul-188.2%
unsub-neg88.2%
Simplified88.2%
if -1.19999999999999991e28 < C < 5.4999999999999997e130Initial program 51.1%
Applied egg-rr75.8%
Taylor expanded in C around 0 48.9%
mul-1-neg48.9%
unpow248.9%
unpow248.9%
hypot-def74.2%
Simplified74.2%
if 5.4999999999999997e130 < C Initial program 13.7%
associate-*r/13.7%
associate-*l/13.7%
*-un-lft-identity13.7%
unpow213.7%
unpow213.7%
hypot-def63.4%
Applied egg-rr63.4%
Taylor expanded in C around inf 51.3%
associate-*r/51.3%
distribute-rgt1-in51.3%
metadata-eval51.3%
mul0-lft51.3%
metadata-eval51.3%
associate--l+51.3%
unpow251.3%
mul-1-neg51.3%
mul-1-neg51.3%
sqr-neg51.3%
unpow251.3%
Simplified51.3%
Taylor expanded in A around 0 87.9%
Final simplification79.6%
(FPCore (A B C)
:precision binary64
(if (<= C -7.2e+28)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= C 7e+130)
(/ (* -180.0 (atan (/ (+ A (hypot A B)) B))) PI)
(/ (* 180.0 (atan (+ (/ 0.0 B) (* -0.5 (/ B C))))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -7.2e+28) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (C <= 7e+130) {
tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((0.0 / B) + (-0.5 * (B / C))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -7.2e+28) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (C <= 7e+130) {
tmp = (-180.0 * Math.atan(((A + Math.hypot(A, B)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((0.0 / B) + (-0.5 * (B / C))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -7.2e+28: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif C <= 7e+130: tmp = (-180.0 * math.atan(((A + math.hypot(A, B)) / B))) / math.pi else: tmp = (180.0 * math.atan(((0.0 / B) + (-0.5 * (B / C))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -7.2e+28) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (C <= 7e+130) tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(A, B)) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 / B) + Float64(-0.5 * Float64(B / C))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -7.2e+28) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (C <= 7e+130) tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / pi; else tmp = (180.0 * atan(((0.0 / B) + (-0.5 * (B / C))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -7.2e+28], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7e+130], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -7.2 \cdot 10^{+28}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7 \cdot 10^{+130}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -7.1999999999999999e28Initial program 82.8%
Simplified95.4%
Taylor expanded in B around -inf 88.2%
neg-mul-188.2%
unsub-neg88.2%
Simplified88.2%
if -7.1999999999999999e28 < C < 7.0000000000000002e130Initial program 51.1%
Applied egg-rr75.8%
Taylor expanded in C around 0 48.9%
mul-1-neg48.9%
unpow248.9%
unpow248.9%
hypot-def74.2%
Simplified74.2%
expm1-log1p-u42.4%
expm1-udef42.4%
associate-/r/42.4%
distribute-frac-neg42.4%
atan-neg42.4%
Applied egg-rr42.4%
expm1-def42.4%
expm1-log1p74.2%
associate-*l/74.2%
neg-mul-174.2%
associate-*r*74.2%
metadata-eval74.2%
Simplified74.2%
if 7.0000000000000002e130 < C Initial program 13.7%
associate-*r/13.7%
associate-*l/13.7%
*-un-lft-identity13.7%
unpow213.7%
unpow213.7%
hypot-def63.4%
Applied egg-rr63.4%
Taylor expanded in C around inf 51.3%
associate-*r/51.3%
distribute-rgt1-in51.3%
metadata-eval51.3%
mul0-lft51.3%
metadata-eval51.3%
associate--l+51.3%
unpow251.3%
mul-1-neg51.3%
mul-1-neg51.3%
sqr-neg51.3%
unpow251.3%
Simplified51.3%
Taylor expanded in A around 0 87.9%
Final simplification79.6%
(FPCore (A B C)
:precision binary64
(if (<= A -0.00018)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 2.3e-129)
(/ 180.0 (/ PI (atan (/ (+ B C) B))))
(if (or (<= A 8.5e+38) (not (<= A 2.12e+67)))
(/ 180.0 (/ PI (atan (/ (- (- A) B) B))))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -0.00018) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 2.3e-129) {
tmp = 180.0 / (((double) M_PI) / atan(((B + C) / B)));
} else if ((A <= 8.5e+38) || !(A <= 2.12e+67)) {
tmp = 180.0 / (((double) M_PI) / atan(((-A - B) / B)));
} 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 <= -0.00018) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 2.3e-129) {
tmp = 180.0 / (Math.PI / Math.atan(((B + C) / B)));
} else if ((A <= 8.5e+38) || !(A <= 2.12e+67)) {
tmp = 180.0 / (Math.PI / Math.atan(((-A - B) / B)));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -0.00018: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 2.3e-129: tmp = 180.0 / (math.pi / math.atan(((B + C) / B))) elif (A <= 8.5e+38) or not (A <= 2.12e+67): tmp = 180.0 / (math.pi / math.atan(((-A - B) / B))) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -0.00018) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 2.3e-129) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B + C) / B)))); elseif ((A <= 8.5e+38) || !(A <= 2.12e+67)) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(-A) - B) / B)))); 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 (A <= -0.00018) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 2.3e-129) tmp = 180.0 / (pi / atan(((B + C) / B))); elseif ((A <= 8.5e+38) || ~((A <= 2.12e+67))) tmp = 180.0 / (pi / atan(((-A - B) / B))); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -0.00018], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.3e-129], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, 8.5e+38], N[Not[LessEqual[A, 2.12e+67]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[((-A) - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $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}\;A \leq -0.00018:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 2.3 \cdot 10^{-129}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B + C}{B}\right)}}\\
\mathbf{elif}\;A \leq 8.5 \cdot 10^{+38} \lor \neg \left(A \leq 2.12 \cdot 10^{+67}\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.80000000000000011e-4Initial program 25.1%
Applied egg-rr62.7%
Taylor expanded in A around -inf 74.7%
associate-/r/74.7%
associate-*r/74.7%
Applied egg-rr74.7%
if -1.80000000000000011e-4 < A < 2.3e-129Initial program 55.8%
Applied egg-rr82.3%
Taylor expanded in B around -inf 51.9%
Taylor expanded in A around 0 52.1%
if 2.3e-129 < A < 8.4999999999999997e38 or 2.1199999999999999e67 < A Initial program 77.0%
Applied egg-rr91.5%
Taylor expanded in C around 0 75.9%
mul-1-neg75.9%
unpow275.9%
unpow275.9%
hypot-def86.0%
Simplified86.0%
Taylor expanded in A around 0 80.4%
+-commutative80.4%
Simplified80.4%
if 8.4999999999999997e38 < A < 2.1199999999999999e67Initial program 45.0%
associate-*r/45.2%
associate-*l/45.2%
*-un-lft-identity45.2%
unpow245.2%
unpow245.2%
hypot-def76.4%
Applied egg-rr76.4%
Taylor expanded in C around inf 31.6%
associate-*r/31.6%
distribute-rgt1-in31.6%
metadata-eval31.6%
mul0-lft31.6%
metadata-eval31.6%
associate--l+31.6%
unpow231.6%
mul-1-neg31.6%
mul-1-neg31.6%
sqr-neg31.6%
unpow231.6%
Simplified31.6%
Taylor expanded in B around 0 60.1%
Final simplification67.2%
(FPCore (A B C)
:precision binary64
(if (<= A -0.0125)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 2.6e-139)
(/ 180.0 (/ PI (atan (/ (+ B C) B))))
(if (or (<= A 1.9e+16) (not (<= A 2.3e+46)))
(/ 180.0 (/ PI (atan (/ (- B A) B))))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -0.0125) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 2.6e-139) {
tmp = 180.0 / (((double) M_PI) / atan(((B + C) / B)));
} else if ((A <= 1.9e+16) || !(A <= 2.3e+46)) {
tmp = 180.0 / (((double) M_PI) / atan(((B - A) / B)));
} 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 <= -0.0125) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 2.6e-139) {
tmp = 180.0 / (Math.PI / Math.atan(((B + C) / B)));
} else if ((A <= 1.9e+16) || !(A <= 2.3e+46)) {
tmp = 180.0 / (Math.PI / Math.atan(((B - A) / B)));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -0.0125: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 2.6e-139: tmp = 180.0 / (math.pi / math.atan(((B + C) / B))) elif (A <= 1.9e+16) or not (A <= 2.3e+46): tmp = 180.0 / (math.pi / math.atan(((B - A) / B))) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -0.0125) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 2.6e-139) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B + C) / B)))); elseif ((A <= 1.9e+16) || !(A <= 2.3e+46)) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B - A) / B)))); 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 (A <= -0.0125) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 2.6e-139) tmp = 180.0 / (pi / atan(((B + C) / B))); elseif ((A <= 1.9e+16) || ~((A <= 2.3e+46))) tmp = 180.0 / (pi / atan(((B - A) / B))); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -0.0125], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.6e-139], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, 1.9e+16], N[Not[LessEqual[A, 2.3e+46]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $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}\;A \leq -0.0125:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 2.6 \cdot 10^{-139}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B + C}{B}\right)}}\\
\mathbf{elif}\;A \leq 1.9 \cdot 10^{+16} \lor \neg \left(A \leq 2.3 \cdot 10^{+46}\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B - A}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if A < -0.012500000000000001Initial program 25.1%
Applied egg-rr62.7%
Taylor expanded in A around -inf 74.7%
associate-/r/74.7%
associate-*r/74.7%
Applied egg-rr74.7%
if -0.012500000000000001 < A < 2.5999999999999998e-139Initial program 53.9%
Applied egg-rr81.6%
Taylor expanded in B around -inf 49.8%
Taylor expanded in A around 0 50.0%
if 2.5999999999999998e-139 < A < 1.9e16 or 2.3000000000000001e46 < A Initial program 78.0%
Applied egg-rr92.4%
Taylor expanded in B around -inf 70.8%
Taylor expanded in C around 0 68.9%
if 1.9e16 < A < 2.3000000000000001e46Initial program 22.1%
associate-*r/22.1%
associate-*l/22.1%
*-un-lft-identity22.1%
unpow222.1%
unpow222.1%
hypot-def59.5%
Applied egg-rr59.5%
Taylor expanded in C around inf 22.0%
associate-*r/22.0%
distribute-rgt1-in22.0%
metadata-eval22.0%
mul0-lft22.0%
metadata-eval22.0%
associate--l+22.0%
unpow222.0%
mul-1-neg22.0%
mul-1-neg22.0%
sqr-neg22.0%
unpow222.0%
Simplified22.0%
Taylor expanded in B around 0 62.3%
Final simplification63.4%
(FPCore (A B C)
:precision binary64
(if (<= B -5.2e-74)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.7e-208)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 1.8e-172)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.95e-36)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.2e-74) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.7e-208) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 1.8e-172) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.95e-36) {
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 tmp;
if (B <= -5.2e-74) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.7e-208) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 1.8e-172) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.95e-36) {
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): tmp = 0 if B <= -5.2e-74: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.7e-208: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 1.8e-172: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.95e-36: 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) tmp = 0.0 if (B <= -5.2e-74) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.7e-208) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 1.8e-172) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.95e-36) 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) tmp = 0.0; if (B <= -5.2e-74) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.7e-208) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 1.8e-172) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.95e-36) 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_] := If[LessEqual[B, -5.2e-74], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.7e-208], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.8e-172], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.95e-36], 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}
\mathbf{if}\;B \leq -5.2 \cdot 10^{-74}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.7 \cdot 10^{-208}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-172}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.95 \cdot 10^{-36}:\\
\;\;\;\;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 < -5.2000000000000002e-74Initial program 49.0%
Taylor expanded in B around -inf 55.9%
if -5.2000000000000002e-74 < B < -3.7000000000000002e-208Initial program 52.4%
Taylor expanded in A around inf 45.2%
if -3.7000000000000002e-208 < B < 1.80000000000000007e-172Initial program 52.1%
Taylor expanded in C around inf 55.7%
associate-*r/55.7%
distribute-rgt1-in55.7%
metadata-eval55.7%
mul0-lft55.7%
metadata-eval55.7%
Simplified55.7%
if 1.80000000000000007e-172 < B < 1.95e-36Initial program 61.5%
Taylor expanded in C around -inf 46.8%
if 1.95e-36 < B Initial program 58.0%
Taylor expanded in B around inf 59.6%
Final simplification55.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= C -3.6e-11)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -1.7e-251)
t_0
(if (<= C 1.05e-199)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 8.6e-9) t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (C <= -3.6e-11) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -1.7e-251) {
tmp = t_0;
} else if (C <= 1.05e-199) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 8.6e-9) {
tmp = t_0;
} 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 t_0 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (C <= -3.6e-11) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -1.7e-251) {
tmp = t_0;
} else if (C <= 1.05e-199) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 8.6e-9) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if C <= -3.6e-11: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -1.7e-251: tmp = t_0 elif C <= 1.05e-199: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 8.6e-9: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (C <= -3.6e-11) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -1.7e-251) tmp = t_0; elseif (C <= 1.05e-199) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 8.6e-9) tmp = t_0; 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) t_0 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (C <= -3.6e-11) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -1.7e-251) tmp = t_0; elseif (C <= 1.05e-199) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 8.6e-9) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.6e-11], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.7e-251], t$95$0, If[LessEqual[C, 1.05e-199], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.6e-9], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;C \leq -3.6 \cdot 10^{-11}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.7 \cdot 10^{-251}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 1.05 \cdot 10^{-199}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 8.6 \cdot 10^{-9}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.59999999999999985e-11Initial program 83.1%
Taylor expanded in C around -inf 69.8%
if -3.59999999999999985e-11 < C < -1.70000000000000008e-251 or 1.05000000000000001e-199 < C < 8.59999999999999925e-9Initial program 52.1%
Taylor expanded in A around -inf 42.5%
associate-*r/42.5%
Simplified42.5%
if -1.70000000000000008e-251 < C < 1.05000000000000001e-199Initial program 46.8%
Taylor expanded in B around inf 43.1%
if 8.59999999999999925e-9 < C Initial program 28.3%
associate-*r/28.3%
associate-*l/28.3%
*-un-lft-identity28.3%
unpow228.3%
unpow228.3%
hypot-def68.5%
Applied egg-rr68.5%
Taylor expanded in C around inf 38.0%
associate-*r/38.0%
distribute-rgt1-in38.0%
metadata-eval38.0%
mul0-lft38.0%
metadata-eval38.0%
associate--l+38.0%
unpow238.0%
mul-1-neg38.0%
mul-1-neg38.0%
sqr-neg38.0%
unpow238.0%
Simplified38.0%
Taylor expanded in B around 0 69.9%
Final simplification57.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B 0.5) A)))))
(if (<= C -2.1e-11)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -7.8e-252)
t_0
(if (<= C 1.85e-196)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 5e-8) t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
double tmp;
if (C <= -2.1e-11) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -7.8e-252) {
tmp = t_0;
} else if (C <= 1.85e-196) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 5e-8) {
tmp = t_0;
} 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 t_0 = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
double tmp;
if (C <= -2.1e-11) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -7.8e-252) {
tmp = t_0;
} else if (C <= 1.85e-196) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 5e-8) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) tmp = 0 if C <= -2.1e-11: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -7.8e-252: tmp = t_0 elif C <= 1.85e-196: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 5e-8: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))) tmp = 0.0 if (C <= -2.1e-11) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -7.8e-252) tmp = t_0; elseif (C <= 1.85e-196) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 5e-8) tmp = t_0; 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) t_0 = (180.0 / pi) * atan(((B * 0.5) / A)); tmp = 0.0; if (C <= -2.1e-11) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -7.8e-252) tmp = t_0; elseif (C <= 1.85e-196) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 5e-8) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2.1e-11], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -7.8e-252], t$95$0, If[LessEqual[C, 1.85e-196], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5e-8], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{if}\;C \leq -2.1 \cdot 10^{-11}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -7.8 \cdot 10^{-252}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 1.85 \cdot 10^{-196}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 5 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.0999999999999999e-11Initial program 83.1%
Taylor expanded in C around -inf 69.8%
if -2.0999999999999999e-11 < C < -7.7999999999999998e-252 or 1.85000000000000005e-196 < C < 4.9999999999999998e-8Initial program 52.1%
Applied egg-rr72.1%
Taylor expanded in A around -inf 42.6%
associate-/r/42.6%
associate-*r/42.6%
Applied egg-rr42.6%
if -7.7999999999999998e-252 < C < 1.85000000000000005e-196Initial program 46.8%
Taylor expanded in B around inf 43.1%
if 4.9999999999999998e-8 < C Initial program 28.3%
associate-*r/28.3%
associate-*l/28.3%
*-un-lft-identity28.3%
unpow228.3%
unpow228.3%
hypot-def68.5%
Applied egg-rr68.5%
Taylor expanded in C around inf 38.0%
associate-*r/38.0%
distribute-rgt1-in38.0%
metadata-eval38.0%
mul0-lft38.0%
metadata-eval38.0%
associate--l+38.0%
unpow238.0%
mul-1-neg38.0%
mul-1-neg38.0%
sqr-neg38.0%
unpow238.0%
Simplified38.0%
Taylor expanded in B around 0 69.9%
Final simplification57.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B 0.5) A)))))
(if (<= C -1.05e-70)
(/ 180.0 (/ PI (atan (/ (+ B C) B))))
(if (<= C -4e-251)
t_0
(if (<= C 1.65e-200)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 1.85e-8) t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
double tmp;
if (C <= -1.05e-70) {
tmp = 180.0 / (((double) M_PI) / atan(((B + C) / B)));
} else if (C <= -4e-251) {
tmp = t_0;
} else if (C <= 1.65e-200) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 1.85e-8) {
tmp = t_0;
} 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 t_0 = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
double tmp;
if (C <= -1.05e-70) {
tmp = 180.0 / (Math.PI / Math.atan(((B + C) / B)));
} else if (C <= -4e-251) {
tmp = t_0;
} else if (C <= 1.65e-200) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 1.85e-8) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) tmp = 0 if C <= -1.05e-70: tmp = 180.0 / (math.pi / math.atan(((B + C) / B))) elif C <= -4e-251: tmp = t_0 elif C <= 1.65e-200: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 1.85e-8: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))) tmp = 0.0 if (C <= -1.05e-70) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B + C) / B)))); elseif (C <= -4e-251) tmp = t_0; elseif (C <= 1.65e-200) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 1.85e-8) tmp = t_0; 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) t_0 = (180.0 / pi) * atan(((B * 0.5) / A)); tmp = 0.0; if (C <= -1.05e-70) tmp = 180.0 / (pi / atan(((B + C) / B))); elseif (C <= -4e-251) tmp = t_0; elseif (C <= 1.65e-200) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 1.85e-8) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.05e-70], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4e-251], t$95$0, If[LessEqual[C, 1.65e-200], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.85e-8], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{if}\;C \leq -1.05 \cdot 10^{-70}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B + C}{B}\right)}}\\
\mathbf{elif}\;C \leq -4 \cdot 10^{-251}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 1.65 \cdot 10^{-200}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 1.85 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.0500000000000001e-70Initial program 80.2%
Applied egg-rr94.2%
Taylor expanded in B around -inf 81.3%
Taylor expanded in A around 0 79.3%
if -1.0500000000000001e-70 < C < -4.00000000000000006e-251 or 1.6499999999999999e-200 < C < 1.85e-8Initial program 50.0%
Applied egg-rr72.3%
Taylor expanded in A around -inf 44.7%
associate-/r/44.8%
associate-*r/44.8%
Applied egg-rr44.8%
if -4.00000000000000006e-251 < C < 1.6499999999999999e-200Initial program 46.8%
Taylor expanded in B around inf 43.1%
if 1.85e-8 < C Initial program 28.3%
associate-*r/28.3%
associate-*l/28.3%
*-un-lft-identity28.3%
unpow228.3%
unpow228.3%
hypot-def68.5%
Applied egg-rr68.5%
Taylor expanded in C around inf 38.0%
associate-*r/38.0%
distribute-rgt1-in38.0%
metadata-eval38.0%
mul0-lft38.0%
metadata-eval38.0%
associate--l+38.0%
unpow238.0%
mul-1-neg38.0%
mul-1-neg38.0%
sqr-neg38.0%
unpow238.0%
Simplified38.0%
Taylor expanded in B around 0 69.9%
Final simplification62.1%
(FPCore (A B C)
:precision binary64
(if (<= B -4.2e-82)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.7e-206)
(/ 180.0 (/ PI (atan (/ (- A) B))))
(if (<= B 5.5e-173)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.4e-36)
(/ 180.0 (/ PI (atan (/ C B))))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.2e-82) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.7e-206) {
tmp = 180.0 / (((double) M_PI) / atan((-A / B)));
} else if (B <= 5.5e-173) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.4e-36) {
tmp = 180.0 / (((double) M_PI) / atan((C / B)));
} 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 <= -4.2e-82) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.7e-206) {
tmp = 180.0 / (Math.PI / Math.atan((-A / B)));
} else if (B <= 5.5e-173) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.4e-36) {
tmp = 180.0 / (Math.PI / Math.atan((C / B)));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.2e-82: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.7e-206: tmp = 180.0 / (math.pi / math.atan((-A / B))) elif B <= 5.5e-173: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.4e-36: tmp = 180.0 / (math.pi / math.atan((C / B))) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.2e-82) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.7e-206) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(-A) / B)))); elseif (B <= 5.5e-173) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.4e-36) tmp = Float64(180.0 / Float64(pi / atan(Float64(C / B)))); 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 <= -4.2e-82) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.7e-206) tmp = 180.0 / (pi / atan((-A / B))); elseif (B <= 5.5e-173) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.4e-36) tmp = 180.0 / (pi / atan((C / B))); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.2e-82], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.7e-206], N[(180.0 / N[(Pi / N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.5e-173], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-36], N[(180.0 / N[(Pi / N[ArcTan[N[(C / B), $MachinePrecision]], $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 -4.2 \cdot 10^{-82}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.7 \cdot 10^{-206}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{-A}{B}\right)}}\\
\mathbf{elif}\;B \leq 5.5 \cdot 10^{-173}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-36}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.2000000000000001e-82Initial program 49.0%
Taylor expanded in B around -inf 55.9%
if -4.2000000000000001e-82 < B < -3.69999999999999998e-206Initial program 52.4%
Applied egg-rr68.5%
Taylor expanded in B around -inf 51.3%
Taylor expanded in A around inf 45.2%
associate-*r/45.2%
neg-mul-145.2%
Simplified45.2%
if -3.69999999999999998e-206 < B < 5.50000000000000022e-173Initial program 52.1%
Taylor expanded in C around inf 55.7%
associate-*r/55.7%
distribute-rgt1-in55.7%
metadata-eval55.7%
mul0-lft55.7%
metadata-eval55.7%
Simplified55.7%
if 5.50000000000000022e-173 < B < 2.4e-36Initial program 61.5%
Applied egg-rr71.7%
Taylor expanded in B around -inf 56.1%
Taylor expanded in C around inf 46.8%
if 2.4e-36 < B Initial program 58.0%
Taylor expanded in B around inf 59.6%
Final simplification55.0%
(FPCore (A B C)
:precision binary64
(if (<= B -8.5e-70)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.2e-212)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 1.45e-171)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 9e-37)
(/ 180.0 (/ PI (atan (/ C B))))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.5e-70) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.2e-212) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 1.45e-171) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 9e-37) {
tmp = 180.0 / (((double) M_PI) / atan((C / B)));
} 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 <= -8.5e-70) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.2e-212) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 1.45e-171) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 9e-37) {
tmp = 180.0 / (Math.PI / Math.atan((C / B)));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.5e-70: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.2e-212: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 1.45e-171: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 9e-37: tmp = 180.0 / (math.pi / math.atan((C / B))) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.5e-70) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.2e-212) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 1.45e-171) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 9e-37) tmp = Float64(180.0 / Float64(pi / atan(Float64(C / B)))); 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 <= -8.5e-70) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.2e-212) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 1.45e-171) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 9e-37) tmp = 180.0 / (pi / atan((C / B))); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.5e-70], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.2e-212], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.45e-171], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-37], N[(180.0 / N[(Pi / N[ArcTan[N[(C / B), $MachinePrecision]], $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 -8.5 \cdot 10^{-70}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.2 \cdot 10^{-212}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-171}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-37}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.5000000000000002e-70Initial program 49.0%
Taylor expanded in B around -inf 55.9%
if -8.5000000000000002e-70 < B < -2.20000000000000003e-212Initial program 52.4%
Taylor expanded in A around inf 45.2%
if -2.20000000000000003e-212 < B < 1.4499999999999999e-171Initial program 52.1%
Taylor expanded in C around inf 55.7%
associate-*r/55.7%
distribute-rgt1-in55.7%
metadata-eval55.7%
mul0-lft55.7%
metadata-eval55.7%
Simplified55.7%
if 1.4499999999999999e-171 < B < 9.00000000000000081e-37Initial program 61.5%
Applied egg-rr71.7%
Taylor expanded in B around -inf 56.1%
Taylor expanded in C around inf 46.8%
if 9.00000000000000081e-37 < B Initial program 58.0%
Taylor expanded in B around inf 59.6%
Final simplification55.0%
(FPCore (A B C)
:precision binary64
(if (<= B -1.45e-208)
(/ 180.0 (/ PI (atan (/ (- B A) B))))
(if (<= B 3.8e-172)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.45e-208) {
tmp = 180.0 / (((double) M_PI) / atan(((B - A) / B)));
} else if (B <= 3.8e-172) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.45e-208) {
tmp = 180.0 / (Math.PI / Math.atan(((B - A) / B)));
} else if (B <= 3.8e-172) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.45e-208: tmp = 180.0 / (math.pi / math.atan(((B - A) / B))) elif B <= 3.8e-172: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.45e-208) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B - A) / B)))); elseif (B <= 3.8e-172) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.45e-208) tmp = 180.0 / (pi / atan(((B - A) / B))); elseif (B <= 3.8e-172) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.45e-208], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-172], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.45 \cdot 10^{-208}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B - A}{B}\right)}}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-172}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.45e-208Initial program 50.0%
Applied egg-rr72.5%
Taylor expanded in B around -inf 66.2%
Taylor expanded in C around 0 60.7%
if -1.45e-208 < B < 3.79999999999999987e-172Initial program 52.1%
Taylor expanded in C around inf 55.7%
associate-*r/55.7%
distribute-rgt1-in55.7%
metadata-eval55.7%
mul0-lft55.7%
metadata-eval55.7%
Simplified55.7%
if 3.79999999999999987e-172 < B Initial program 58.7%
Simplified81.8%
Taylor expanded in B around inf 77.9%
+-commutative77.9%
Simplified77.9%
Final simplification66.0%
(FPCore (A B C)
:precision binary64
(if (<= B -8e-238)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B 3.8e-172)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8e-238) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= 3.8e-172) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8e-238) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= 3.8e-172) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8e-238: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= 3.8e-172: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8e-238) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= 3.8e-172) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8e-238) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= 3.8e-172) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8e-238], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-172], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8 \cdot 10^{-238}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-172}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -7.9999999999999999e-238Initial program 50.1%
Simplified70.6%
Taylor expanded in B around -inf 65.5%
neg-mul-165.5%
unsub-neg65.5%
Simplified65.5%
if -7.9999999999999999e-238 < B < 3.79999999999999987e-172Initial program 52.1%
Taylor expanded in C around inf 58.2%
associate-*r/58.2%
distribute-rgt1-in58.2%
metadata-eval58.2%
mul0-lft58.2%
metadata-eval58.2%
Simplified58.2%
if 3.79999999999999987e-172 < B Initial program 58.7%
Simplified81.8%
Taylor expanded in B around inf 77.9%
+-commutative77.9%
Simplified77.9%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(if (<= B -1.26e-235)
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B))))
(if (<= B 6e-173)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.26e-235) {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
} else if (B <= 6e-173) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.26e-235) {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
} else if (B <= 6e-173) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.26e-235: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) elif B <= 6e-173: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.26e-235) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); elseif (B <= 6e-173) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.26e-235) tmp = 180.0 / (pi / atan((((B + C) - A) / B))); elseif (B <= 6e-173) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.26e-235], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6e-173], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.26 \cdot 10^{-235}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-173}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.26e-235Initial program 50.1%
Applied egg-rr73.2%
Taylor expanded in B around -inf 65.5%
if -1.26e-235 < B < 6.0000000000000002e-173Initial program 52.1%
Taylor expanded in C around inf 58.2%
associate-*r/58.2%
distribute-rgt1-in58.2%
metadata-eval58.2%
mul0-lft58.2%
metadata-eval58.2%
Simplified58.2%
if 6.0000000000000002e-173 < B Initial program 58.7%
Simplified81.8%
Taylor expanded in B around inf 77.9%
+-commutative77.9%
Simplified77.9%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(if (<= B -8e-235)
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B))))
(if (<= B 3e-173)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(/ 180.0 (/ PI (atan (/ (- (- C B) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8e-235) {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
} else if (B <= 3e-173) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8e-235) {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
} else if (B <= 3e-173) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8e-235: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) elif B <= 3e-173: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8e-235) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); elseif (B <= 3e-173) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8e-235) tmp = 180.0 / (pi / atan((((B + C) - A) / B))); elseif (B <= 3e-173) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 / (pi / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8e-235], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3e-173], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8 \cdot 10^{-235}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\mathbf{elif}\;B \leq 3 \cdot 10^{-173}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if B < -7.9999999999999997e-235Initial program 50.1%
Applied egg-rr73.2%
Taylor expanded in B around -inf 65.5%
if -7.9999999999999997e-235 < B < 3.0000000000000001e-173Initial program 52.1%
Taylor expanded in C around inf 58.2%
associate-*r/58.2%
distribute-rgt1-in58.2%
metadata-eval58.2%
mul0-lft58.2%
metadata-eval58.2%
Simplified58.2%
if 3.0000000000000001e-173 < B Initial program 58.7%
Applied egg-rr81.9%
Taylor expanded in B around inf 77.9%
mul-1-neg77.9%
unsub-neg77.9%
Simplified77.9%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(if (<= B -5.4e-135)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.7e-173)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.12e-36)
(/ 180.0 (/ PI (atan (/ C B))))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.4e-135) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.7e-173) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.12e-36) {
tmp = 180.0 / (((double) M_PI) / atan((C / B)));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.4e-135) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.7e-173) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.12e-36) {
tmp = 180.0 / (Math.PI / Math.atan((C / B)));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.4e-135: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.7e-173: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.12e-36: tmp = 180.0 / (math.pi / math.atan((C / B))) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.4e-135) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.7e-173) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.12e-36) tmp = Float64(180.0 / Float64(pi / atan(Float64(C / B)))); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.4e-135) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.7e-173) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.12e-36) tmp = 180.0 / (pi / atan((C / B))); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.4e-135], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.7e-173], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.12e-36], N[(180.0 / N[(Pi / N[ArcTan[N[(C / B), $MachinePrecision]], $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 -5.4 \cdot 10^{-135}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.7 \cdot 10^{-173}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.12 \cdot 10^{-36}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.39999999999999997e-135Initial program 49.3%
Taylor expanded in B around -inf 51.8%
if -5.39999999999999997e-135 < B < 3.7e-173Initial program 52.2%
Taylor expanded in C around inf 47.1%
associate-*r/47.1%
distribute-rgt1-in47.1%
metadata-eval47.1%
mul0-lft47.1%
metadata-eval47.1%
Simplified47.1%
if 3.7e-173 < B < 1.12e-36Initial program 61.5%
Applied egg-rr71.7%
Taylor expanded in B around -inf 56.1%
Taylor expanded in C around inf 46.8%
if 1.12e-36 < B Initial program 58.0%
Taylor expanded in B around inf 59.6%
Final simplification52.3%
(FPCore (A B C)
:precision binary64
(if (<= B -7.8e-134)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.95e-97)
(* 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 <= -7.8e-134) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.95e-97) {
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 <= -7.8e-134) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.95e-97) {
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 <= -7.8e-134: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.95e-97: 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 <= -7.8e-134) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.95e-97) 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 <= -7.8e-134) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.95e-97) 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, -7.8e-134], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.95e-97], 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 -7.8 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.95 \cdot 10^{-97}:\\
\;\;\;\;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 < -7.8000000000000002e-134Initial program 49.3%
Taylor expanded in B around -inf 51.8%
if -7.8000000000000002e-134 < B < 3.95000000000000025e-97Initial program 55.0%
Taylor expanded in C around inf 44.7%
associate-*r/44.7%
distribute-rgt1-in44.7%
metadata-eval44.7%
mul0-lft44.7%
metadata-eval44.7%
Simplified44.7%
if 3.95000000000000025e-97 < B Initial program 56.6%
Taylor expanded in B around inf 54.4%
Final simplification50.3%
(FPCore (A B C) :precision binary64 (if (<= B -1e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.999999999999969e-311Initial program 50.3%
Taylor expanded in B around -inf 36.5%
if -9.999999999999969e-311 < B Initial program 57.3%
Taylor expanded in B around inf 41.3%
Final simplification38.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 53.7%
Taylor expanded in B around inf 20.9%
Final simplification20.9%
herbie shell --seed 2023318
(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)))