
(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)))))))
(if (or (<= t_0 -1e-90) (not (<= t_0 0.0)))
(/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI)
(/ 180.0 (/ PI (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B))))))))))
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 <= -1e-90) || !(t_0 <= 0.0)) {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 / (((double) M_PI) / atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B))))));
}
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 <= -1e-90) || !(t_0 <= 0.0)) {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
} else {
tmp = 180.0 / (Math.PI / Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B))))));
}
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 <= -1e-90) or not (t_0 <= 0.0): tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi else: tmp = 180.0 / (math.pi / math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) 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 <= -1e-90) || !(t_0 <= 0.0)) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi); else tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B))))))); 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 <= -1e-90) || ~((t_0 <= 0.0))) tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; else tmp = 180.0 / (pi / atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))); 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, -1e-90], N[Not[LessEqual[t$95$0, 0.0]], $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], N[(180.0 / N[(Pi / 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]), $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 -1 \cdot 10^{-90} \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\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))))) < -9.99999999999999995e-91 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 60.3%
associate-*r/60.3%
Applied egg-rr83.6%
if -9.99999999999999995e-91 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 22.4%
clear-num22.4%
un-div-inv22.4%
associate--r+13.0%
*-commutative13.0%
+-commutative13.0%
unpow213.0%
unpow213.0%
hypot-udef13.0%
div-inv13.0%
Applied egg-rr22.4%
clear-num22.4%
inv-pow22.4%
associate--l-13.0%
Applied egg-rr13.0%
unpow-113.0%
+-commutative13.0%
associate--r+13.2%
Simplified13.2%
Taylor expanded in A around -inf 96.7%
Final simplification85.2%
(FPCore (A B C)
:precision binary64
(if (<= A -3.6e+210)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (or (<= A -3.7e+198) (not (<= A -1.66e+47)))
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))
(/ 180.0 (/ PI (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B))))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.6e+210) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if ((A <= -3.7e+198) || !(A <= -1.66e+47)) {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B))))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.6e+210) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if ((A <= -3.7e+198) || !(A <= -1.66e+47)) {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B))))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.6e+210: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif (A <= -3.7e+198) or not (A <= -1.66e+47): tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.6e+210) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif ((A <= -3.7e+198) || !(A <= -1.66e+47)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B))))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.6e+210) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif ((A <= -3.7e+198) || ~((A <= -1.66e+47))) tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); else tmp = 180.0 / (pi / atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.6e+210], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[A, -3.7e+198], N[Not[LessEqual[A, -1.66e+47]], $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], N[(180.0 / N[(Pi / 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]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.6 \cdot 10^{+210}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.7 \cdot 10^{+198} \lor \neg \left(A \leq -1.66 \cdot 10^{+47}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}}\\
\end{array}
\end{array}
if A < -3.6000000000000003e210Initial program 4.3%
associate-*r/4.3%
Applied egg-rr49.9%
Taylor expanded in A around -inf 100.0%
if -3.6000000000000003e210 < A < -3.6999999999999998e198 or -1.6599999999999999e47 < A Initial program 65.4%
Simplified82.6%
if -3.6999999999999998e198 < A < -1.6599999999999999e47Initial program 27.9%
clear-num27.9%
un-div-inv27.9%
associate--r+19.8%
*-commutative19.8%
+-commutative19.8%
unpow219.8%
unpow219.8%
hypot-udef40.5%
div-inv40.5%
Applied egg-rr51.4%
clear-num51.4%
inv-pow51.4%
associate--l-40.5%
Applied egg-rr40.5%
unpow-140.5%
+-commutative40.5%
associate--r+43.2%
Simplified43.2%
Taylor expanded in A around -inf 74.4%
Final simplification82.7%
(FPCore (A B C)
:precision binary64
(if (<= C -8e-84)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(if (<= C 1.32e+85)
(/ 180.0 (/ PI (atan (/ 1.0 (/ (- B) (+ A (hypot A B)))))))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -8e-84) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else if (C <= 1.32e+85) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 / (-B / (A + hypot(A, B))))));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -8e-84) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else if (C <= 1.32e+85) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 / (-B / (A + Math.hypot(A, B))))));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -8e-84: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi elif C <= 1.32e+85: tmp = 180.0 / (math.pi / math.atan((1.0 / (-B / (A + math.hypot(A, B)))))) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -8e-84) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); elseif (C <= 1.32e+85) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 / Float64(Float64(-B) / Float64(A + hypot(A, B))))))); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -8e-84) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; elseif (C <= 1.32e+85) tmp = 180.0 / (pi / atan((1.0 / (-B / (A + hypot(A, B)))))); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -8e-84], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 1.32e+85], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 / N[((-B) / N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -8 \cdot 10^{-84}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.32 \cdot 10^{+85}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{1}{\frac{-B}{A + \mathsf{hypot}\left(A, B\right)}}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -8.0000000000000003e-84Initial program 80.9%
associate-*r/81.0%
Applied egg-rr86.5%
Taylor expanded in A around 0 78.8%
unpow278.8%
unpow278.8%
hypot-def83.0%
Simplified83.0%
if -8.0000000000000003e-84 < C < 1.32000000000000007e85Initial program 54.3%
clear-num54.3%
un-div-inv54.3%
associate--r+52.0%
*-commutative52.0%
+-commutative52.0%
unpow252.0%
unpow252.0%
hypot-udef69.4%
div-inv69.4%
Applied egg-rr77.6%
clear-num77.6%
inv-pow77.6%
associate--l-69.4%
Applied egg-rr69.4%
unpow-169.4%
+-commutative69.4%
associate--r+77.6%
Simplified77.6%
Taylor expanded in C around 0 54.2%
associate-*r/54.2%
mul-1-neg54.2%
unpow254.2%
unpow254.2%
hypot-def77.1%
Simplified77.1%
if 1.32000000000000007e85 < C Initial program 17.8%
associate--l-17.8%
Simplified17.8%
Taylor expanded in C around inf 52.2%
Taylor expanded in B around inf 82.8%
Final simplification80.0%
(FPCore (A B C)
:precision binary64
(if (<= C -3.7e-82)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(if (<= C 1.18e+86)
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.7e-82) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else if (C <= 1.18e+86) {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -3.7e-82) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else if (C <= 1.18e+86) {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -3.7e-82: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi elif C <= 1.18e+86: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -3.7e-82) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); elseif (C <= 1.18e+86) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -3.7e-82) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; elseif (C <= 1.18e+86) tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -3.7e-82], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 1.18e+86], 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[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.7 \cdot 10^{-82}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.18 \cdot 10^{+86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.7000000000000001e-82Initial program 80.9%
associate-*r/81.0%
Applied egg-rr86.5%
Taylor expanded in A around 0 78.8%
unpow278.8%
unpow278.8%
hypot-def83.0%
Simplified83.0%
if -3.7000000000000001e-82 < C < 1.18e86Initial program 54.3%
associate--l-51.9%
Simplified51.9%
Taylor expanded in C around 0 54.2%
associate-*r/54.2%
mul-1-neg54.2%
+-commutative54.2%
unpow254.2%
unpow254.2%
hypot-def77.1%
Simplified77.1%
if 1.18e86 < C Initial program 17.8%
associate--l-17.8%
Simplified17.8%
Taylor expanded in C around inf 52.2%
Taylor expanded in B around inf 82.8%
Final simplification79.9%
(FPCore (A B C)
:precision binary64
(if (<= C -1.25e-81)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(if (<= C 6.8e+84)
(/ 180.0 (/ PI (atan (/ (- (- A) (hypot A B)) B))))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.25e-81) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else if (C <= 6.8e+84) {
tmp = 180.0 / (((double) M_PI) / atan(((-A - hypot(A, B)) / B)));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.25e-81) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else if (C <= 6.8e+84) {
tmp = 180.0 / (Math.PI / Math.atan(((-A - Math.hypot(A, B)) / B)));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.25e-81: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi elif C <= 6.8e+84: tmp = 180.0 / (math.pi / math.atan(((-A - math.hypot(A, B)) / B))) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.25e-81) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); elseif (C <= 6.8e+84) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.25e-81) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; elseif (C <= 6.8e+84) tmp = 180.0 / (pi / atan(((-A - hypot(A, B)) / B))); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.25e-81], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 6.8e+84], N[(180.0 / N[(Pi / N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.25 \cdot 10^{-81}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.8 \cdot 10^{+84}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.24999999999999995e-81Initial program 80.9%
associate-*r/81.0%
Applied egg-rr86.5%
Taylor expanded in A around 0 78.8%
unpow278.8%
unpow278.8%
hypot-def83.0%
Simplified83.0%
if -1.24999999999999995e-81 < C < 6.7999999999999996e84Initial program 54.3%
clear-num54.3%
un-div-inv54.3%
associate--r+52.0%
*-commutative52.0%
+-commutative52.0%
unpow252.0%
unpow252.0%
hypot-udef69.4%
div-inv69.4%
Applied egg-rr77.6%
Taylor expanded in C around 0 54.2%
distribute-lft-in54.2%
neg-mul-154.2%
unpow254.2%
unpow254.2%
hypot-def77.1%
mul-1-neg77.1%
distribute-neg-in77.1%
Simplified77.1%
if 6.7999999999999996e84 < C Initial program 17.8%
associate--l-17.8%
Simplified17.8%
Taylor expanded in C around inf 52.2%
Taylor expanded in B around inf 82.8%
Final simplification80.0%
(FPCore (A B C)
:precision binary64
(if (<= A -9e+46)
(/ 180.0 (/ PI (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))))
(if (<= A 1.25e-21)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9e+46) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B))))));
} else if (A <= 1.25e-21) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9e+46) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B))))));
} else if (A <= 1.25e-21) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9e+46: tmp = 180.0 / (math.pi / math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) elif A <= 1.25e-21: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9e+46) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B))))))); elseif (A <= 1.25e-21) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9e+46) tmp = 180.0 / (pi / atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))); elseif (A <= 1.25e-21) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9e+46], N[(180.0 / N[(Pi / 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]), $MachinePrecision], If[LessEqual[A, 1.25e-21], 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[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9 \cdot 10^{+46}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}}\\
\mathbf{elif}\;A \leq 1.25 \cdot 10^{-21}:\\
\;\;\;\;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(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.00000000000000019e46Initial program 22.4%
clear-num22.4%
un-div-inv22.4%
associate--r+17.5%
*-commutative17.5%
+-commutative17.5%
unpow217.5%
unpow217.5%
hypot-udef33.9%
div-inv33.9%
Applied egg-rr54.8%
clear-num54.8%
inv-pow54.8%
associate--l-33.9%
Applied egg-rr33.9%
unpow-133.9%
+-commutative33.9%
associate--r+49.9%
Simplified49.9%
Taylor expanded in A around -inf 75.6%
if -9.00000000000000019e46 < A < 1.24999999999999993e-21Initial program 57.5%
associate--l-57.4%
Simplified57.4%
Taylor expanded in A around 0 54.1%
unpow254.1%
unpow254.1%
hypot-def75.1%
Simplified75.1%
if 1.24999999999999993e-21 < A Initial program 83.9%
associate--l-83.9%
Simplified83.9%
Taylor expanded in B around -inf 79.5%
associate--l+79.5%
div-sub81.3%
Simplified81.3%
Final simplification76.7%
(FPCore (A B C)
:precision binary64
(if (<= A -2.5e+45)
(/ 180.0 (/ PI (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))))
(if (<= A 1.55e-21)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.5e+45) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B))))));
} else if (A <= 1.55e-21) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.5e+45) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B))))));
} else if (A <= 1.55e-21) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.5e+45: tmp = 180.0 / (math.pi / math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) elif A <= 1.55e-21: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.5e+45) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B))))))); elseif (A <= 1.55e-21) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.5e+45) tmp = 180.0 / (pi / atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))); elseif (A <= 1.55e-21) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.5e+45], N[(180.0 / N[(Pi / 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]), $MachinePrecision], If[LessEqual[A, 1.55e-21], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.5 \cdot 10^{+45}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}}\\
\mathbf{elif}\;A \leq 1.55 \cdot 10^{-21}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.5e45Initial program 22.4%
clear-num22.4%
un-div-inv22.4%
associate--r+17.5%
*-commutative17.5%
+-commutative17.5%
unpow217.5%
unpow217.5%
hypot-udef33.9%
div-inv33.9%
Applied egg-rr54.8%
clear-num54.8%
inv-pow54.8%
associate--l-33.9%
Applied egg-rr33.9%
unpow-133.9%
+-commutative33.9%
associate--r+49.9%
Simplified49.9%
Taylor expanded in A around -inf 75.6%
if -2.5e45 < A < 1.5499999999999999e-21Initial program 57.5%
associate-*r/57.5%
Applied egg-rr78.3%
Taylor expanded in A around 0 54.1%
unpow254.1%
unpow254.1%
hypot-def75.1%
Simplified75.1%
if 1.5499999999999999e-21 < A Initial program 83.9%
associate--l-83.9%
Simplified83.9%
Taylor expanded in B around -inf 79.5%
associate--l+79.5%
div-sub81.3%
Simplified81.3%
Final simplification76.7%
(FPCore (A B C) :precision binary64 (if (<= C 1.35e+179) (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B)))) (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.35e+179) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.35e+179) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.35e+179: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.35e+179) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.35e+179) tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.35e+179], 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[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.35 \cdot 10^{+179}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 1.34999999999999991e179Initial program 62.8%
clear-num62.8%
un-div-inv62.8%
associate--r+61.4%
*-commutative61.4%
+-commutative61.4%
unpow261.4%
unpow261.4%
hypot-udef74.2%
div-inv74.2%
Applied egg-rr80.0%
if 1.34999999999999991e179 < C Initial program 7.6%
associate--l-7.6%
Simplified7.6%
Taylor expanded in C around inf 60.4%
Taylor expanded in B around inf 94.1%
Final simplification81.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))
(t_1 (/ 180.0 (/ PI (atan (- 1.0 (/ A B)))))))
(if (<= C -1.85e-56)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 2.9e-238)
t_0
(if (<= C 7.5e-208)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 5.2e-134)
t_0
(if (<= C 7.5e-38)
t_1
(if (<= C 2.5e+43)
(* (/ 180.0 PI) (atan (/ 0.5 (/ A B))))
(if (<= C 1.44e+85)
t_1
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
double t_1 = 180.0 / (((double) M_PI) / atan((1.0 - (A / B))));
double tmp;
if (C <= -1.85e-56) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 2.9e-238) {
tmp = t_0;
} else if (C <= 7.5e-208) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 5.2e-134) {
tmp = t_0;
} else if (C <= 7.5e-38) {
tmp = t_1;
} else if (C <= 2.5e+43) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 / (A / B)));
} else if (C <= 1.44e+85) {
tmp = t_1;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
double t_1 = 180.0 / (Math.PI / Math.atan((1.0 - (A / B))));
double tmp;
if (C <= -1.85e-56) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 2.9e-238) {
tmp = t_0;
} else if (C <= 7.5e-208) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 5.2e-134) {
tmp = t_0;
} else if (C <= 7.5e-38) {
tmp = t_1;
} else if (C <= 2.5e+43) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 / (A / B)));
} else if (C <= 1.44e+85) {
tmp = t_1;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi t_1 = 180.0 / (math.pi / math.atan((1.0 - (A / B)))) tmp = 0 if C <= -1.85e-56: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 2.9e-238: tmp = t_0 elif C <= 7.5e-208: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 5.2e-134: tmp = t_0 elif C <= 7.5e-38: tmp = t_1 elif C <= 2.5e+43: tmp = (180.0 / math.pi) * math.atan((0.5 / (A / B))) elif C <= 1.44e+85: tmp = t_1 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi) t_1 = Float64(180.0 / Float64(pi / atan(Float64(1.0 - Float64(A / B))))) tmp = 0.0 if (C <= -1.85e-56) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 2.9e-238) tmp = t_0; elseif (C <= 7.5e-208) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 5.2e-134) tmp = t_0; elseif (C <= 7.5e-38) tmp = t_1; elseif (C <= 2.5e+43) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 / Float64(A / B)))); elseif (C <= 1.44e+85) tmp = t_1; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((-1.0 - (A / B)))) / pi; t_1 = 180.0 / (pi / atan((1.0 - (A / B)))); tmp = 0.0; if (C <= -1.85e-56) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 2.9e-238) tmp = t_0; elseif (C <= 7.5e-208) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 5.2e-134) tmp = t_0; elseif (C <= 7.5e-38) tmp = t_1; elseif (C <= 2.5e+43) tmp = (180.0 / pi) * atan((0.5 / (A / B))); elseif (C <= 1.44e+85) tmp = t_1; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.85e-56], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.9e-238], t$95$0, If[LessEqual[C, 7.5e-208], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.2e-134], t$95$0, If[LessEqual[C, 7.5e-38], t$95$1, If[LessEqual[C, 2.5e+43], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.44e+85], t$95$1, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
t_1 := \frac{180}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A}{B}\right)}}\\
\mathbf{if}\;C \leq -1.85 \cdot 10^{-56}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.9 \cdot 10^{-238}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{-208}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.2 \cdot 10^{-134}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{-38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 2.5 \cdot 10^{+43}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\
\mathbf{elif}\;C \leq 1.44 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.8500000000000001e-56Initial program 83.2%
associate--l-83.1%
Simplified83.1%
Taylor expanded in C around -inf 74.6%
if -1.8500000000000001e-56 < C < 2.8999999999999998e-238 or 7.4999999999999999e-208 < C < 5.20000000000000045e-134Initial program 60.6%
associate-*r/60.6%
Applied egg-rr83.6%
Taylor expanded in B around inf 57.9%
+-commutative57.9%
associate--r+57.9%
div-sub57.9%
Simplified57.9%
Taylor expanded in C around 0 56.5%
distribute-lft-in56.5%
metadata-eval56.5%
mul-1-neg56.5%
unsub-neg56.5%
Simplified56.5%
if 2.8999999999999998e-238 < C < 7.4999999999999999e-208Initial program 49.5%
associate--l-26.1%
Simplified26.1%
Taylor expanded in A around -inf 73.0%
associate-*r/73.0%
Simplified73.0%
if 5.20000000000000045e-134 < C < 7.5e-38 or 2.5000000000000002e43 < C < 1.44e85Initial program 54.2%
clear-num54.2%
un-div-inv54.2%
associate--r+54.1%
*-commutative54.1%
+-commutative54.1%
unpow254.1%
unpow254.1%
hypot-udef73.6%
div-inv73.6%
Applied egg-rr73.6%
clear-num73.6%
inv-pow73.6%
associate--l-73.6%
Applied egg-rr73.6%
unpow-173.6%
+-commutative73.6%
associate--r+73.7%
Simplified73.7%
Taylor expanded in C around 0 54.6%
associate-*r/54.6%
mul-1-neg54.6%
distribute-neg-in54.6%
unsub-neg54.6%
unpow254.6%
unpow254.6%
hypot-def74.1%
Simplified74.1%
Taylor expanded in B around -inf 56.1%
mul-1-neg56.1%
unsub-neg56.1%
Simplified56.1%
if 7.5e-38 < C < 2.5000000000000002e43Initial program 23.8%
associate-*r/23.8%
Applied egg-rr61.9%
Taylor expanded in A around -inf 52.7%
expm1-log1p-u48.9%
expm1-udef30.0%
associate-/l*30.0%
Applied egg-rr30.0%
expm1-def48.9%
expm1-log1p52.7%
associate-/r/52.7%
associate-*r/52.7%
associate-/l*52.7%
Simplified52.7%
if 1.44e85 < C Initial program 17.8%
associate--l-17.8%
Simplified17.8%
Taylor expanded in C around inf 52.2%
Taylor expanded in B around inf 82.8%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))
(t_1 (/ 180.0 (/ PI (atan (- 1.0 (/ A B)))))))
(if (<= C -6e-56)
(/ (* 180.0 (atan (/ (* C 2.0) B))) PI)
(if (<= C 1.26e-238)
t_0
(if (<= C 3.9e-208)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 3.3e-134)
t_0
(if (<= C 2.7e-33)
t_1
(if (<= C 5.6e+43)
(* (/ 180.0 PI) (atan (/ 0.5 (/ A B))))
(if (<= C 3e+85)
t_1
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
double t_1 = 180.0 / (((double) M_PI) / atan((1.0 - (A / B))));
double tmp;
if (C <= -6e-56) {
tmp = (180.0 * atan(((C * 2.0) / B))) / ((double) M_PI);
} else if (C <= 1.26e-238) {
tmp = t_0;
} else if (C <= 3.9e-208) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 3.3e-134) {
tmp = t_0;
} else if (C <= 2.7e-33) {
tmp = t_1;
} else if (C <= 5.6e+43) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 / (A / B)));
} else if (C <= 3e+85) {
tmp = t_1;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
double t_1 = 180.0 / (Math.PI / Math.atan((1.0 - (A / B))));
double tmp;
if (C <= -6e-56) {
tmp = (180.0 * Math.atan(((C * 2.0) / B))) / Math.PI;
} else if (C <= 1.26e-238) {
tmp = t_0;
} else if (C <= 3.9e-208) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 3.3e-134) {
tmp = t_0;
} else if (C <= 2.7e-33) {
tmp = t_1;
} else if (C <= 5.6e+43) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 / (A / B)));
} else if (C <= 3e+85) {
tmp = t_1;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi t_1 = 180.0 / (math.pi / math.atan((1.0 - (A / B)))) tmp = 0 if C <= -6e-56: tmp = (180.0 * math.atan(((C * 2.0) / B))) / math.pi elif C <= 1.26e-238: tmp = t_0 elif C <= 3.9e-208: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 3.3e-134: tmp = t_0 elif C <= 2.7e-33: tmp = t_1 elif C <= 5.6e+43: tmp = (180.0 / math.pi) * math.atan((0.5 / (A / B))) elif C <= 3e+85: tmp = t_1 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi) t_1 = Float64(180.0 / Float64(pi / atan(Float64(1.0 - Float64(A / B))))) tmp = 0.0 if (C <= -6e-56) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C * 2.0) / B))) / pi); elseif (C <= 1.26e-238) tmp = t_0; elseif (C <= 3.9e-208) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 3.3e-134) tmp = t_0; elseif (C <= 2.7e-33) tmp = t_1; elseif (C <= 5.6e+43) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 / Float64(A / B)))); elseif (C <= 3e+85) tmp = t_1; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((-1.0 - (A / B)))) / pi; t_1 = 180.0 / (pi / atan((1.0 - (A / B)))); tmp = 0.0; if (C <= -6e-56) tmp = (180.0 * atan(((C * 2.0) / B))) / pi; elseif (C <= 1.26e-238) tmp = t_0; elseif (C <= 3.9e-208) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 3.3e-134) tmp = t_0; elseif (C <= 2.7e-33) tmp = t_1; elseif (C <= 5.6e+43) tmp = (180.0 / pi) * atan((0.5 / (A / B))); elseif (C <= 3e+85) tmp = t_1; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -6e-56], N[(N[(180.0 * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 1.26e-238], t$95$0, If[LessEqual[C, 3.9e-208], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.3e-134], t$95$0, If[LessEqual[C, 2.7e-33], t$95$1, If[LessEqual[C, 5.6e+43], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3e+85], t$95$1, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
t_1 := \frac{180}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A}{B}\right)}}\\
\mathbf{if}\;C \leq -6 \cdot 10^{-56}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.26 \cdot 10^{-238}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 3.9 \cdot 10^{-208}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.3 \cdot 10^{-134}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 2.7 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 5.6 \cdot 10^{+43}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\
\mathbf{elif}\;C \leq 3 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.99999999999999979e-56Initial program 83.2%
associate-*r/83.2%
Applied egg-rr88.0%
Taylor expanded in C around -inf 74.7%
if -5.99999999999999979e-56 < C < 1.26000000000000004e-238 or 3.90000000000000004e-208 < C < 3.30000000000000019e-134Initial program 60.6%
associate-*r/60.6%
Applied egg-rr83.6%
Taylor expanded in B around inf 57.9%
+-commutative57.9%
associate--r+57.9%
div-sub57.9%
Simplified57.9%
Taylor expanded in C around 0 56.5%
distribute-lft-in56.5%
metadata-eval56.5%
mul-1-neg56.5%
unsub-neg56.5%
Simplified56.5%
if 1.26000000000000004e-238 < C < 3.90000000000000004e-208Initial program 49.5%
associate--l-26.1%
Simplified26.1%
Taylor expanded in A around -inf 73.0%
associate-*r/73.0%
Simplified73.0%
if 3.30000000000000019e-134 < C < 2.7000000000000001e-33 or 5.60000000000000038e43 < C < 3e85Initial program 54.2%
clear-num54.2%
un-div-inv54.2%
associate--r+54.1%
*-commutative54.1%
+-commutative54.1%
unpow254.1%
unpow254.1%
hypot-udef73.6%
div-inv73.6%
Applied egg-rr73.6%
clear-num73.6%
inv-pow73.6%
associate--l-73.6%
Applied egg-rr73.6%
unpow-173.6%
+-commutative73.6%
associate--r+73.7%
Simplified73.7%
Taylor expanded in C around 0 54.6%
associate-*r/54.6%
mul-1-neg54.6%
distribute-neg-in54.6%
unsub-neg54.6%
unpow254.6%
unpow254.6%
hypot-def74.1%
Simplified74.1%
Taylor expanded in B around -inf 56.1%
mul-1-neg56.1%
unsub-neg56.1%
Simplified56.1%
if 2.7000000000000001e-33 < C < 5.60000000000000038e43Initial program 23.8%
associate-*r/23.8%
Applied egg-rr61.9%
Taylor expanded in A around -inf 52.7%
expm1-log1p-u48.9%
expm1-udef30.0%
associate-/l*30.0%
Applied egg-rr30.0%
expm1-def48.9%
expm1-log1p52.7%
associate-/r/52.7%
associate-*r/52.7%
associate-/l*52.7%
Simplified52.7%
if 3e85 < C Initial program 17.8%
associate--l-17.8%
Simplified17.8%
Taylor expanded in C around inf 52.2%
Taylor expanded in B around inf 82.8%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ 180.0 (/ PI (atan (- 1.0 (/ A B))))))
(t_1 (* (/ 180.0 PI) (atan (/ 0.5 (/ A B))))))
(if (<= C -8.5e-83)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 7.8e-239)
t_0
(if (<= C 3.1e-165)
t_1
(if (<= C 1.8e-37)
t_0
(if (<= C 7.5e+43)
t_1
(if (<= C 1.85e+85)
t_0
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 / (((double) M_PI) / atan((1.0 - (A / B))));
double t_1 = (180.0 / ((double) M_PI)) * atan((0.5 / (A / B)));
double tmp;
if (C <= -8.5e-83) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 7.8e-239) {
tmp = t_0;
} else if (C <= 3.1e-165) {
tmp = t_1;
} else if (C <= 1.8e-37) {
tmp = t_0;
} else if (C <= 7.5e+43) {
tmp = t_1;
} else if (C <= 1.85e+85) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 / (Math.PI / Math.atan((1.0 - (A / B))));
double t_1 = (180.0 / Math.PI) * Math.atan((0.5 / (A / B)));
double tmp;
if (C <= -8.5e-83) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 7.8e-239) {
tmp = t_0;
} else if (C <= 3.1e-165) {
tmp = t_1;
} else if (C <= 1.8e-37) {
tmp = t_0;
} else if (C <= 7.5e+43) {
tmp = t_1;
} else if (C <= 1.85e+85) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 / (math.pi / math.atan((1.0 - (A / B)))) t_1 = (180.0 / math.pi) * math.atan((0.5 / (A / B))) tmp = 0 if C <= -8.5e-83: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 7.8e-239: tmp = t_0 elif C <= 3.1e-165: tmp = t_1 elif C <= 1.8e-37: tmp = t_0 elif C <= 7.5e+43: tmp = t_1 elif C <= 1.85e+85: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 / Float64(pi / atan(Float64(1.0 - Float64(A / B))))) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 / Float64(A / B)))) tmp = 0.0 if (C <= -8.5e-83) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 7.8e-239) tmp = t_0; elseif (C <= 3.1e-165) tmp = t_1; elseif (C <= 1.8e-37) tmp = t_0; elseif (C <= 7.5e+43) tmp = t_1; elseif (C <= 1.85e+85) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 / (pi / atan((1.0 - (A / B)))); t_1 = (180.0 / pi) * atan((0.5 / (A / B))); tmp = 0.0; if (C <= -8.5e-83) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 7.8e-239) tmp = t_0; elseif (C <= 3.1e-165) tmp = t_1; elseif (C <= 1.8e-37) tmp = t_0; elseif (C <= 7.5e+43) tmp = t_1; elseif (C <= 1.85e+85) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -8.5e-83], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.8e-239], t$95$0, If[LessEqual[C, 3.1e-165], t$95$1, If[LessEqual[C, 1.8e-37], t$95$0, If[LessEqual[C, 7.5e+43], t$95$1, If[LessEqual[C, 1.85e+85], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A}{B}\right)}}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\
\mathbf{if}\;C \leq -8.5 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.8 \cdot 10^{-239}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 3.1 \cdot 10^{-165}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 1.8 \cdot 10^{-37}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 1.85 \cdot 10^{+85}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -8.49999999999999938e-83Initial program 80.9%
associate--l-80.9%
Simplified80.9%
Taylor expanded in C around -inf 70.5%
if -8.49999999999999938e-83 < C < 7.8e-239 or 3.09999999999999996e-165 < C < 1.80000000000000004e-37 or 7.49999999999999967e43 < C < 1.8500000000000001e85Initial program 60.4%
clear-num60.4%
un-div-inv60.4%
associate--r+60.5%
*-commutative60.5%
+-commutative60.5%
unpow260.5%
unpow260.5%
hypot-udef78.6%
div-inv78.6%
Applied egg-rr83.4%
clear-num83.5%
inv-pow83.5%
associate--l-78.6%
Applied egg-rr78.6%
unpow-178.6%
+-commutative78.6%
associate--r+83.5%
Simplified83.5%
Taylor expanded in C around 0 60.2%
associate-*r/60.2%
mul-1-neg60.2%
distribute-neg-in60.2%
unsub-neg60.2%
unpow260.2%
unpow260.2%
hypot-def82.7%
Simplified82.7%
Taylor expanded in B around -inf 55.4%
mul-1-neg55.4%
unsub-neg55.4%
Simplified55.4%
if 7.8e-239 < C < 3.09999999999999996e-165 or 1.80000000000000004e-37 < C < 7.49999999999999967e43Initial program 36.8%
associate-*r/36.8%
Applied egg-rr60.9%
Taylor expanded in A around -inf 49.8%
expm1-log1p-u47.5%
expm1-udef22.6%
associate-/l*22.6%
Applied egg-rr22.6%
expm1-def47.5%
expm1-log1p49.8%
associate-/r/49.8%
associate-*r/49.8%
associate-/l*49.8%
Simplified49.8%
if 1.8500000000000001e85 < C Initial program 17.8%
associate--l-17.8%
Simplified17.8%
Taylor expanded in C around inf 52.2%
Taylor expanded in B around inf 82.8%
Final simplification64.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)) (t_1 (* 180.0 (/ (atan (+ 1.0 t_0)) PI))))
(if (<= A -5.9e-43)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A -7e-294)
t_1
(if (<= A 4.3e-250)
(* (/ 180.0 PI) (atan (+ t_0 -1.0)))
(if (<= A 4e-140) (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)) t_1))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
double tmp;
if (A <= -5.9e-43) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= -7e-294) {
tmp = t_1;
} else if (A <= 4.3e-250) {
tmp = (180.0 / ((double) M_PI)) * atan((t_0 + -1.0));
} else if (A <= 4e-140) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
double tmp;
if (A <= -5.9e-43) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= -7e-294) {
tmp = t_1;
} else if (A <= 4.3e-250) {
tmp = (180.0 / Math.PI) * Math.atan((t_0 + -1.0));
} else if (A <= 4e-140) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = t_1;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B t_1 = 180.0 * (math.atan((1.0 + t_0)) / math.pi) tmp = 0 if A <= -5.9e-43: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= -7e-294: tmp = t_1 elif A <= 4.3e-250: tmp = (180.0 / math.pi) * math.atan((t_0 + -1.0)) elif A <= 4e-140: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = t_1 return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) t_1 = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)) tmp = 0.0 if (A <= -5.9e-43) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= -7e-294) tmp = t_1; elseif (A <= 4.3e-250) tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_0 + -1.0))); elseif (A <= 4e-140) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = t_1; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; t_1 = 180.0 * (atan((1.0 + t_0)) / pi); tmp = 0.0; if (A <= -5.9e-43) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= -7e-294) tmp = t_1; elseif (A <= 4.3e-250) tmp = (180.0 / pi) * atan((t_0 + -1.0)); elseif (A <= 4e-140) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = t_1; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.9e-43], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -7e-294], t$95$1, If[LessEqual[A, 4.3e-250], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4e-140], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{if}\;A \leq -5.9 \cdot 10^{-43}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-294}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 4.3 \cdot 10^{-250}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t_0 + -1\right)\\
\mathbf{elif}\;A \leq 4 \cdot 10^{-140}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if A < -5.89999999999999976e-43Initial program 28.9%
associate-*r/28.9%
Applied egg-rr56.2%
Taylor expanded in A around -inf 64.9%
if -5.89999999999999976e-43 < A < -7.00000000000000064e-294 or 3.9999999999999999e-140 < A Initial program 73.1%
associate--l-73.1%
Simplified73.1%
Taylor expanded in B around -inf 68.5%
associate--l+68.5%
div-sub69.2%
Simplified69.2%
if -7.00000000000000064e-294 < A < 4.30000000000000005e-250Initial program 47.3%
associate-*r/47.3%
Applied egg-rr80.8%
Taylor expanded in B around inf 67.4%
+-commutative67.4%
associate--r+67.4%
div-sub67.4%
Simplified67.4%
expm1-log1p-u19.7%
expm1-udef19.7%
associate-/l*19.7%
sub-neg19.7%
metadata-eval19.7%
Applied egg-rr19.7%
expm1-def19.7%
expm1-log1p67.4%
associate-/r/67.4%
+-commutative67.4%
Simplified67.4%
if 4.30000000000000005e-250 < A < 3.9999999999999999e-140Initial program 40.9%
associate--l-40.9%
Simplified40.9%
Taylor expanded in C around inf 41.2%
Taylor expanded in B around inf 65.1%
Final simplification67.4%
(FPCore (A B C)
:precision binary64
(if (<= B -1.05e-30)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -6.4e-263)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 6.3e-254)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.92e-60)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e-30) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -6.4e-263) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 6.3e-254) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.92e-60) {
tmp = 180.0 * (atan((-2.0 * (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 <= -1.05e-30) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -6.4e-263) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 6.3e-254) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.92e-60) {
tmp = 180.0 * (Math.atan((-2.0 * (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 <= -1.05e-30: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -6.4e-263: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 6.3e-254: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.92e-60: tmp = 180.0 * (math.atan((-2.0 * (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 <= -1.05e-30) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -6.4e-263) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 6.3e-254) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.92e-60) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * 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 <= -1.05e-30) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -6.4e-263) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 6.3e-254) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.92e-60) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.05e-30], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.4e-263], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.3e-254], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.92e-60], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / 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 -1.05 \cdot 10^{-30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -6.4 \cdot 10^{-263}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.3 \cdot 10^{-254}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.92 \cdot 10^{-60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.0500000000000001e-30Initial program 53.5%
associate--l-53.5%
Simplified53.5%
Taylor expanded in B around -inf 53.3%
if -1.0500000000000001e-30 < B < -6.4000000000000001e-263Initial program 63.8%
associate--l-63.8%
Simplified63.8%
+-commutative63.8%
add-sqr-sqrt63.8%
fma-def63.6%
unpow263.6%
unpow263.6%
hypot-def63.6%
unpow263.6%
unpow263.6%
hypot-def72.7%
Applied egg-rr72.7%
Taylor expanded in C around inf 47.3%
if -6.4000000000000001e-263 < B < 6.3000000000000003e-254Initial program 49.4%
associate--l-35.4%
Simplified35.4%
Taylor expanded in C around inf 63.4%
associate-*r/63.4%
distribute-rgt1-in63.4%
metadata-eval63.4%
mul0-lft63.4%
metadata-eval63.4%
Simplified63.4%
if 6.3000000000000003e-254 < B < 1.9200000000000001e-60Initial program 49.9%
associate--l-49.6%
Simplified49.6%
Taylor expanded in A around inf 32.1%
if 1.9200000000000001e-60 < B Initial program 57.4%
associate--l-57.4%
Simplified57.4%
Taylor expanded in B around inf 53.8%
Final simplification48.5%
(FPCore (A B C)
:precision binary64
(if (<= C -5.5e-84)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C 3.1e-251)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= C 3.2e-192)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 3.1e-134)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5.5e-84) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= 3.1e-251) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (C <= 3.2e-192) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 3.1e-134) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -5.5e-84) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= 3.1e-251) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (C <= 3.2e-192) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 3.1e-134) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -5.5e-84: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= 3.1e-251: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif C <= 3.2e-192: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 3.1e-134: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -5.5e-84) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= 3.1e-251) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (C <= 3.2e-192) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 3.1e-134) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -5.5e-84) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= 3.1e-251) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (C <= 3.2e-192) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 3.1e-134) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -5.5e-84], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.1e-251], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.2e-192], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.1e-134], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5.5 \cdot 10^{-84}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.1 \cdot 10^{-251}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.2 \cdot 10^{-192}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 3.1 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.50000000000000019e-84Initial program 80.9%
associate--l-80.9%
Simplified80.9%
+-commutative80.9%
add-sqr-sqrt80.8%
fma-def80.7%
unpow280.7%
unpow280.7%
hypot-def80.7%
unpow280.7%
unpow280.7%
hypot-def84.9%
Applied egg-rr84.9%
Taylor expanded in C around inf 70.0%
if -5.50000000000000019e-84 < C < 3.10000000000000003e-251Initial program 62.3%
associate--l-62.5%
Simplified62.5%
Taylor expanded in A around inf 38.8%
if 3.10000000000000003e-251 < C < 3.2000000000000002e-192Initial program 58.8%
associate--l-44.8%
Simplified44.8%
Taylor expanded in B around -inf 43.2%
if 3.2000000000000002e-192 < C < 3.10000000000000006e-134Initial program 50.3%
associate--l-50.1%
Simplified50.1%
Taylor expanded in B around inf 47.8%
if 3.10000000000000006e-134 < C Initial program 31.2%
associate--l-30.2%
Simplified30.2%
Taylor expanded in C around inf 34.7%
Taylor expanded in B around inf 59.6%
Final simplification56.7%
(FPCore (A B C)
:precision binary64
(if (<= C -1.26e-82)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 3.5e-253)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= C 1.24e-194)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 3.1e-134)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.26e-82) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 3.5e-253) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (C <= 1.24e-194) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 3.1e-134) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.26e-82) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 3.5e-253) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (C <= 1.24e-194) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 3.1e-134) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.26e-82: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 3.5e-253: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif C <= 1.24e-194: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 3.1e-134: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.26e-82) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 3.5e-253) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (C <= 1.24e-194) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 3.1e-134) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.26e-82) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 3.5e-253) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (C <= 1.24e-194) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 3.1e-134) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.26e-82], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.5e-253], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.24e-194], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.1e-134], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.26 \cdot 10^{-82}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.5 \cdot 10^{-253}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.24 \cdot 10^{-194}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 3.1 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.25999999999999993e-82Initial program 80.9%
associate--l-80.9%
Simplified80.9%
Taylor expanded in C around -inf 70.5%
if -1.25999999999999993e-82 < C < 3.50000000000000022e-253Initial program 62.3%
associate--l-62.5%
Simplified62.5%
Taylor expanded in A around inf 38.8%
if 3.50000000000000022e-253 < C < 1.24000000000000001e-194Initial program 58.8%
associate--l-44.8%
Simplified44.8%
Taylor expanded in B around -inf 43.2%
if 1.24000000000000001e-194 < C < 3.10000000000000006e-134Initial program 50.3%
associate--l-50.1%
Simplified50.1%
Taylor expanded in B around inf 47.8%
if 3.10000000000000006e-134 < C Initial program 31.2%
associate--l-30.2%
Simplified30.2%
Taylor expanded in C around inf 34.7%
Taylor expanded in B around inf 59.6%
Final simplification56.8%
(FPCore (A B C)
:precision binary64
(if (<= B -3.2e-36)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -7.4e-263)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 6.3e-254)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 5.4e-61)
(* 180.0 (/ (atan (- (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.2e-36) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -7.4e-263) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 6.3e-254) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 5.4e-61) {
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 <= -3.2e-36) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -7.4e-263) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 6.3e-254) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 5.4e-61) {
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 <= -3.2e-36: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -7.4e-263: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 6.3e-254: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 5.4e-61: 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 <= -3.2e-36) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -7.4e-263) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 6.3e-254) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 5.4e-61) tmp = Float64(180.0 * Float64(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 <= -3.2e-36) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -7.4e-263) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 6.3e-254) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 5.4e-61) 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, -3.2e-36], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7.4e-263], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.3e-254], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.4e-61], N[(180.0 * N[(N[ArcTan[(-N[(A / 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 -3.2 \cdot 10^{-36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -7.4 \cdot 10^{-263}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.3 \cdot 10^{-254}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.4 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.20000000000000021e-36Initial program 53.5%
associate--l-53.5%
Simplified53.5%
Taylor expanded in B around -inf 53.3%
if -3.20000000000000021e-36 < B < -7.3999999999999994e-263Initial program 63.8%
associate--l-63.8%
Simplified63.8%
+-commutative63.8%
add-sqr-sqrt63.8%
fma-def63.6%
unpow263.6%
unpow263.6%
hypot-def63.6%
unpow263.6%
unpow263.6%
hypot-def72.7%
Applied egg-rr72.7%
Taylor expanded in C around inf 47.3%
if -7.3999999999999994e-263 < B < 6.3000000000000003e-254Initial program 49.4%
associate--l-35.4%
Simplified35.4%
Taylor expanded in C around inf 63.4%
associate-*r/63.4%
distribute-rgt1-in63.4%
metadata-eval63.4%
mul0-lft63.4%
metadata-eval63.4%
Simplified63.4%
if 6.3000000000000003e-254 < B < 5.39999999999999987e-61Initial program 49.9%
associate--l-49.6%
Simplified49.6%
+-commutative49.6%
add-sqr-sqrt49.3%
fma-def49.3%
unpow249.3%
unpow249.3%
hypot-def49.3%
unpow249.3%
unpow249.3%
hypot-def52.6%
Applied egg-rr52.6%
Taylor expanded in A around inf 32.1%
associate-*r/32.1%
mul-1-neg32.1%
Simplified32.1%
if 5.39999999999999987e-61 < B Initial program 57.4%
associate--l-57.4%
Simplified57.4%
Taylor expanded in B around inf 53.8%
Final simplification48.5%
(FPCore (A B C)
:precision binary64
(if (<= A -4.8e-45)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (or (<= A 3.5e-305) (not (<= A 4.2e-140)))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.8e-45) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if ((A <= 3.5e-305) || !(A <= 4.2e-140)) {
tmp = 180.0 * (atan((1.0 + ((C - 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 (A <= -4.8e-45) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if ((A <= 3.5e-305) || !(A <= 4.2e-140)) {
tmp = 180.0 * (Math.atan((1.0 + ((C - 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 A <= -4.8e-45: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif (A <= 3.5e-305) or not (A <= 4.2e-140): tmp = 180.0 * (math.atan((1.0 + ((C - 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 (A <= -4.8e-45) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif ((A <= 3.5e-305) || !(A <= 4.2e-140)) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - 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 (A <= -4.8e-45) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif ((A <= 3.5e-305) || ~((A <= 4.2e-140))) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.8e-45], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[A, 3.5e-305], N[Not[LessEqual[A, 4.2e-140]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $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}\;A \leq -4.8 \cdot 10^{-45}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.5 \cdot 10^{-305} \lor \neg \left(A \leq 4.2 \cdot 10^{-140}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - 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 A < -4.7999999999999998e-45Initial program 28.9%
associate-*r/28.9%
Applied egg-rr56.2%
Taylor expanded in A around -inf 64.9%
if -4.7999999999999998e-45 < A < 3.4999999999999998e-305 or 4.20000000000000035e-140 < A Initial program 72.8%
associate--l-72.8%
Simplified72.8%
Taylor expanded in B around -inf 67.5%
associate--l+67.5%
div-sub68.2%
Simplified68.2%
if 3.4999999999999998e-305 < A < 4.20000000000000035e-140Initial program 40.3%
clear-num40.3%
un-div-inv40.3%
associate--r+40.3%
*-commutative40.3%
+-commutative40.3%
unpow240.3%
unpow240.3%
hypot-udef68.8%
div-inv68.8%
Applied egg-rr68.8%
Taylor expanded in C around inf 35.5%
distribute-rgt1-in35.5%
metadata-eval35.5%
mul0-lft35.5%
metadata-eval35.5%
+-lft-identity35.5%
associate-*r/35.5%
Simplified35.5%
Taylor expanded in B around 0 56.1%
Final simplification65.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= A -1.9e-162)
(/ 180.0 (/ PI (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))))
(if (<= A 1.02e-239)
(* (/ 180.0 PI) (atan (+ t_0 -1.0)))
(if (<= A 7.2e-140)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (+ 1.0 t_0)) PI)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (A <= -1.9e-162) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B))))));
} else if (A <= 1.02e-239) {
tmp = (180.0 / ((double) M_PI)) * atan((t_0 + -1.0));
} else if (A <= 7.2e-140) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (A <= -1.9e-162) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B))))));
} else if (A <= 1.02e-239) {
tmp = (180.0 / Math.PI) * Math.atan((t_0 + -1.0));
} else if (A <= 7.2e-140) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if A <= -1.9e-162: tmp = 180.0 / (math.pi / math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) elif A <= 1.02e-239: tmp = (180.0 / math.pi) * math.atan((t_0 + -1.0)) elif A <= 7.2e-140: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (A <= -1.9e-162) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B))))))); elseif (A <= 1.02e-239) tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_0 + -1.0))); elseif (A <= 7.2e-140) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (A <= -1.9e-162) tmp = 180.0 / (pi / atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))); elseif (A <= 1.02e-239) tmp = (180.0 / pi) * atan((t_0 + -1.0)); elseif (A <= 7.2e-140) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan((1.0 + t_0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[A, -1.9e-162], N[(180.0 / N[(Pi / 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]), $MachinePrecision], If[LessEqual[A, 1.02e-239], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.2e-140], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;A \leq -1.9 \cdot 10^{-162}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}}\\
\mathbf{elif}\;A \leq 1.02 \cdot 10^{-239}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t_0 + -1\right)\\
\mathbf{elif}\;A \leq 7.2 \cdot 10^{-140}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.90000000000000002e-162Initial program 33.8%
clear-num33.8%
un-div-inv33.8%
associate--r+30.6%
*-commutative30.6%
+-commutative30.6%
unpow230.6%
unpow230.6%
hypot-udef45.5%
div-inv45.5%
Applied egg-rr58.6%
clear-num58.6%
inv-pow58.6%
associate--l-45.5%
Applied egg-rr45.5%
unpow-145.5%
+-commutative45.5%
associate--r+52.4%
Simplified52.4%
Taylor expanded in A around -inf 66.1%
if -1.90000000000000002e-162 < A < 1.0199999999999999e-239Initial program 59.5%
associate-*r/59.5%
Applied egg-rr87.3%
Taylor expanded in B around inf 57.1%
+-commutative57.1%
associate--r+57.1%
div-sub57.1%
Simplified57.1%
expm1-log1p-u19.6%
expm1-udef19.6%
associate-/l*19.6%
sub-neg19.6%
metadata-eval19.6%
Applied egg-rr19.6%
expm1-def19.6%
expm1-log1p57.1%
associate-/r/57.1%
+-commutative57.1%
Simplified57.1%
if 1.0199999999999999e-239 < A < 7.2000000000000001e-140Initial program 40.9%
associate--l-40.9%
Simplified40.9%
Taylor expanded in C around inf 41.2%
Taylor expanded in B around inf 65.1%
if 7.2000000000000001e-140 < A Initial program 81.2%
associate--l-81.2%
Simplified81.2%
Taylor expanded in B around -inf 76.1%
associate--l+76.1%
div-sub77.3%
Simplified77.3%
Final simplification68.3%
(FPCore (A B C)
:precision binary64
(if (<= C -1.6e-83)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 2.9e-250)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= C 6.5e-208)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.6e-83) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 2.9e-250) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (C <= 6.5e-208) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.6e-83) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 2.9e-250) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (C <= 6.5e-208) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.6e-83: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 2.9e-250: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif C <= 6.5e-208: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.6e-83) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 2.9e-250) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (C <= 6.5e-208) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.6e-83) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 2.9e-250) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (C <= 6.5e-208) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.6e-83], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.9e-250], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.5e-208], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.6 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.9 \cdot 10^{-250}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.5 \cdot 10^{-208}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.6000000000000001e-83Initial program 80.9%
associate--l-80.9%
Simplified80.9%
Taylor expanded in C around -inf 70.5%
if -1.6000000000000001e-83 < C < 2.9000000000000002e-250Initial program 62.8%
associate--l-63.0%
Simplified63.0%
Taylor expanded in A around inf 38.7%
if 2.9000000000000002e-250 < C < 6.4999999999999998e-208Initial program 49.5%
associate--l-26.1%
Simplified26.1%
Taylor expanded in A around -inf 73.0%
associate-*r/73.0%
Simplified73.0%
if 6.4999999999999998e-208 < C Initial program 34.6%
associate--l-33.6%
Simplified33.6%
Taylor expanded in C around inf 31.4%
Taylor expanded in B around inf 56.3%
Final simplification57.2%
(FPCore (A B C)
:precision binary64
(if (<= B -3.8e-36)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -5.2e-262)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 1.2e-89)
(* 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 <= -3.8e-36) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -5.2e-262) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 1.2e-89) {
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 <= -3.8e-36) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -5.2e-262) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 1.2e-89) {
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 <= -3.8e-36: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -5.2e-262: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 1.2e-89: 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 <= -3.8e-36) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -5.2e-262) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 1.2e-89) 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 <= -3.8e-36) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -5.2e-262) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 1.2e-89) 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, -3.8e-36], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.2e-262], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.2e-89], 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 -3.8 \cdot 10^{-36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -5.2 \cdot 10^{-262}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-89}:\\
\;\;\;\;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 < -3.79999999999999971e-36Initial program 53.5%
associate--l-53.5%
Simplified53.5%
Taylor expanded in B around -inf 53.3%
if -3.79999999999999971e-36 < B < -5.1999999999999998e-262Initial program 63.8%
associate--l-63.8%
Simplified63.8%
+-commutative63.8%
add-sqr-sqrt63.8%
fma-def63.6%
unpow263.6%
unpow263.6%
hypot-def63.6%
unpow263.6%
unpow263.6%
hypot-def72.7%
Applied egg-rr72.7%
Taylor expanded in C around inf 47.3%
if -5.1999999999999998e-262 < B < 1.20000000000000008e-89Initial program 48.3%
associate--l-43.1%
Simplified43.1%
Taylor expanded in C around inf 37.9%
associate-*r/37.9%
distribute-rgt1-in37.9%
metadata-eval37.9%
mul0-lft37.9%
metadata-eval37.9%
Simplified37.9%
if 1.20000000000000008e-89 < B Initial program 57.0%
associate--l-57.0%
Simplified57.0%
Taylor expanded in B around inf 46.5%
Final simplification46.5%
(FPCore (A B C)
:precision binary64
(if (<= B -5.8e-208)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.3e-89)
(* 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.8e-208) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.3e-89) {
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.8e-208) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.3e-89) {
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.8e-208: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.3e-89: 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.8e-208) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.3e-89) 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.8e-208) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.3e-89) 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.8e-208], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e-89], 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.8 \cdot 10^{-208}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{-89}:\\
\;\;\;\;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.7999999999999999e-208Initial program 57.6%
associate--l-57.6%
Simplified57.6%
Taylor expanded in B around -inf 39.8%
if -5.7999999999999999e-208 < B < 1.2999999999999999e-89Initial program 50.1%
associate--l-45.6%
Simplified45.6%
Taylor expanded in C around inf 38.1%
associate-*r/38.1%
distribute-rgt1-in38.1%
metadata-eval38.1%
mul0-lft38.1%
metadata-eval38.1%
Simplified38.1%
if 1.2999999999999999e-89 < B Initial program 57.0%
associate--l-57.0%
Simplified57.0%
Taylor expanded in B around inf 46.5%
Final simplification41.3%
(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 56.7%
associate--l-55.2%
Simplified55.2%
Taylor expanded in B around -inf 35.2%
if -4.999999999999985e-310 < B Initial program 54.0%
associate--l-53.1%
Simplified53.1%
Taylor expanded in B around inf 33.8%
Final simplification34.5%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 55.4%
associate--l-54.2%
Simplified54.2%
Taylor expanded in B around inf 17.2%
Final simplification17.2%
herbie shell --seed 2024019
(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)))