
(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
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -4e-77) (not (<= t_0 0.0)))
(/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B))))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -4e-77) || !(t_0 <= 0.0)) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -4e-77) || !(t_0 <= 0.0)) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if (t_0 <= -4e-77) or not (t_0 <= 0.0): tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -4e-77) || !(t_0 <= 0.0)) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if ((t_0 <= -4e-77) || ~((t_0 <= 0.0))) tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -4e-77], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -4 \cdot 10^{-77} \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\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))))) < -3.9999999999999997e-77 or 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.4%
Applied egg-rr88.4%
if -3.9999999999999997e-77 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 15.2%
Applied egg-rr15.2%
Taylor expanded in C around inf 47.9%
Taylor expanded in A around 0 70.9%
Final simplification86.2%
(FPCore (A B C)
:precision binary64
(if (<= A -1.5e+92)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 1.6e-192)
(* 180.0 (/ (atan (* (/ 1.0 B) (- C (hypot B C)))) PI))
(* 180.0 (/ (atan (/ (- C (+ A (hypot B A))) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+92) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 1.6e-192) {
tmp = 180.0 * (atan(((1.0 / B) * (C - hypot(B, C)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, A))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+92) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 1.6e-192) {
tmp = 180.0 * (Math.atan(((1.0 / B) * (C - Math.hypot(B, C)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, A))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e+92: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 1.6e-192: tmp = 180.0 * (math.atan(((1.0 / B) * (C - math.hypot(B, C)))) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, A))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e+92) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 1.6e-192) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(C - hypot(B, C)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, A))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e+92) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 1.6e-192) tmp = 180.0 * (atan(((1.0 / B) * (C - hypot(B, C)))) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, A))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e+92], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.6e-192], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{+92}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 1.6 \cdot 10^{-192}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.50000000000000007e92Initial program 19.1%
Applied egg-rr62.0%
Taylor expanded in A around -inf 83.1%
associate-/r/83.2%
Applied egg-rr83.2%
if -1.50000000000000007e92 < A < 1.6000000000000001e-192Initial program 44.5%
Taylor expanded in A around 0 44.6%
unpow244.6%
unpow244.6%
hypot-def75.8%
Simplified75.8%
if 1.6000000000000001e-192 < A Initial program 72.5%
Simplified89.3%
Taylor expanded in C around 0 70.5%
+-commutative70.5%
unpow270.5%
unpow270.5%
hypot-def84.5%
Simplified84.5%
Final simplification80.7%
(FPCore (A B C)
:precision binary64
(if (<= C -3.4e+18)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(if (<= C 1.3e+44)
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.4e+18) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} else if (C <= 1.3e+44) {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -3.4e+18) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} else if (C <= 1.3e+44) {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -3.4e+18: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) elif C <= 1.3e+44: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -3.4e+18) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); elseif (C <= 1.3e+44) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -3.4e+18) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); elseif (C <= 1.3e+44) tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -3.4e+18], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.3e+44], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.4 \cdot 10^{+18}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{elif}\;C \leq 1.3 \cdot 10^{+44}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -3.4e18Initial program 77.7%
Applied egg-rr97.1%
Taylor expanded in A around 0 76.3%
unpow276.3%
unpow276.3%
hypot-def89.8%
Simplified89.8%
if -3.4e18 < C < 1.3e44Initial program 54.2%
Taylor expanded in C around 0 51.1%
associate-*r/51.1%
mul-1-neg51.1%
+-commutative51.1%
unpow251.1%
unpow251.1%
hypot-def78.8%
Simplified78.8%
if 1.3e44 < C Initial program 20.8%
Applied egg-rr55.0%
Taylor expanded in C around inf 48.8%
Taylor expanded in A around 0 68.8%
Final simplification79.2%
(FPCore (A B C)
:precision binary64
(if (<= A -4.5e+92)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 2.05e+103)
(* 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 <= -4.5e+92) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 2.05e+103) {
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 <= -4.5e+92) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 2.05e+103) {
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 <= -4.5e+92: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 2.05e+103: 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 <= -4.5e+92) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 2.05e+103) 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 <= -4.5e+92) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 2.05e+103) 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, -4.5e+92], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.05e+103], 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 -4.5 \cdot 10^{+92}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 2.05 \cdot 10^{+103}:\\
\;\;\;\;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 < -4.4999999999999999e92Initial program 19.1%
Applied egg-rr62.0%
Taylor expanded in A around -inf 83.1%
associate-/r/83.2%
Applied egg-rr83.2%
if -4.4999999999999999e92 < A < 2.0500000000000001e103Initial program 53.3%
Taylor expanded in A around 0 46.3%
unpow246.3%
unpow246.3%
hypot-def71.9%
Simplified71.9%
if 2.0500000000000001e103 < A Initial program 81.2%
Simplified100.0%
Taylor expanded in B around -inf 91.2%
neg-mul-191.2%
unsub-neg91.2%
Simplified91.2%
Final simplification76.8%
(FPCore (A B C)
:precision binary64
(if (<= A -1.7e+98)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 4.6e+88)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.7e+98) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 4.6e+88) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} 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 <= -1.7e+98) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 4.6e+88) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} else {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.7e+98: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 4.6e+88: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) else: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.7e+98) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 4.6e+88) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); 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 <= -1.7e+98) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 4.6e+88) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); else tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.7e+98], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.6e+88], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $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 -1.7 \cdot 10^{+98}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 4.6 \cdot 10^{+88}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.69999999999999986e98Initial program 19.1%
Applied egg-rr62.0%
Taylor expanded in A around -inf 83.1%
associate-/r/83.2%
Applied egg-rr83.2%
if -1.69999999999999986e98 < A < 4.6000000000000003e88Initial program 53.1%
Applied egg-rr78.0%
Taylor expanded in A around 0 46.6%
unpow246.6%
unpow246.6%
hypot-def71.8%
Simplified71.8%
if 4.6000000000000003e88 < A Initial program 79.3%
Simplified100.0%
Taylor expanded in B around -inf 89.8%
neg-mul-189.8%
unsub-neg89.8%
Simplified89.8%
Final simplification76.8%
(FPCore (A B C) :precision binary64 (if (<= A -1.12e+93) (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.12e+93) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / 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 <= -1.12e+93) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / 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 <= -1.12e+93: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / 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 <= -1.12e+93) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / 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 <= -1.12e+93) tmp = (180.0 / pi) * atan((0.5 * (B / 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, -1.12e+93], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $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 -1.12 \cdot 10^{+93}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{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 < -1.12e93Initial program 19.1%
Applied egg-rr62.0%
Taylor expanded in A around -inf 83.1%
associate-/r/83.2%
Applied egg-rr83.2%
if -1.12e93 < A Initial program 58.6%
Simplified82.6%
Final simplification82.7%
(FPCore (A B C)
:precision binary64
(if (<= B -9.2e+117)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -6.2e-52)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 1.65e-258)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(if (<= B 7.5e-167)
(/ 180.0 (/ PI (atan 0.0)))
(if (<= B 6.8e-77)
(* 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 <= -9.2e+117) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -6.2e-52) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 1.65e-258) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else if (B <= 7.5e-167) {
tmp = 180.0 / (((double) M_PI) / atan(0.0));
} else if (B <= 6.8e-77) {
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 <= -9.2e+117) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -6.2e-52) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 1.65e-258) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else if (B <= 7.5e-167) {
tmp = 180.0 / (Math.PI / Math.atan(0.0));
} else if (B <= 6.8e-77) {
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 <= -9.2e+117: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -6.2e-52: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 1.65e-258: tmp = 180.0 * (math.atan((-A / B)) / math.pi) elif B <= 7.5e-167: tmp = 180.0 / (math.pi / math.atan(0.0)) elif B <= 6.8e-77: 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 <= -9.2e+117) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -6.2e-52) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 1.65e-258) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); elseif (B <= 7.5e-167) tmp = Float64(180.0 / Float64(pi / atan(0.0))); elseif (B <= 6.8e-77) 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 <= -9.2e+117) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -6.2e-52) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 1.65e-258) tmp = 180.0 * (atan((-A / B)) / pi); elseif (B <= 7.5e-167) tmp = 180.0 / (pi / atan(0.0)); elseif (B <= 6.8e-77) 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, -9.2e+117], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.2e-52], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.65e-258], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.5e-167], N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.8e-77], 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 -9.2 \cdot 10^{+117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -6.2 \cdot 10^{-52}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.65 \cdot 10^{-258}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.5 \cdot 10^{-167}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{elif}\;B \leq 6.8 \cdot 10^{-77}:\\
\;\;\;\;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 < -9.19999999999999951e117Initial program 34.7%
Taylor expanded in B around -inf 80.5%
if -9.19999999999999951e117 < B < -6.1999999999999998e-52Initial program 66.1%
Simplified66.2%
Taylor expanded in B around -inf 62.8%
neg-mul-162.8%
unsub-neg62.8%
Simplified62.8%
Taylor expanded in C around inf 41.9%
associate-*r/42.0%
Applied egg-rr42.0%
if -6.1999999999999998e-52 < B < 1.65e-258Initial program 59.4%
Simplified68.2%
Taylor expanded in B around -inf 59.6%
neg-mul-159.6%
unsub-neg59.6%
Simplified59.6%
Taylor expanded in A around inf 43.2%
associate-*r/43.2%
neg-mul-143.2%
Simplified43.2%
if 1.65e-258 < B < 7.5000000000000007e-167Initial program 40.6%
Applied egg-rr82.2%
expm1-log1p-u53.7%
expm1-udef53.7%
Applied egg-rr53.7%
sub-neg53.7%
log1p-udef53.7%
rem-exp-log82.2%
associate--l-59.0%
metadata-eval59.0%
Applied egg-rr59.0%
Taylor expanded in C around inf 16.4%
distribute-lft1-in16.4%
metadata-eval16.4%
mul0-lft54.5%
metadata-eval54.5%
Simplified54.5%
if 7.5000000000000007e-167 < B < 6.79999999999999966e-77Initial program 62.7%
Taylor expanded in C around -inf 51.3%
if 6.79999999999999966e-77 < B Initial program 50.9%
Taylor expanded in B around inf 51.7%
Final simplification53.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ C B))))
(if (<= B -9.2e+117)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.45e-56)
(/ (* 180.0 t_0) PI)
(if (<= B 1.7e-261)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(if (<= B 2.05e-166)
(/ 180.0 (/ PI (atan 0.0)))
(if (<= B 2.1e-78)
(* 180.0 (/ t_0 PI))
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = atan((C / B));
double tmp;
if (B <= -9.2e+117) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.45e-56) {
tmp = (180.0 * t_0) / ((double) M_PI);
} else if (B <= 1.7e-261) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else if (B <= 2.05e-166) {
tmp = 180.0 / (((double) M_PI) / atan(0.0));
} else if (B <= 2.1e-78) {
tmp = 180.0 * (t_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 t_0 = Math.atan((C / B));
double tmp;
if (B <= -9.2e+117) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.45e-56) {
tmp = (180.0 * t_0) / Math.PI;
} else if (B <= 1.7e-261) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else if (B <= 2.05e-166) {
tmp = 180.0 / (Math.PI / Math.atan(0.0));
} else if (B <= 2.1e-78) {
tmp = 180.0 * (t_0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((C / B)) tmp = 0 if B <= -9.2e+117: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.45e-56: tmp = (180.0 * t_0) / math.pi elif B <= 1.7e-261: tmp = 180.0 * (math.atan((-A / B)) / math.pi) elif B <= 2.05e-166: tmp = 180.0 / (math.pi / math.atan(0.0)) elif B <= 2.1e-78: tmp = 180.0 * (t_0 / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(C / B)) tmp = 0.0 if (B <= -9.2e+117) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.45e-56) tmp = Float64(Float64(180.0 * t_0) / pi); elseif (B <= 1.7e-261) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); elseif (B <= 2.05e-166) tmp = Float64(180.0 / Float64(pi / atan(0.0))); elseif (B <= 2.1e-78) tmp = Float64(180.0 * Float64(t_0 / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((C / B)); tmp = 0.0; if (B <= -9.2e+117) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.45e-56) tmp = (180.0 * t_0) / pi; elseif (B <= 1.7e-261) tmp = 180.0 * (atan((-A / B)) / pi); elseif (B <= 2.05e-166) tmp = 180.0 / (pi / atan(0.0)); elseif (B <= 2.1e-78) tmp = 180.0 * (t_0 / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, -9.2e+117], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.45e-56], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.7e-261], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.05e-166], N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.1e-78], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{if}\;B \leq -9.2 \cdot 10^{+117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.45 \cdot 10^{-56}:\\
\;\;\;\;\frac{180 \cdot t_0}{\pi}\\
\mathbf{elif}\;B \leq 1.7 \cdot 10^{-261}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.05 \cdot 10^{-166}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.19999999999999951e117Initial program 34.7%
Taylor expanded in B around -inf 80.5%
if -9.19999999999999951e117 < B < -1.44999999999999996e-56Initial program 66.1%
Simplified66.2%
Taylor expanded in B around -inf 62.8%
neg-mul-162.8%
unsub-neg62.8%
Simplified62.8%
Taylor expanded in C around inf 41.9%
associate-*r/42.0%
Applied egg-rr42.0%
if -1.44999999999999996e-56 < B < 1.7e-261Initial program 59.4%
Simplified68.2%
Taylor expanded in B around -inf 59.6%
neg-mul-159.6%
unsub-neg59.6%
Simplified59.6%
Taylor expanded in A around inf 43.2%
associate-*r/43.2%
neg-mul-143.2%
Simplified43.2%
if 1.7e-261 < B < 2.0499999999999999e-166Initial program 40.6%
Applied egg-rr82.2%
expm1-log1p-u53.7%
expm1-udef53.7%
Applied egg-rr53.7%
sub-neg53.7%
log1p-udef53.7%
rem-exp-log82.2%
associate--l-59.0%
metadata-eval59.0%
Applied egg-rr59.0%
Taylor expanded in C around inf 16.4%
distribute-lft1-in16.4%
metadata-eval16.4%
mul0-lft54.5%
metadata-eval54.5%
Simplified54.5%
if 2.0499999999999999e-166 < B < 2.1000000000000001e-78Initial program 62.7%
Simplified70.4%
Taylor expanded in B around -inf 60.4%
neg-mul-160.4%
unsub-neg60.4%
Simplified60.4%
Taylor expanded in C around inf 49.5%
if 2.1000000000000001e-78 < B Initial program 50.9%
Taylor expanded in B around inf 51.7%
Final simplification53.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* B (/ 0.5 A))) PI))))
(if (<= B -9.2e+117)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -6.8e-133)
t_0
(if (<= B -3.9e-308)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(if (<= B 6.2e-114) t_0 (* 180.0 (/ (atan -1.0) 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 (B <= -9.2e+117) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -6.8e-133) {
tmp = t_0;
} else if (B <= -3.9e-308) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else if (B <= 6.2e-114) {
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((B * (0.5 / A))) / Math.PI);
double tmp;
if (B <= -9.2e+117) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -6.8e-133) {
tmp = t_0;
} else if (B <= -3.9e-308) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else if (B <= 6.2e-114) {
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((B * (0.5 / A))) / math.pi) tmp = 0 if B <= -9.2e+117: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -6.8e-133: tmp = t_0 elif B <= -3.9e-308: tmp = 180.0 * (math.atan((-A / B)) / math.pi) elif B <= 6.2e-114: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)) tmp = 0.0 if (B <= -9.2e+117) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -6.8e-133) tmp = t_0; elseif (B <= -3.9e-308) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); elseif (B <= 6.2e-114) 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((B * (0.5 / A))) / pi); tmp = 0.0; if (B <= -9.2e+117) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -6.8e-133) tmp = t_0; elseif (B <= -3.9e-308) tmp = 180.0 * (atan((-A / B)) / pi); elseif (B <= 6.2e-114) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9.2e+117], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.8e-133], t$95$0, If[LessEqual[B, -3.9e-308], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.2e-114], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{if}\;B \leq -9.2 \cdot 10^{+117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -6.8 \cdot 10^{-133}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -3.9 \cdot 10^{-308}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.2 \cdot 10^{-114}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.19999999999999951e117Initial program 34.7%
Taylor expanded in B around -inf 80.5%
if -9.19999999999999951e117 < B < -6.80000000000000012e-133 or -3.8999999999999999e-308 < B < 6.2e-114Initial program 53.9%
Applied egg-rr73.1%
Taylor expanded in A around -inf 43.5%
Taylor expanded in B around 0 43.0%
associate-*r/43.0%
associate-/l*43.5%
associate-/r/43.0%
Simplified43.0%
if -6.80000000000000012e-133 < B < -3.8999999999999999e-308Initial program 63.5%
Simplified71.8%
Taylor expanded in B around -inf 64.1%
neg-mul-164.1%
unsub-neg64.1%
Simplified64.1%
Taylor expanded in A around inf 47.2%
associate-*r/47.2%
neg-mul-147.2%
Simplified47.2%
if 6.2e-114 < B Initial program 54.1%
Taylor expanded in B around inf 48.5%
Final simplification52.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (+ B C) B)) PI))))
(if (<= A -1.2e+65)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 5.1e-219)
t_0
(if (<= A 7.5e-49)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= A 1.85e-6) t_0 (* 180.0 (/ (atan (/ (- B A) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
double tmp;
if (A <= -1.2e+65) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 5.1e-219) {
tmp = t_0;
} else if (A <= 7.5e-49) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (A <= 1.85e-6) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
double tmp;
if (A <= -1.2e+65) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 5.1e-219) {
tmp = t_0;
} else if (A <= 7.5e-49) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (A <= 1.85e-6) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B + C) / B)) / math.pi) tmp = 0 if A <= -1.2e+65: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 5.1e-219: tmp = t_0 elif A <= 7.5e-49: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif A <= 1.85e-6: tmp = t_0 else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)) tmp = 0.0 if (A <= -1.2e+65) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 5.1e-219) tmp = t_0; elseif (A <= 7.5e-49) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (A <= 1.85e-6) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B + C) / B)) / pi); tmp = 0.0; if (A <= -1.2e+65) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 5.1e-219) tmp = t_0; elseif (A <= 7.5e-49) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (A <= 1.85e-6) tmp = t_0; else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.2e+65], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.1e-219], t$95$0, If[LessEqual[A, 7.5e-49], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.85e-6], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.2 \cdot 10^{+65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.1 \cdot 10^{-219}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 7.5 \cdot 10^{-49}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.85 \cdot 10^{-6}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.2000000000000001e65Initial program 20.2%
Applied egg-rr60.4%
Taylor expanded in A around -inf 76.2%
Taylor expanded in B around 0 76.2%
associate-*r/76.2%
associate-/l*76.2%
associate-/r/76.2%
Simplified76.2%
if -1.2000000000000001e65 < A < 5.0999999999999998e-219 or 7.4999999999999998e-49 < A < 1.8500000000000001e-6Initial program 49.5%
Simplified78.4%
Taylor expanded in B around -inf 54.8%
neg-mul-154.8%
unsub-neg54.8%
Simplified54.8%
Taylor expanded in A around 0 53.4%
if 5.0999999999999998e-219 < A < 7.4999999999999998e-49Initial program 57.7%
Simplified75.0%
Taylor expanded in C around 0 54.8%
+-commutative54.8%
unpow254.8%
unpow254.8%
hypot-def69.2%
Simplified69.2%
Taylor expanded in A around 0 47.0%
if 1.8500000000000001e-6 < A Initial program 77.8%
Simplified97.0%
Taylor expanded in B around -inf 79.0%
neg-mul-179.0%
unsub-neg79.0%
Simplified79.0%
Taylor expanded in C around 0 78.1%
Final simplification63.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (+ B C) B)) PI))))
(if (<= A -5.4e+67)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 7.6e-218)
t_0
(if (<= A 8.7e-51)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= A 7e-8) t_0 (* 180.0 (/ (atan (/ (- B A) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
double tmp;
if (A <= -5.4e+67) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 7.6e-218) {
tmp = t_0;
} else if (A <= 8.7e-51) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (A <= 7e-8) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
double tmp;
if (A <= -5.4e+67) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 7.6e-218) {
tmp = t_0;
} else if (A <= 8.7e-51) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (A <= 7e-8) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B + C) / B)) / math.pi) tmp = 0 if A <= -5.4e+67: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 7.6e-218: tmp = t_0 elif A <= 8.7e-51: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif A <= 7e-8: tmp = t_0 else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)) tmp = 0.0 if (A <= -5.4e+67) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 7.6e-218) tmp = t_0; elseif (A <= 8.7e-51) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (A <= 7e-8) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B + C) / B)) / pi); tmp = 0.0; if (A <= -5.4e+67) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 7.6e-218) tmp = t_0; elseif (A <= 8.7e-51) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (A <= 7e-8) tmp = t_0; else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.4e+67], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.6e-218], t$95$0, If[LessEqual[A, 8.7e-51], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7e-8], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -5.4 \cdot 10^{+67}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 7.6 \cdot 10^{-218}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 8.7 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.3999999999999998e67Initial program 20.2%
Applied egg-rr60.4%
Taylor expanded in A around -inf 76.2%
associate-/r/76.3%
Applied egg-rr76.3%
if -5.3999999999999998e67 < A < 7.5999999999999997e-218 or 8.6999999999999998e-51 < A < 7.00000000000000048e-8Initial program 49.5%
Simplified78.4%
Taylor expanded in B around -inf 54.8%
neg-mul-154.8%
unsub-neg54.8%
Simplified54.8%
Taylor expanded in A around 0 53.4%
if 7.5999999999999997e-218 < A < 8.6999999999999998e-51Initial program 57.7%
Simplified75.0%
Taylor expanded in C around 0 54.8%
+-commutative54.8%
unpow254.8%
unpow254.8%
hypot-def69.2%
Simplified69.2%
Taylor expanded in A around 0 47.0%
if 7.00000000000000048e-8 < A Initial program 77.8%
Simplified97.0%
Taylor expanded in B around -inf 79.0%
neg-mul-179.0%
unsub-neg79.0%
Simplified79.0%
Taylor expanded in C around 0 78.1%
Final simplification63.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -9.2e+117)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -8e-308)
t_0
(if (<= B 5e-166)
(/ 180.0 (/ PI (atan 0.0)))
(if (<= B 4.9e-77) 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 <= -9.2e+117) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -8e-308) {
tmp = t_0;
} else if (B <= 5e-166) {
tmp = 180.0 / (((double) M_PI) / atan(0.0));
} else if (B <= 4.9e-77) {
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 <= -9.2e+117) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -8e-308) {
tmp = t_0;
} else if (B <= 5e-166) {
tmp = 180.0 / (Math.PI / Math.atan(0.0));
} else if (B <= 4.9e-77) {
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 <= -9.2e+117: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -8e-308: tmp = t_0 elif B <= 5e-166: tmp = 180.0 / (math.pi / math.atan(0.0)) elif B <= 4.9e-77: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -9.2e+117) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -8e-308) tmp = t_0; elseif (B <= 5e-166) tmp = Float64(180.0 / Float64(pi / atan(0.0))); elseif (B <= 4.9e-77) 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 <= -9.2e+117) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -8e-308) tmp = t_0; elseif (B <= 5e-166) tmp = 180.0 / (pi / atan(0.0)); elseif (B <= 4.9e-77) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9.2e+117], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8e-308], t$95$0, If[LessEqual[B, 5e-166], N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.9e-77], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -9.2 \cdot 10^{+117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -8 \cdot 10^{-308}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-166}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{elif}\;B \leq 4.9 \cdot 10^{-77}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.19999999999999951e117Initial program 34.7%
Taylor expanded in B around -inf 80.5%
if -9.19999999999999951e117 < B < -8.00000000000000026e-308 or 5e-166 < B < 4.8999999999999997e-77Initial program 62.9%
Simplified68.5%
Taylor expanded in B around -inf 61.7%
neg-mul-161.7%
unsub-neg61.7%
Simplified61.7%
Taylor expanded in C around inf 37.0%
if -8.00000000000000026e-308 < B < 5e-166Initial program 41.8%
Applied egg-rr79.9%
expm1-log1p-u47.8%
expm1-udef47.8%
Applied egg-rr47.8%
sub-neg47.8%
log1p-udef47.8%
rem-exp-log79.9%
associate--l-59.0%
metadata-eval59.0%
Applied egg-rr59.0%
Taylor expanded in C around inf 13.1%
distribute-lft1-in13.1%
metadata-eval13.1%
mul0-lft48.8%
metadata-eval48.8%
Simplified48.8%
if 4.8999999999999997e-77 < B Initial program 50.9%
Taylor expanded in B around inf 51.7%
Final simplification50.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ C B))))
(if (<= B -9.2e+117)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -4.7e-307)
(/ (* 180.0 t_0) PI)
(if (<= B 2.7e-166)
(/ 180.0 (/ PI (atan 0.0)))
(if (<= B 1.35e-76)
(* 180.0 (/ t_0 PI))
(* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan((C / B));
double tmp;
if (B <= -9.2e+117) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -4.7e-307) {
tmp = (180.0 * t_0) / ((double) M_PI);
} else if (B <= 2.7e-166) {
tmp = 180.0 / (((double) M_PI) / atan(0.0));
} else if (B <= 1.35e-76) {
tmp = 180.0 * (t_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 t_0 = Math.atan((C / B));
double tmp;
if (B <= -9.2e+117) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -4.7e-307) {
tmp = (180.0 * t_0) / Math.PI;
} else if (B <= 2.7e-166) {
tmp = 180.0 / (Math.PI / Math.atan(0.0));
} else if (B <= 1.35e-76) {
tmp = 180.0 * (t_0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((C / B)) tmp = 0 if B <= -9.2e+117: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -4.7e-307: tmp = (180.0 * t_0) / math.pi elif B <= 2.7e-166: tmp = 180.0 / (math.pi / math.atan(0.0)) elif B <= 1.35e-76: tmp = 180.0 * (t_0 / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(C / B)) tmp = 0.0 if (B <= -9.2e+117) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -4.7e-307) tmp = Float64(Float64(180.0 * t_0) / pi); elseif (B <= 2.7e-166) tmp = Float64(180.0 / Float64(pi / atan(0.0))); elseif (B <= 1.35e-76) tmp = Float64(180.0 * Float64(t_0 / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((C / B)); tmp = 0.0; if (B <= -9.2e+117) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -4.7e-307) tmp = (180.0 * t_0) / pi; elseif (B <= 2.7e-166) tmp = 180.0 / (pi / atan(0.0)); elseif (B <= 1.35e-76) tmp = 180.0 * (t_0 / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, -9.2e+117], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.7e-307], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2.7e-166], N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.35e-76], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{if}\;B \leq -9.2 \cdot 10^{+117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -4.7 \cdot 10^{-307}:\\
\;\;\;\;\frac{180 \cdot t_0}{\pi}\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{-166}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{elif}\;B \leq 1.35 \cdot 10^{-76}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.19999999999999951e117Initial program 34.7%
Taylor expanded in B around -inf 80.5%
if -9.19999999999999951e117 < B < -4.69999999999999967e-307Initial program 62.9%
Simplified68.1%
Taylor expanded in B around -inf 62.0%
neg-mul-162.0%
unsub-neg62.0%
Simplified62.0%
Taylor expanded in C around inf 34.6%
associate-*r/34.6%
Applied egg-rr34.6%
if -4.69999999999999967e-307 < B < 2.70000000000000006e-166Initial program 41.8%
Applied egg-rr79.9%
expm1-log1p-u47.8%
expm1-udef47.8%
Applied egg-rr47.8%
sub-neg47.8%
log1p-udef47.8%
rem-exp-log79.9%
associate--l-59.0%
metadata-eval59.0%
Applied egg-rr59.0%
Taylor expanded in C around inf 13.1%
distribute-lft1-in13.1%
metadata-eval13.1%
mul0-lft48.8%
metadata-eval48.8%
Simplified48.8%
if 2.70000000000000006e-166 < B < 1.35e-76Initial program 62.7%
Simplified70.4%
Taylor expanded in B around -inf 60.4%
neg-mul-160.4%
unsub-neg60.4%
Simplified60.4%
Taylor expanded in C around inf 49.5%
if 1.35e-76 < B Initial program 50.9%
Taylor expanded in B around inf 51.7%
Final simplification50.3%
(FPCore (A B C)
:precision binary64
(if (<= B 1.2e-308)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B 9.5e-122)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1.2e-308) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= 9.5e-122) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} 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.2e-308) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= 9.5e-122) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1.2e-308: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= 9.5e-122: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) 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.2e-308) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= 9.5e-122) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); 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.2e-308) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= 9.5e-122) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1.2e-308], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.5e-122], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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.2 \cdot 10^{-308}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-122}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.1999999999999998e-308Initial program 53.5%
Simplified75.5%
Taylor expanded in B around -inf 70.6%
neg-mul-170.6%
unsub-neg70.6%
Simplified70.6%
if 1.1999999999999998e-308 < B < 9.5000000000000002e-122Initial program 41.5%
Applied egg-rr76.5%
Taylor expanded in A around -inf 50.6%
if 9.5000000000000002e-122 < B Initial program 54.6%
Simplified75.8%
Taylor expanded in B around inf 68.7%
+-commutative68.7%
Simplified68.7%
Final simplification67.2%
(FPCore (A B C)
:precision binary64
(if (<= B -3.15e-308)
(/ (* 180.0 (atan (/ (+ C (- B A)) B))) PI)
(if (<= B 9.5e-122)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.15e-308) {
tmp = (180.0 * atan(((C + (B - A)) / B))) / ((double) M_PI);
} else if (B <= 9.5e-122) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} 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 <= -3.15e-308) {
tmp = (180.0 * Math.atan(((C + (B - A)) / B))) / Math.PI;
} else if (B <= 9.5e-122) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.15e-308: tmp = (180.0 * math.atan(((C + (B - A)) / B))) / math.pi elif B <= 9.5e-122: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.15e-308) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C + Float64(B - A)) / B))) / pi); elseif (B <= 9.5e-122) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); 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 <= -3.15e-308) tmp = (180.0 * atan(((C + (B - A)) / B))) / pi; elseif (B <= 9.5e-122) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.15e-308], N[(N[(180.0 * N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 9.5e-122], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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 -3.15 \cdot 10^{-308}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-122}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.1499999999999998e-308Initial program 53.5%
Simplified75.5%
Taylor expanded in B around -inf 70.6%
neg-mul-170.6%
unsub-neg70.6%
Simplified70.6%
associate-*r/70.6%
Applied egg-rr70.6%
if -3.1499999999999998e-308 < B < 9.5000000000000002e-122Initial program 41.5%
Applied egg-rr76.5%
Taylor expanded in A around -inf 50.6%
if 9.5000000000000002e-122 < B Initial program 54.6%
Simplified75.8%
Taylor expanded in B around inf 68.7%
+-commutative68.7%
Simplified68.7%
Final simplification67.2%
(FPCore (A B C)
:precision binary64
(if (<= A -8e+63)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 6.2e-6)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8e+63) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 6.2e-6) {
tmp = 180.0 * (atan(((B + C) / B)) / ((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 <= -8e+63) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 6.2e-6) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / 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 <= -8e+63: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 6.2e-6: tmp = 180.0 * (math.atan(((B + C) / B)) / 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 <= -8e+63) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 6.2e-6) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / 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 <= -8e+63) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 6.2e-6) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8e+63], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.2e-6], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $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 -8 \cdot 10^{+63}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.2 \cdot 10^{-6}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.00000000000000046e63Initial program 20.2%
Applied egg-rr60.4%
Taylor expanded in A around -inf 76.2%
Taylor expanded in B around 0 76.2%
associate-*r/76.2%
associate-/l*76.2%
associate-/r/76.2%
Simplified76.2%
if -8.00000000000000046e63 < A < 6.1999999999999999e-6Initial program 51.4%
Simplified77.6%
Taylor expanded in B around -inf 52.0%
neg-mul-152.0%
unsub-neg52.0%
Simplified52.0%
Taylor expanded in A around 0 48.3%
if 6.1999999999999999e-6 < A Initial program 77.8%
Taylor expanded in A around inf 64.9%
Final simplification57.8%
(FPCore (A B C)
:precision binary64
(if (<= A -9.2e+63)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 2.3e-204)
(* 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 <= -9.2e+63) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 2.3e-204) {
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 <= -9.2e+63) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 2.3e-204) {
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 <= -9.2e+63: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 2.3e-204: 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 <= -9.2e+63) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 2.3e-204) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9.2e+63) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 2.3e-204) 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, -9.2e+63], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.3e-204], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.2 \cdot 10^{+63}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.3 \cdot 10^{-204}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.19999999999999973e63Initial program 20.2%
Applied egg-rr60.4%
Taylor expanded in A around -inf 76.2%
Taylor expanded in B around 0 76.2%
associate-*r/76.2%
associate-/l*76.2%
associate-/r/76.2%
Simplified76.2%
if -9.19999999999999973e63 < A < 2.2999999999999999e-204Initial program 46.8%
Simplified76.8%
Taylor expanded in B around -inf 51.7%
neg-mul-151.7%
unsub-neg51.7%
Simplified51.7%
Taylor expanded in A around 0 51.8%
if 2.2999999999999999e-204 < A Initial program 70.9%
Simplified89.6%
Taylor expanded in B around -inf 68.1%
neg-mul-168.1%
unsub-neg68.1%
Simplified68.1%
Taylor expanded in C around 0 63.0%
Final simplification61.4%
(FPCore (A B C)
:precision binary64
(if (<= C -5.6e-83)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 2.75e+42)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5.6e-83) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 2.75e+42) {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -5.6e-83) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 2.75e+42) {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -5.6e-83: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 2.75e+42: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -5.6e-83) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 2.75e+42) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -5.6e-83) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 2.75e+42) tmp = 180.0 * (atan(((B - A) / B)) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -5.6e-83], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.75e+42], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5.6 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.75 \cdot 10^{+42}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -5.6000000000000002e-83Initial program 72.5%
Simplified84.4%
Taylor expanded in C around 0 69.9%
+-commutative69.9%
unpow269.9%
unpow269.9%
hypot-def83.0%
Simplified83.0%
Taylor expanded in A around 0 75.8%
if -5.6000000000000002e-83 < C < 2.75000000000000001e42Initial program 55.1%
Simplified78.5%
Taylor expanded in B around -inf 58.7%
neg-mul-158.7%
unsub-neg58.7%
Simplified58.7%
Taylor expanded in C around 0 58.3%
if 2.75000000000000001e42 < C Initial program 20.8%
Applied egg-rr55.0%
Taylor expanded in C around inf 48.8%
Taylor expanded in A around 0 68.8%
Final simplification66.4%
(FPCore (A B C)
:precision binary64
(if (<= C -5.7e-83)
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))
(if (<= C 3.1e+42)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5.7e-83) {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
} else if (C <= 3.1e+42) {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -5.7e-83) {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
} else if (C <= 3.1e+42) {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -5.7e-83: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) elif C <= 3.1e+42: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -5.7e-83) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); elseif (C <= 3.1e+42) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -5.7e-83) tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); elseif (C <= 3.1e+42) tmp = 180.0 * (atan(((B - A) / B)) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -5.7e-83], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.1e+42], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5.7 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.1 \cdot 10^{+42}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -5.7e-83Initial program 72.5%
Simplified84.4%
Taylor expanded in B around inf 76.8%
+-commutative76.8%
Simplified76.8%
if -5.7e-83 < C < 3.1000000000000002e42Initial program 55.1%
Simplified78.5%
Taylor expanded in B around -inf 58.7%
neg-mul-158.7%
unsub-neg58.7%
Simplified58.7%
Taylor expanded in C around 0 58.3%
if 3.1000000000000002e42 < C Initial program 20.8%
Applied egg-rr55.0%
Taylor expanded in C around inf 48.8%
Taylor expanded in A around 0 68.8%
Final simplification66.7%
(FPCore (A B C)
:precision binary64
(if (<= B -3.2e-89)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.2e-113)
(/ 180.0 (/ PI (atan 0.0)))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.2e-89) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.2e-113) {
tmp = 180.0 / (((double) M_PI) / atan(0.0));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.2e-89) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.2e-113) {
tmp = 180.0 / (Math.PI / Math.atan(0.0));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.2e-89: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.2e-113: tmp = 180.0 / (math.pi / math.atan(0.0)) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.2e-89) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.2e-113) tmp = Float64(180.0 / Float64(pi / atan(0.0))); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.2e-89) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.2e-113) tmp = 180.0 / (pi / atan(0.0)); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.2e-89], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.2e-113], N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.2 \cdot 10^{-89}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.19999999999999998e-89Initial program 49.4%
Taylor expanded in B around -inf 53.6%
if -3.19999999999999998e-89 < B < 1.20000000000000006e-113Initial program 53.1%
Applied egg-rr81.8%
expm1-log1p-u66.4%
expm1-udef66.4%
Applied egg-rr66.4%
sub-neg66.4%
log1p-udef66.4%
rem-exp-log81.8%
associate--l-65.7%
metadata-eval65.7%
Applied egg-rr65.7%
Taylor expanded in C around inf 11.3%
distribute-lft1-in11.3%
metadata-eval11.3%
mul0-lft33.9%
metadata-eval33.9%
Simplified33.9%
if 1.20000000000000006e-113 < B Initial program 54.1%
Taylor expanded in B around inf 48.5%
Final simplification45.1%
(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 53.5%
Taylor expanded in B around -inf 40.1%
if -9.999999999999969e-311 < B Initial program 50.6%
Taylor expanded in B around inf 35.2%
Final simplification37.9%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 52.1%
Taylor expanded in B around inf 17.0%
Final simplification17.0%
herbie shell --seed 2024023
(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)))