
(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 23 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
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
(t_1 (/ (- (- C A) (hypot (- A C) B)) B)))
(if (<= t_0 -0.02)
(/ (* 180.0 (atan t_1)) PI)
(if (<= t_0 0.0)
(/ (* 180.0 (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))) PI)
(* 180.0 (/ (atan (+ (exp (log1p t_1)) -1.0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double t_1 = ((C - A) - hypot((A - C), B)) / B;
double tmp;
if (t_0 <= -0.02) {
tmp = (180.0 * atan(t_1)) / ((double) M_PI);
} else if (t_0 <= 0.0) {
tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((exp(log1p(t_1)) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double t_1 = ((C - A) - Math.hypot((A - C), B)) / B;
double tmp;
if (t_0 <= -0.02) {
tmp = (180.0 * Math.atan(t_1)) / Math.PI;
} else if (t_0 <= 0.0) {
tmp = (180.0 * Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((Math.exp(Math.log1p(t_1)) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) t_1 = ((C - A) - math.hypot((A - C), B)) / B tmp = 0 if t_0 <= -0.02: tmp = (180.0 * math.atan(t_1)) / math.pi elif t_0 <= 0.0: tmp = (180.0 * math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / math.pi else: tmp = 180.0 * (math.atan((math.exp(math.log1p(t_1)) + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) t_1 = Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B) tmp = 0.0 if (t_0 <= -0.02) tmp = Float64(Float64(180.0 * atan(t_1)) / pi); elseif (t_0 <= 0.0) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B)))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(exp(log1p(t_1)) + -1.0)) / pi)); end return 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]}, Block[{t$95$1 = N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[t$95$0, -0.02], N[(N[(180.0 * N[ArcTan[t$95$1], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[Exp[N[Log[1 + t$95$1], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
t_1 := \frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\\
\mathbf{if}\;t_0 \leq -0.02:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} t_1}{\pi}\\
\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(e^{\mathsf{log1p}\left(t_1\right)} + -1\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0200000000000000004Initial program 58.2%
associate-*r/58.2%
associate-*l/58.2%
*-un-lft-identity58.2%
unpow258.2%
unpow258.2%
hypot-def86.7%
Applied egg-rr86.7%
if -0.0200000000000000004 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 26.2%
associate-*r/26.2%
associate-*l/26.2%
*-un-lft-identity26.2%
unpow226.2%
unpow226.2%
hypot-def26.2%
Applied egg-rr26.2%
clear-num26.2%
inv-pow26.2%
Applied egg-rr26.2%
unpow-126.2%
associate--r+14.9%
Simplified14.9%
Taylor expanded in A around -inf 99.3%
if 0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 57.6%
*-commutative57.6%
+-commutative57.6%
unpow257.6%
unpow257.6%
hypot-udef90.0%
associate--r+87.9%
div-inv87.9%
expm1-log1p-u87.9%
expm1-udef89.1%
Applied egg-rr90.0%
Final simplification89.5%
(FPCore (A B C) :precision binary64 (if (<= A -5.5e+46) (/ (* 180.0 (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))) 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.5e+46) {
tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / ((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.5e+46) {
tmp = (180.0 * Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / 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.5e+46: tmp = (180.0 * math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / 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.5e+46) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B)))))) / 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.5e+46) tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / pi; else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.5e+46], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.5 \cdot 10^{+46}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\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.4999999999999998e46Initial program 17.4%
associate-*r/17.4%
associate-*l/17.4%
*-un-lft-identity17.4%
unpow217.4%
unpow217.4%
hypot-def49.4%
Applied egg-rr49.4%
clear-num49.4%
inv-pow49.4%
Applied egg-rr49.4%
unpow-149.4%
associate--r+23.3%
Simplified23.3%
Taylor expanded in A around -inf 76.3%
if -5.4999999999999998e46 < A Initial program 62.5%
Simplified88.6%
Final simplification86.4%
(FPCore (A B C) :precision binary64 (if (<= A -2.2e+45) (/ (* 180.0 (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))) PI) (/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e+45) {
tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e+45) {
tmp = (180.0 * Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.2e+45: tmp = (180.0 * math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / math.pi else: tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.2e+45) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B)))))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.2e+45) tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / pi; else tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.2e+45], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.2 \cdot 10^{+45}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.2e45Initial program 17.4%
associate-*r/17.4%
associate-*l/17.4%
*-un-lft-identity17.4%
unpow217.4%
unpow217.4%
hypot-def49.4%
Applied egg-rr49.4%
clear-num49.4%
inv-pow49.4%
Applied egg-rr49.4%
unpow-149.4%
associate--r+23.3%
Simplified23.3%
Taylor expanded in A around -inf 76.3%
if -2.2e45 < A Initial program 62.5%
associate-*r/62.5%
associate-*l/62.5%
*-un-lft-identity62.5%
unpow262.5%
unpow262.5%
hypot-def88.6%
Applied egg-rr88.6%
Final simplification86.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.02e+40)
(/ (* 180.0 (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))) PI)
(if (<= A 6.8e+99)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.02e+40) {
tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / ((double) M_PI);
} else if (A <= 6.8e+99) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / 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 (A <= -2.02e+40) {
tmp = (180.0 * Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / Math.PI;
} else if (A <= 6.8e+99) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / 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 A <= -2.02e+40: tmp = (180.0 * math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / math.pi elif A <= 6.8e+99: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / 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 (A <= -2.02e+40) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B)))))) / pi); elseif (A <= 6.8e+99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / 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 (A <= -2.02e+40) tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / pi; elseif (A <= 6.8e+99) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.02e+40], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 6.8e+99], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.02 \cdot 10^{+40}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.8 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.0200000000000001e40Initial program 17.4%
associate-*r/17.4%
associate-*l/17.4%
*-un-lft-identity17.4%
unpow217.4%
unpow217.4%
hypot-def49.4%
Applied egg-rr49.4%
clear-num49.4%
inv-pow49.4%
Applied egg-rr49.4%
unpow-149.4%
associate--r+23.3%
Simplified23.3%
Taylor expanded in A around -inf 76.3%
if -2.0200000000000001e40 < A < 6.79999999999999968e99Initial program 54.4%
Taylor expanded in A around 0 52.0%
unpow252.0%
unpow252.0%
hypot-def82.4%
Simplified82.4%
if 6.79999999999999968e99 < A Initial program 89.2%
Simplified100.0%
Taylor expanded in B around inf 93.9%
+-commutative93.9%
Simplified93.9%
Final simplification83.5%
(FPCore (A B C)
:precision binary64
(if (<= C -0.0025)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 1.75e+117)
(/ (* -180.0 (atan (/ (+ A (hypot A B)) B))) PI)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -0.0025) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 1.75e+117) {
tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -0.0025) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 1.75e+117) {
tmp = (-180.0 * Math.atan(((A + Math.hypot(A, B)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -0.0025: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 1.75e+117: tmp = (-180.0 * math.atan(((A + math.hypot(A, B)) / B))) / math.pi else: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -0.0025) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 1.75e+117) tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(A, B)) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -0.0025) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 1.75e+117) tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / pi; else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -0.0025], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.75e+117], 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[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -0.0025:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.75 \cdot 10^{+117}:\\
\;\;\;\;\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(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -0.00250000000000000005Initial program 74.2%
Taylor expanded in A around 0 73.8%
unpow273.8%
unpow273.8%
hypot-def87.0%
Simplified87.0%
if -0.00250000000000000005 < C < 1.74999999999999991e117Initial program 54.6%
Taylor expanded in C around 0 53.5%
associate-*r/53.5%
mul-1-neg53.5%
+-commutative53.5%
unpow253.5%
unpow253.5%
hypot-def83.8%
Simplified83.8%
expm1-log1p-u43.1%
expm1-udef43.1%
Applied egg-rr43.1%
expm1-def43.1%
expm1-log1p83.8%
associate-*r/83.8%
distribute-rgt-neg-out83.8%
distribute-lft-neg-in83.8%
metadata-eval83.8%
Simplified83.8%
if 1.74999999999999991e117 < C Initial program 22.0%
associate-*r/22.0%
associate-*l/22.0%
*-un-lft-identity22.0%
unpow222.0%
unpow222.0%
hypot-def53.7%
Applied egg-rr53.7%
Taylor expanded in C around inf 44.7%
+-commutative44.7%
fma-def44.7%
Simplified61.4%
Taylor expanded in B around 0 80.1%
fma-udef80.1%
+-rgt-identity80.1%
Simplified80.1%
Final simplification84.1%
(FPCore (A B C)
:precision binary64
(if (<= A -8.8e+38)
(/ (* 180.0 (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))) PI)
(if (<= A 5e-182)
(/ (* 180.0 (atan (/ 1.0 (/ B (+ B C))))) PI)
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.8e+38) {
tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / ((double) M_PI);
} else if (A <= 5e-182) {
tmp = (180.0 * atan((1.0 / (B / (B + C))))) / ((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 (A <= -8.8e+38) {
tmp = (180.0 * Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / Math.PI;
} else if (A <= 5e-182) {
tmp = (180.0 * Math.atan((1.0 / (B / (B + C))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.8e+38: tmp = (180.0 * math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / math.pi elif A <= 5e-182: tmp = (180.0 * math.atan((1.0 / (B / (B + C))))) / 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 (A <= -8.8e+38) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B)))))) / pi); elseif (A <= 5e-182) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(B / Float64(B + C))))) / 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 (A <= -8.8e+38) tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / pi; elseif (A <= 5e-182) tmp = (180.0 * atan((1.0 / (B / (B + C))))) / pi; else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.8e+38], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 5e-182], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(B / N[(B + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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}\;A \leq -8.8 \cdot 10^{+38}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5 \cdot 10^{-182}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{\frac{B}{B + C}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.80000000000000026e38Initial program 17.4%
associate-*r/17.4%
associate-*l/17.4%
*-un-lft-identity17.4%
unpow217.4%
unpow217.4%
hypot-def49.4%
Applied egg-rr49.4%
clear-num49.4%
inv-pow49.4%
Applied egg-rr49.4%
unpow-149.4%
associate--r+23.3%
Simplified23.3%
Taylor expanded in A around -inf 76.3%
if -8.80000000000000026e38 < A < 5.00000000000000024e-182Initial program 51.2%
associate-*r/51.2%
associate-*l/51.2%
*-un-lft-identity51.2%
unpow251.2%
unpow251.2%
hypot-def85.7%
Applied egg-rr85.7%
clear-num85.7%
inv-pow85.7%
Applied egg-rr85.7%
unpow-185.7%
associate--r+85.7%
Simplified85.7%
Taylor expanded in B around -inf 60.0%
mul-1-neg60.0%
Simplified60.0%
if 5.00000000000000024e-182 < A Initial program 74.3%
Simplified91.7%
Taylor expanded in B around inf 75.2%
+-commutative75.2%
Simplified75.2%
Final simplification69.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (- A) B))) PI)))
(if (<= B -9.1e-38)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -5e-106)
t_0
(if (<= B 6.5e-242)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 5.7e-166)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.9e-98) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((-A / B))) / ((double) M_PI);
double tmp;
if (B <= -9.1e-38) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -5e-106) {
tmp = t_0;
} else if (B <= 6.5e-242) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 5.7e-166) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.9e-98) {
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((-A / B))) / Math.PI;
double tmp;
if (B <= -9.1e-38) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -5e-106) {
tmp = t_0;
} else if (B <= 6.5e-242) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 5.7e-166) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.9e-98) {
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((-A / B))) / math.pi tmp = 0 if B <= -9.1e-38: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -5e-106: tmp = t_0 elif B <= 6.5e-242: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 5.7e-166: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.9e-98: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi) tmp = 0.0 if (B <= -9.1e-38) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -5e-106) tmp = t_0; elseif (B <= 6.5e-242) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 5.7e-166) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.9e-98) 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((-A / B))) / pi; tmp = 0.0; if (B <= -9.1e-38) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -5e-106) tmp = t_0; elseif (B <= 6.5e-242) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 5.7e-166) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.9e-98) 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[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -9.1e-38], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5e-106], t$95$0, If[LessEqual[B, 6.5e-242], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 5.7e-166], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.9e-98], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -9.1 \cdot 10^{-38}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -5 \cdot 10^{-106}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-242}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.7 \cdot 10^{-166}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.9 \cdot 10^{-98}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.10000000000000012e-38Initial program 44.4%
Taylor expanded in B around -inf 63.6%
if -9.10000000000000012e-38 < B < -4.99999999999999983e-106 or 5.7e-166 < B < 2.9e-98Initial program 67.0%
associate-*r/67.0%
associate-*l/67.0%
*-un-lft-identity67.0%
unpow267.0%
unpow267.0%
hypot-def78.3%
Applied egg-rr78.3%
Taylor expanded in B around inf 55.5%
mul-1-neg55.5%
unsub-neg55.5%
Simplified55.5%
Taylor expanded in A around inf 48.6%
associate-*r/48.6%
neg-mul-148.6%
Simplified48.6%
if -4.99999999999999983e-106 < B < 6.4999999999999998e-242Initial program 78.8%
associate-*r/78.8%
associate-*l/78.8%
*-un-lft-identity78.8%
unpow278.8%
unpow278.8%
hypot-def92.1%
Applied egg-rr92.1%
Taylor expanded in B around inf 62.4%
mul-1-neg62.4%
unsub-neg62.4%
Simplified62.4%
Taylor expanded in C around inf 54.1%
if 6.4999999999999998e-242 < B < 5.7e-166Initial program 36.1%
Taylor expanded in C around inf 51.7%
associate-*r/51.7%
distribute-rgt1-in51.7%
metadata-eval51.7%
mul0-lft51.7%
metadata-eval51.7%
Simplified51.7%
if 2.9e-98 < B Initial program 50.4%
Taylor expanded in B around inf 52.6%
Final simplification55.7%
(FPCore (A B C)
:precision binary64
(if (<= B -2.75e-31)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.8e-106)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 4e-241)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 1.32e-166)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 3.7e-97)
(/ (* 180.0 (atan (/ (- A) B))) PI)
(* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.75e-31) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.8e-106) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 4e-241) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 1.32e-166) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 3.7e-97) {
tmp = (180.0 * atan((-A / 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 <= -2.75e-31) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.8e-106) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 4e-241) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 1.32e-166) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 3.7e-97) {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.75e-31: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.8e-106: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 4e-241: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 1.32e-166: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 3.7e-97: tmp = (180.0 * math.atan((-A / 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 <= -2.75e-31) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.8e-106) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 4e-241) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 1.32e-166) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 3.7e-97) tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / 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 <= -2.75e-31) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.8e-106) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 4e-241) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 1.32e-166) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 3.7e-97) tmp = (180.0 * atan((-A / B))) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.75e-31], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.8e-106], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4e-241], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.32e-166], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.7e-97], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.75 \cdot 10^{-31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.8 \cdot 10^{-106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-241}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.32 \cdot 10^{-166}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.7 \cdot 10^{-97}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.74999999999999979e-31Initial program 44.4%
Taylor expanded in B around -inf 63.6%
if -2.74999999999999979e-31 < B < -2.79999999999999988e-106Initial program 72.4%
Taylor expanded in A around inf 54.8%
if -2.79999999999999988e-106 < B < 3.9999999999999999e-241Initial program 78.8%
associate-*r/78.8%
associate-*l/78.8%
*-un-lft-identity78.8%
unpow278.8%
unpow278.8%
hypot-def92.1%
Applied egg-rr92.1%
Taylor expanded in B around inf 62.4%
mul-1-neg62.4%
unsub-neg62.4%
Simplified62.4%
Taylor expanded in C around inf 54.1%
if 3.9999999999999999e-241 < B < 1.31999999999999998e-166Initial program 36.1%
Taylor expanded in C around inf 51.7%
associate-*r/51.7%
distribute-rgt1-in51.7%
metadata-eval51.7%
mul0-lft51.7%
metadata-eval51.7%
Simplified51.7%
if 1.31999999999999998e-166 < B < 3.69999999999999976e-97Initial program 60.1%
associate-*r/60.1%
associate-*l/60.1%
*-un-lft-identity60.1%
unpow260.1%
unpow260.1%
hypot-def69.1%
Applied egg-rr69.1%
Taylor expanded in B around inf 59.4%
mul-1-neg59.4%
unsub-neg59.4%
Simplified59.4%
Taylor expanded in A around inf 43.3%
associate-*r/43.3%
neg-mul-143.3%
Simplified43.3%
if 3.69999999999999976e-97 < B Initial program 50.4%
Taylor expanded in B around inf 52.6%
Final simplification55.8%
(FPCore (A B C)
:precision binary64
(if (<= A -3.05e+40)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -1.9e-39)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= A -1.7e-70)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 2.7e-132)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.05e+40) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -1.9e-39) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (A <= -1.7e-70) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 2.7e-132) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.05e+40) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -1.9e-39) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (A <= -1.7e-70) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 2.7e-132) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.05e+40: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -1.9e-39: tmp = (180.0 * math.atan((C / B))) / math.pi elif A <= -1.7e-70: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 2.7e-132: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.05e+40) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -1.9e-39) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (A <= -1.7e-70) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 2.7e-132) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.05e+40) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -1.9e-39) tmp = (180.0 * atan((C / B))) / pi; elseif (A <= -1.7e-70) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 2.7e-132) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.05e+40], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.9e-39], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -1.7e-70], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.7e-132], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.05 \cdot 10^{+40}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.9 \cdot 10^{-39}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.7 \cdot 10^{-70}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 2.7 \cdot 10^{-132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.05e40Initial program 17.4%
Taylor expanded in A around -inf 73.1%
if -3.05e40 < A < -1.9000000000000001e-39Initial program 57.9%
associate-*r/57.9%
associate-*l/57.9%
*-un-lft-identity57.9%
unpow257.9%
unpow257.9%
hypot-def88.4%
Applied egg-rr88.4%
Taylor expanded in B around inf 63.2%
mul-1-neg63.2%
unsub-neg63.2%
Simplified63.2%
Taylor expanded in C around inf 45.5%
if -1.9000000000000001e-39 < A < -1.69999999999999998e-70Initial program 44.1%
Taylor expanded in B around inf 53.5%
if -1.69999999999999998e-70 < A < 2.6999999999999999e-132Initial program 53.0%
Taylor expanded in B around -inf 44.0%
if 2.6999999999999999e-132 < A Initial program 74.0%
Taylor expanded in A around inf 59.8%
Final simplification55.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.05e+38)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -7.6e-40)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= A -1.9e-67)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 1.3e-135)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.05e+38) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -7.6e-40) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (A <= -1.9e-67) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 1.3e-135) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.05e+38) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -7.6e-40) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (A <= -1.9e-67) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 1.3e-135) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.05e+38: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -7.6e-40: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif A <= -1.9e-67: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 1.3e-135: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.05e+38) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -7.6e-40) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (A <= -1.9e-67) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 1.3e-135) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.05e+38) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -7.6e-40) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (A <= -1.9e-67) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 1.3e-135) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.05e+38], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7.6e-40], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.9e-67], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.3e-135], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.05 \cdot 10^{+38}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -7.6 \cdot 10^{-40}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.9 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 1.3 \cdot 10^{-135}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.05e38Initial program 17.4%
Taylor expanded in A around -inf 73.1%
if -1.05e38 < A < -7.5999999999999998e-40Initial program 57.9%
Taylor expanded in C around -inf 45.5%
if -7.5999999999999998e-40 < A < -1.89999999999999994e-67Initial program 44.1%
Taylor expanded in B around inf 53.5%
if -1.89999999999999994e-67 < A < 1.30000000000000002e-135Initial program 53.0%
Taylor expanded in B around -inf 44.0%
if 1.30000000000000002e-135 < A Initial program 74.0%
Taylor expanded in A around inf 59.8%
Final simplification55.4%
(FPCore (A B C)
:precision binary64
(if (<= B -4e-106)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 1.8e-244)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 1.16e-185)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 5.2e-131)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(/ (* -180.0 (atan (/ (+ B A) B))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4e-106) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 1.8e-244) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 1.16e-185) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 5.2e-131) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((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 <= -4e-106) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 1.8e-244) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 1.16e-185) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 5.2e-131) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = (-180.0 * Math.atan(((B + A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4e-106: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 1.8e-244: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 1.16e-185: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 5.2e-131: tmp = math.atan((0.5 * (B / A))) * (180.0 / 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 <= -4e-106) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 1.8e-244) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 1.16e-185) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 5.2e-131) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(B + A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4e-106) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 1.8e-244) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 1.16e-185) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 5.2e-131) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = (-180.0 * atan(((B + A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4e-106], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.8e-244], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.16e-185], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.2e-131], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(B + A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4 \cdot 10^{-106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-244}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.16 \cdot 10^{-185}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-131}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{B + A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.99999999999999976e-106Initial program 49.0%
Taylor expanded in C around 0 45.3%
associate-*r/45.3%
mul-1-neg45.3%
+-commutative45.3%
unpow245.3%
unpow245.3%
hypot-def73.6%
Simplified73.6%
Taylor expanded in B around -inf 71.3%
mul-1-neg71.3%
unsub-neg71.3%
Simplified71.3%
if -3.99999999999999976e-106 < B < 1.79999999999999987e-244Initial program 78.8%
Taylor expanded in C around -inf 54.4%
if 1.79999999999999987e-244 < B < 1.16000000000000008e-185Initial program 35.6%
Taylor expanded in C around inf 59.8%
associate-*r/59.8%
distribute-rgt1-in59.8%
metadata-eval59.8%
mul0-lft59.8%
metadata-eval59.8%
Simplified59.8%
if 1.16000000000000008e-185 < B < 5.19999999999999993e-131Initial program 39.6%
associate-*r/39.6%
associate-*l/39.6%
*-un-lft-identity39.6%
unpow239.6%
unpow239.6%
hypot-def74.8%
Applied egg-rr74.8%
Taylor expanded in A around -inf 40.0%
Taylor expanded in B around 0 40.0%
associate-*r/40.0%
*-commutative40.0%
associate-*r/40.2%
Simplified40.2%
if 5.19999999999999993e-131 < B Initial program 52.0%
Taylor expanded in C around 0 46.1%
associate-*r/46.1%
mul-1-neg46.1%
+-commutative46.1%
unpow246.1%
unpow246.1%
hypot-def68.7%
Simplified68.7%
expm1-log1p-u1.2%
expm1-udef1.2%
Applied egg-rr1.2%
expm1-def1.2%
expm1-log1p68.7%
associate-*r/68.7%
distribute-rgt-neg-out68.7%
distribute-lft-neg-in68.7%
metadata-eval68.7%
Simplified68.7%
Taylor expanded in A around 0 66.9%
+-commutative66.9%
Simplified66.9%
Final simplification64.7%
(FPCore (A B C)
:precision binary64
(if (<= B -6.5e-106)
(/ (* -180.0 (atan (/ (- A B) B))) PI)
(if (<= B 2.1e-242)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 1.9e-184)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 5.2e-131)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(/ (* -180.0 (atan (/ (+ B A) B))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.5e-106) {
tmp = (-180.0 * atan(((A - B) / B))) / ((double) M_PI);
} else if (B <= 2.1e-242) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 1.9e-184) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 5.2e-131) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((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 <= -6.5e-106) {
tmp = (-180.0 * Math.atan(((A - B) / B))) / Math.PI;
} else if (B <= 2.1e-242) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 1.9e-184) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 5.2e-131) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = (-180.0 * Math.atan(((B + A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.5e-106: tmp = (-180.0 * math.atan(((A - B) / B))) / math.pi elif B <= 2.1e-242: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 1.9e-184: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 5.2e-131: tmp = math.atan((0.5 * (B / A))) * (180.0 / 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 <= -6.5e-106) tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A - B) / B))) / pi); elseif (B <= 2.1e-242) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 1.9e-184) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 5.2e-131) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(B + A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6.5e-106) tmp = (-180.0 * atan(((A - B) / B))) / pi; elseif (B <= 2.1e-242) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 1.9e-184) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 5.2e-131) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = (-180.0 * atan(((B + A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.5e-106], N[(N[(-180.0 * N[ArcTan[N[(N[(A - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2.1e-242], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.9e-184], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.2e-131], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(B + A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.5 \cdot 10^{-106}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A - B}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.9 \cdot 10^{-184}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-131}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{B + A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -6.4999999999999997e-106Initial program 49.0%
Taylor expanded in C around 0 45.3%
associate-*r/45.3%
mul-1-neg45.3%
+-commutative45.3%
unpow245.3%
unpow245.3%
hypot-def73.6%
Simplified73.6%
expm1-log1p-u73.1%
expm1-udef73.1%
Applied egg-rr73.1%
expm1-def73.1%
expm1-log1p73.6%
associate-*r/73.6%
distribute-rgt-neg-out73.6%
distribute-lft-neg-in73.6%
metadata-eval73.6%
Simplified73.6%
Taylor expanded in B around -inf 71.3%
mul-1-neg71.3%
unsub-neg71.3%
Simplified71.3%
if -6.4999999999999997e-106 < B < 2.10000000000000019e-242Initial program 78.8%
Taylor expanded in C around -inf 54.4%
if 2.10000000000000019e-242 < B < 1.90000000000000008e-184Initial program 35.6%
Taylor expanded in C around inf 59.8%
associate-*r/59.8%
distribute-rgt1-in59.8%
metadata-eval59.8%
mul0-lft59.8%
metadata-eval59.8%
Simplified59.8%
if 1.90000000000000008e-184 < B < 5.19999999999999993e-131Initial program 39.6%
associate-*r/39.6%
associate-*l/39.6%
*-un-lft-identity39.6%
unpow239.6%
unpow239.6%
hypot-def74.8%
Applied egg-rr74.8%
Taylor expanded in A around -inf 40.0%
Taylor expanded in B around 0 40.0%
associate-*r/40.0%
*-commutative40.0%
associate-*r/40.2%
Simplified40.2%
if 5.19999999999999993e-131 < B Initial program 52.0%
Taylor expanded in C around 0 46.1%
associate-*r/46.1%
mul-1-neg46.1%
+-commutative46.1%
unpow246.1%
unpow246.1%
hypot-def68.7%
Simplified68.7%
expm1-log1p-u1.2%
expm1-udef1.2%
Applied egg-rr1.2%
expm1-def1.2%
expm1-log1p68.7%
associate-*r/68.7%
distribute-rgt-neg-out68.7%
distribute-lft-neg-in68.7%
metadata-eval68.7%
Simplified68.7%
Taylor expanded in A around 0 66.9%
+-commutative66.9%
Simplified66.9%
Final simplification64.7%
(FPCore (A B C)
:precision binary64
(if (<= B -4e-106)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 3.7e-242)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 4e-169)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2e-100)
(/ (* 180.0 (atan (/ (- A) B))) PI)
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4e-106) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 3.7e-242) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 4e-169) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2e-100) {
tmp = (180.0 * atan((-A / 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 <= -4e-106) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 3.7e-242) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 4e-169) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2e-100) {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4e-106: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 3.7e-242: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 4e-169: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2e-100: tmp = (180.0 * math.atan((-A / 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 <= -4e-106) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 3.7e-242) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 4e-169) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2e-100) tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / 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 <= -4e-106) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 3.7e-242) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 4e-169) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2e-100) tmp = (180.0 * atan((-A / B))) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4e-106], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.7e-242], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4e-169], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2e-100], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4 \cdot 10^{-106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.7 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-169}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2 \cdot 10^{-100}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.99999999999999976e-106Initial program 49.0%
Taylor expanded in C around 0 45.3%
associate-*r/45.3%
mul-1-neg45.3%
+-commutative45.3%
unpow245.3%
unpow245.3%
hypot-def73.6%
Simplified73.6%
Taylor expanded in B around -inf 71.3%
mul-1-neg71.3%
unsub-neg71.3%
Simplified71.3%
if -3.99999999999999976e-106 < B < 3.69999999999999997e-242Initial program 78.8%
Taylor expanded in C around -inf 54.4%
if 3.69999999999999997e-242 < B < 4.00000000000000008e-169Initial program 36.1%
Taylor expanded in C around inf 51.7%
associate-*r/51.7%
distribute-rgt1-in51.7%
metadata-eval51.7%
mul0-lft51.7%
metadata-eval51.7%
Simplified51.7%
if 4.00000000000000008e-169 < B < 2e-100Initial program 60.1%
associate-*r/60.1%
associate-*l/60.1%
*-un-lft-identity60.1%
unpow260.1%
unpow260.1%
hypot-def69.1%
Applied egg-rr69.1%
Taylor expanded in B around inf 59.4%
mul-1-neg59.4%
unsub-neg59.4%
Simplified59.4%
Taylor expanded in A around inf 43.3%
associate-*r/43.3%
neg-mul-143.3%
Simplified43.3%
if 2e-100 < B Initial program 50.4%
Taylor expanded in B around inf 52.6%
Final simplification59.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ C B))) PI)))
(if (<= B -3.3e-63)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 9.5e-242)
t_0
(if (<= B 3.1e-186)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.1e-152) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((C / B))) / ((double) M_PI);
double tmp;
if (B <= -3.3e-63) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 9.5e-242) {
tmp = t_0;
} else if (B <= 3.1e-186) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.1e-152) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((C / B))) / Math.PI;
double tmp;
if (B <= -3.3e-63) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 9.5e-242) {
tmp = t_0;
} else if (B <= 3.1e-186) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.1e-152) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((C / B))) / math.pi tmp = 0 if B <= -3.3e-63: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 9.5e-242: tmp = t_0 elif B <= 3.1e-186: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.1e-152: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(C / B))) / pi) tmp = 0.0 if (B <= -3.3e-63) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 9.5e-242) tmp = t_0; elseif (B <= 3.1e-186) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.1e-152) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((C / B))) / pi; tmp = 0.0; if (B <= -3.3e-63) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 9.5e-242) tmp = t_0; elseif (B <= 3.1e-186) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.1e-152) 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[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -3.3e-63], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.5e-242], t$95$0, If[LessEqual[B, 3.1e-186], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.1e-152], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -3.3 \cdot 10^{-63}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-242}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{-186}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-152}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.29999999999999994e-63Initial program 46.9%
Taylor expanded in B around -inf 60.8%
if -3.29999999999999994e-63 < B < 9.4999999999999997e-242 or 3.10000000000000009e-186 < B < 2.09999999999999999e-152Initial program 74.0%
associate-*r/74.0%
associate-*l/74.0%
*-un-lft-identity74.0%
unpow274.0%
unpow274.0%
hypot-def92.7%
Applied egg-rr92.7%
Taylor expanded in B around inf 61.8%
mul-1-neg61.8%
unsub-neg61.8%
Simplified61.8%
Taylor expanded in C around inf 49.7%
if 9.4999999999999997e-242 < B < 3.10000000000000009e-186Initial program 35.6%
Taylor expanded in C around inf 59.8%
associate-*r/59.8%
distribute-rgt1-in59.8%
metadata-eval59.8%
mul0-lft59.8%
metadata-eval59.8%
Simplified59.8%
if 2.09999999999999999e-152 < B Initial program 50.6%
Taylor expanded in B around inf 49.0%
Final simplification53.5%
(FPCore (A B C)
:precision binary64
(if (<= A -5.9e+40)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A 4.4e-182)
(/ (* 180.0 (atan (/ (+ B C) B))) PI)
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.9e+40) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= 4.4e-182) {
tmp = (180.0 * atan(((B + C) / 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 (A <= -5.9e+40) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= 4.4e-182) {
tmp = (180.0 * Math.atan(((B + C) / 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 A <= -5.9e+40: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= 4.4e-182: tmp = (180.0 * math.atan(((B + C) / 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 (A <= -5.9e+40) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= 4.4e-182) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / 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 (A <= -5.9e+40) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= 4.4e-182) tmp = (180.0 * atan(((B + C) / B))) / pi; else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.9e+40], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.4e-182], N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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}\;A \leq -5.9 \cdot 10^{+40}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 4.4 \cdot 10^{-182}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{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 A < -5.8999999999999999e40Initial program 17.4%
associate-*r/17.4%
associate-*l/17.4%
*-un-lft-identity17.4%
unpow217.4%
unpow217.4%
hypot-def49.4%
Applied egg-rr49.4%
Taylor expanded in A around -inf 73.2%
Taylor expanded in B around 0 73.1%
associate-*r/73.2%
*-commutative73.2%
associate-*r/73.4%
Simplified73.4%
if -5.8999999999999999e40 < A < 4.3999999999999999e-182Initial program 51.2%
associate-*r/51.2%
associate-*l/51.2%
*-un-lft-identity51.2%
unpow251.2%
unpow251.2%
hypot-def85.7%
Applied egg-rr85.7%
Taylor expanded in A around 0 50.4%
unpow250.4%
unpow250.4%
hypot-def84.3%
Simplified84.3%
Taylor expanded in B around -inf 60.0%
if 4.3999999999999999e-182 < A Initial program 74.3%
Simplified91.7%
Taylor expanded in B around inf 75.2%
+-commutative75.2%
Simplified75.2%
Final simplification68.5%
(FPCore (A B C)
:precision binary64
(if (<= A -5.2e+46)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A 9e-182)
(/ (* 180.0 (atan (/ 1.0 (/ B (+ B C))))) PI)
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e+46) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= 9e-182) {
tmp = (180.0 * atan((1.0 / (B / (B + C))))) / ((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 (A <= -5.2e+46) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= 9e-182) {
tmp = (180.0 * Math.atan((1.0 / (B / (B + C))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.2e+46: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= 9e-182: tmp = (180.0 * math.atan((1.0 / (B / (B + C))))) / 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 (A <= -5.2e+46) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= 9e-182) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(B / Float64(B + C))))) / 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 (A <= -5.2e+46) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= 9e-182) tmp = (180.0 * atan((1.0 / (B / (B + C))))) / pi; else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.2e+46], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9e-182], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(B / N[(B + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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}\;A \leq -5.2 \cdot 10^{+46}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 9 \cdot 10^{-182}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{\frac{B}{B + C}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.20000000000000027e46Initial program 17.4%
associate-*r/17.4%
associate-*l/17.4%
*-un-lft-identity17.4%
unpow217.4%
unpow217.4%
hypot-def49.4%
Applied egg-rr49.4%
Taylor expanded in A around -inf 73.2%
Taylor expanded in B around 0 73.1%
associate-*r/73.2%
*-commutative73.2%
associate-*r/73.4%
Simplified73.4%
if -5.20000000000000027e46 < A < 8.9999999999999998e-182Initial program 51.2%
associate-*r/51.2%
associate-*l/51.2%
*-un-lft-identity51.2%
unpow251.2%
unpow251.2%
hypot-def85.7%
Applied egg-rr85.7%
clear-num85.7%
inv-pow85.7%
Applied egg-rr85.7%
unpow-185.7%
associate--r+85.7%
Simplified85.7%
Taylor expanded in B around -inf 60.0%
mul-1-neg60.0%
Simplified60.0%
if 8.9999999999999998e-182 < A Initial program 74.3%
Simplified91.7%
Taylor expanded in B around inf 75.2%
+-commutative75.2%
Simplified75.2%
Final simplification68.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.25e+41)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A 1.55e-180)
(/ (* 180.0 (atan (/ (+ B C) B))) PI)
(* 180.0 (/ (atan (/ (- (- B) A) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e+41) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= 1.55e-180) {
tmp = (180.0 * atan(((B + 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 (A <= -1.25e+41) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= 1.55e-180) {
tmp = (180.0 * Math.atan(((B + 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 A <= -1.25e+41: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= 1.55e-180: tmp = (180.0 * math.atan(((B + 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 (A <= -1.25e+41) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= 1.55e-180) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-B) - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.25e+41) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= 1.55e-180) tmp = (180.0 * atan(((B + C) / B))) / pi; else tmp = 180.0 * (atan(((-B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.25e+41], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.55e-180], N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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}\;A \leq -1.25 \cdot 10^{+41}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 1.55 \cdot 10^{-180}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.25000000000000006e41Initial program 17.4%
associate-*r/17.4%
associate-*l/17.4%
*-un-lft-identity17.4%
unpow217.4%
unpow217.4%
hypot-def49.4%
Applied egg-rr49.4%
Taylor expanded in A around -inf 73.2%
Taylor expanded in B around 0 73.1%
associate-*r/73.2%
*-commutative73.2%
associate-*r/73.4%
Simplified73.4%
if -1.25000000000000006e41 < A < 1.5499999999999999e-180Initial program 51.7%
associate-*r/51.7%
associate-*l/51.7%
*-un-lft-identity51.7%
unpow251.7%
unpow251.7%
hypot-def85.9%
Applied egg-rr85.9%
Taylor expanded in A around 0 50.9%
unpow250.9%
unpow250.9%
hypot-def84.5%
Simplified84.5%
Taylor expanded in B around -inf 60.4%
if 1.5499999999999999e-180 < A Initial program 74.1%
Taylor expanded in C around 0 68.1%
associate-*r/68.1%
mul-1-neg68.1%
+-commutative68.1%
unpow268.1%
unpow268.1%
hypot-def78.5%
Simplified78.5%
Taylor expanded in A around 0 69.5%
Final simplification66.3%
(FPCore (A B C)
:precision binary64
(if (<= C -2.25e+66)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 9.6e+99)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.25e+66) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 9.6e+99) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.25e+66) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 9.6e+99) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.25e+66: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 9.6e+99: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.25e+66) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 9.6e+99) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.25e+66) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 9.6e+99) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.25e+66], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.6e+99], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.25 \cdot 10^{+66}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 9.6 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.2499999999999999e66Initial program 77.3%
Taylor expanded in C around -inf 73.7%
if -2.2499999999999999e66 < C < 9.6000000000000005e99Initial program 56.5%
Taylor expanded in C around 0 52.6%
associate-*r/52.6%
mul-1-neg52.6%
+-commutative52.6%
unpow252.6%
unpow252.6%
hypot-def81.5%
Simplified81.5%
Taylor expanded in B around -inf 52.0%
mul-1-neg52.0%
unsub-neg52.0%
Simplified52.0%
if 9.6000000000000005e99 < C Initial program 22.9%
Taylor expanded in C around inf 49.2%
Taylor expanded in B around inf 77.3%
associate-*r/77.3%
Simplified77.3%
Final simplification60.3%
(FPCore (A B C)
:precision binary64
(if (<= C -1.7e+65)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 9.6e+99)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* (atan (* -0.5 (/ B C))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.7e+65) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 9.6e+99) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = atan((-0.5 * (B / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.7e+65) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 9.6e+99) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = Math.atan((-0.5 * (B / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.7e+65: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 9.6e+99: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = math.atan((-0.5 * (B / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.7e+65) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 9.6e+99) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(atan(Float64(-0.5 * Float64(B / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.7e+65) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 9.6e+99) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = atan((-0.5 * (B / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.7e+65], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.6e+99], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.7 \cdot 10^{+65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 9.6 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -1.7e65Initial program 77.3%
Taylor expanded in C around -inf 73.7%
if -1.7e65 < C < 9.6000000000000005e99Initial program 56.5%
Taylor expanded in C around 0 52.6%
associate-*r/52.6%
mul-1-neg52.6%
+-commutative52.6%
unpow252.6%
unpow252.6%
hypot-def81.5%
Simplified81.5%
Taylor expanded in B around -inf 52.0%
mul-1-neg52.0%
unsub-neg52.0%
Simplified52.0%
if 9.6000000000000005e99 < C Initial program 22.9%
associate-*r/22.9%
associate-*l/22.9%
*-un-lft-identity22.9%
unpow222.9%
unpow222.9%
hypot-def54.7%
Applied egg-rr54.7%
Taylor expanded in C around inf 44.4%
+-commutative44.4%
fma-def44.4%
Simplified62.2%
expm1-log1p-u62.2%
expm1-udef34.5%
Applied egg-rr36.2%
expm1-def77.0%
expm1-log1p77.4%
associate-/r/77.4%
fma-udef77.4%
+-rgt-identity77.4%
Simplified77.4%
Final simplification60.4%
(FPCore (A B C)
:precision binary64
(if (<= A -5.6e+45)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A 2.1e-180)
(/ (* 180.0 (atan (/ (+ B C) B))) PI)
(/ (* -180.0 (atan (/ (+ B A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.6e+45) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= 2.1e-180) {
tmp = (180.0 * atan(((B + 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 (A <= -5.6e+45) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= 2.1e-180) {
tmp = (180.0 * Math.atan(((B + 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 A <= -5.6e+45: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= 2.1e-180: tmp = (180.0 * math.atan(((B + 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 (A <= -5.6e+45) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= 2.1e-180) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(B + A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.6e+45) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= 2.1e-180) tmp = (180.0 * atan(((B + C) / B))) / pi; else tmp = (-180.0 * atan(((B + A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.6e+45], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.1e-180], N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(B + A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.6 \cdot 10^{+45}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 2.1 \cdot 10^{-180}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{B + A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.5999999999999999e45Initial program 17.4%
associate-*r/17.4%
associate-*l/17.4%
*-un-lft-identity17.4%
unpow217.4%
unpow217.4%
hypot-def49.4%
Applied egg-rr49.4%
Taylor expanded in A around -inf 73.2%
Taylor expanded in B around 0 73.1%
associate-*r/73.2%
*-commutative73.2%
associate-*r/73.4%
Simplified73.4%
if -5.5999999999999999e45 < A < 2.0999999999999999e-180Initial program 51.7%
associate-*r/51.7%
associate-*l/51.7%
*-un-lft-identity51.7%
unpow251.7%
unpow251.7%
hypot-def85.9%
Applied egg-rr85.9%
Taylor expanded in A around 0 50.9%
unpow250.9%
unpow250.9%
hypot-def84.5%
Simplified84.5%
Taylor expanded in B around -inf 60.4%
if 2.0999999999999999e-180 < A Initial program 74.1%
Taylor expanded in C around 0 68.1%
associate-*r/68.1%
mul-1-neg68.1%
+-commutative68.1%
unpow268.1%
unpow268.1%
hypot-def78.5%
Simplified78.5%
expm1-log1p-u30.7%
expm1-udef30.7%
Applied egg-rr30.7%
expm1-def30.7%
expm1-log1p78.5%
associate-*r/78.5%
distribute-rgt-neg-out78.5%
distribute-lft-neg-in78.5%
metadata-eval78.5%
Simplified78.5%
Taylor expanded in A around 0 69.5%
+-commutative69.5%
Simplified69.5%
Final simplification66.3%
(FPCore (A B C)
:precision binary64
(if (<= B -5.7e-216)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.6e-176)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.7e-216) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.6e-176) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.7e-216) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.6e-176) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.7e-216: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.6e-176: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.7e-216) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.6e-176) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.7e-216) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.6e-176) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.7e-216], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.6e-176], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.7 \cdot 10^{-216}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-176}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.70000000000000004e-216Initial program 53.6%
Taylor expanded in B around -inf 51.8%
if -5.70000000000000004e-216 < B < 3.6000000000000003e-176Initial program 66.5%
Taylor expanded in C around inf 39.6%
associate-*r/39.6%
distribute-rgt1-in39.6%
metadata-eval39.6%
mul0-lft39.6%
metadata-eval39.6%
Simplified39.6%
if 3.6000000000000003e-176 < B Initial program 50.6%
Taylor expanded in B around inf 48.5%
Final simplification48.4%
(FPCore (A B C) :precision binary64 (if (<= B -5e-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 <= -5e-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 <= -5e-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 <= -5e-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 <= -5e-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 <= -5e-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, -5e-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 -5 \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 < -4.999999999999985e-310Initial program 55.7%
Taylor expanded in B around -inf 47.1%
if -4.999999999999985e-310 < B Initial program 53.5%
Taylor expanded in B around inf 40.6%
Final simplification43.7%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 54.6%
Taylor expanded in B around inf 21.6%
Final simplification21.6%
herbie shell --seed 2023338
(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)))