
(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 20 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 (if (<= A -3.5e+58) (* 180.0 (/ (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- A))) PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e+58) {
tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e+58) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.5e+58: tmp = 180.0 * (math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.5e+58) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.5e+58) tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.5e+58], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.5 \cdot 10^{+58}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.4999999999999997e58Initial program 19.6%
Taylor expanded in A around -inf 75.2%
mul-1-neg75.2%
distribute-lft-out75.2%
associate-/l*75.5%
Simplified75.5%
if -3.4999999999999997e58 < A Initial program 64.2%
Simplified85.0%
Final simplification82.8%
(FPCore (A B C)
:precision binary64
(if (<= C -4.6e+137)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= C 1.05e+26)
(* (/ 180.0 PI) (atan (/ (+ A (hypot A B)) (- B))))
(/
(* 180.0 (atan (+ (/ 0.0 B) (* -0.5 (/ (+ B (/ (* A B) C)) C)))))
PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.6e+137) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (C <= 1.05e+26) {
tmp = (180.0 / ((double) M_PI)) * atan(((A + hypot(A, B)) / -B));
} else {
tmp = (180.0 * atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.6e+137) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (C <= 1.05e+26) {
tmp = (180.0 / Math.PI) * Math.atan(((A + Math.hypot(A, B)) / -B));
} else {
tmp = (180.0 * Math.atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.6e+137: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif C <= 1.05e+26: tmp = (180.0 / math.pi) * math.atan(((A + math.hypot(A, B)) / -B)) else: tmp = (180.0 * math.atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.6e+137) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (C <= 1.05e+26) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A + hypot(A, B)) / Float64(-B)))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 / B) + Float64(-0.5 * Float64(Float64(B + Float64(Float64(A * B) / C)) / C))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.6e+137) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (C <= 1.05e+26) tmp = (180.0 / pi) * atan(((A + hypot(A, B)) / -B)); else tmp = (180.0 * atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.6e+137], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.05e+26], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 / B), $MachinePrecision] + N[(-0.5 * N[(N[(B + N[(N[(A * B), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.6 \cdot 10^{+137}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.05 \cdot 10^{+26}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B} + -0.5 \cdot \frac{B + \frac{A \cdot B}{C}}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.59999999999999999e137Initial program 85.4%
Taylor expanded in B around -inf 93.6%
associate--l+93.6%
div-sub93.7%
Simplified93.7%
if -4.59999999999999999e137 < C < 1.05e26Initial program 56.5%
associate-*l/56.5%
*-lft-identity56.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-define81.1%
Simplified81.1%
clear-num81.1%
un-div-inv81.1%
hypot-undefine56.5%
unpow256.5%
unpow256.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-define81.1%
Applied egg-rr81.1%
Simplified73.7%
Taylor expanded in C around 0 52.7%
mul-1-neg52.7%
unpow252.7%
unpow252.7%
hypot-define77.4%
Simplified77.4%
if 1.05e26 < C Initial program 22.3%
associate-*l/22.3%
*-lft-identity22.3%
+-commutative22.3%
unpow222.3%
unpow222.3%
hypot-define52.9%
Simplified52.9%
*-commutative52.9%
associate-*l/52.9%
hypot-undefine22.3%
unpow222.3%
unpow222.3%
+-commutative22.3%
unpow222.3%
unpow222.3%
hypot-define52.9%
Applied egg-rr52.9%
Taylor expanded in C around inf 70.0%
associate-*r/70.0%
distribute-rgt1-in70.0%
metadata-eval70.0%
mul0-lft70.0%
metadata-eval70.0%
distribute-lft-out70.0%
associate-/l*70.7%
Simplified70.7%
Taylor expanded in C around inf 71.0%
Final simplification78.6%
(FPCore (A B C)
:precision binary64
(if (<= C -3.8e+137)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= C 1.05e+26)
(/ (* -180.0 (atan (/ (+ A (hypot B A)) B))) PI)
(/
(* 180.0 (atan (+ (/ 0.0 B) (* -0.5 (/ (+ B (/ (* A B) C)) C)))))
PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.8e+137) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (C <= 1.05e+26) {
tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -3.8e+137) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (C <= 1.05e+26) {
tmp = (-180.0 * Math.atan(((A + Math.hypot(B, A)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -3.8e+137: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif C <= 1.05e+26: tmp = (-180.0 * math.atan(((A + math.hypot(B, A)) / B))) / math.pi else: tmp = (180.0 * math.atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -3.8e+137) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (C <= 1.05e+26) tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(B, A)) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 / B) + Float64(-0.5 * Float64(Float64(B + Float64(Float64(A * B) / C)) / C))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -3.8e+137) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (C <= 1.05e+26) tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / pi; else tmp = (180.0 * atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -3.8e+137], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.05e+26], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 / B), $MachinePrecision] + N[(-0.5 * N[(N[(B + N[(N[(A * B), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.8 \cdot 10^{+137}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.05 \cdot 10^{+26}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B} + -0.5 \cdot \frac{B + \frac{A \cdot B}{C}}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.79999999999999963e137Initial program 85.4%
Taylor expanded in B around -inf 93.6%
associate--l+93.6%
div-sub93.7%
Simplified93.7%
if -3.79999999999999963e137 < C < 1.05e26Initial program 56.5%
associate-*l/56.5%
*-lft-identity56.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-define81.1%
Simplified81.1%
clear-num81.1%
un-div-inv81.1%
hypot-undefine56.5%
unpow256.5%
unpow256.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-define81.1%
Applied egg-rr81.1%
Simplified73.7%
Taylor expanded in C around 0 52.7%
mul-1-neg52.7%
unpow252.7%
unpow252.7%
hypot-define77.4%
Simplified77.4%
associate-*l/77.4%
distribute-frac-neg77.4%
atan-neg77.4%
Applied egg-rr77.4%
distribute-rgt-neg-out77.4%
distribute-lft-neg-in77.4%
metadata-eval77.4%
hypot-undefine52.7%
unpow252.7%
unpow252.7%
+-commutative52.7%
unpow252.7%
unpow252.7%
hypot-define77.4%
Simplified77.4%
if 1.05e26 < C Initial program 22.3%
associate-*l/22.3%
*-lft-identity22.3%
+-commutative22.3%
unpow222.3%
unpow222.3%
hypot-define52.9%
Simplified52.9%
*-commutative52.9%
associate-*l/52.9%
hypot-undefine22.3%
unpow222.3%
unpow222.3%
+-commutative22.3%
unpow222.3%
unpow222.3%
hypot-define52.9%
Applied egg-rr52.9%
Taylor expanded in C around inf 70.0%
associate-*r/70.0%
distribute-rgt1-in70.0%
metadata-eval70.0%
mul0-lft70.0%
metadata-eval70.0%
distribute-lft-out70.0%
associate-/l*70.7%
Simplified70.7%
Taylor expanded in C around inf 71.0%
Final simplification78.6%
(FPCore (A B C) :precision binary64 (if (<= C 9e+122) (/ (* (atan (/ (- (- C A) (hypot (- A C) B)) B)) 180.0) PI) (/ (* 180.0 (atan (+ (/ 0.0 B) (* -0.5 (/ (+ B (/ (* A B) C)) C))))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 9e+122) {
tmp = (atan((((C - A) - hypot((A - C), B)) / B)) * 180.0) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 9e+122) {
tmp = (Math.atan((((C - A) - Math.hypot((A - C), B)) / B)) * 180.0) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 9e+122: tmp = (math.atan((((C - A) - math.hypot((A - C), B)) / B)) * 180.0) / math.pi else: tmp = (180.0 * math.atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 9e+122) tmp = Float64(Float64(atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)) * 180.0) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 / B) + Float64(-0.5 * Float64(Float64(B + Float64(Float64(A * B) / C)) / C))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 9e+122) tmp = (atan((((C - A) - hypot((A - C), B)) / B)) * 180.0) / pi; else tmp = (180.0 * atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 9e+122], N[(N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 / B), $MachinePrecision] + N[(-0.5 * N[(N[(B + N[(N[(A * B), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 9 \cdot 10^{+122}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right) \cdot 180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B} + -0.5 \cdot \frac{B + \frac{A \cdot B}{C}}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 8.99999999999999995e122Initial program 59.3%
associate-*l/59.3%
*-lft-identity59.3%
+-commutative59.3%
unpow259.3%
unpow259.3%
hypot-define81.9%
Simplified81.9%
*-commutative81.9%
associate-*l/81.9%
hypot-undefine59.3%
unpow259.3%
unpow259.3%
+-commutative59.3%
unpow259.3%
unpow259.3%
hypot-define81.9%
Applied egg-rr81.9%
if 8.99999999999999995e122 < C Initial program 16.3%
associate-*l/16.3%
*-lft-identity16.3%
+-commutative16.3%
unpow216.3%
unpow216.3%
hypot-define51.5%
Simplified51.5%
*-commutative51.5%
associate-*l/51.5%
hypot-undefine16.3%
unpow216.3%
unpow216.3%
+-commutative16.3%
unpow216.3%
unpow216.3%
hypot-define51.5%
Applied egg-rr51.5%
Taylor expanded in C around inf 81.7%
associate-*r/81.7%
distribute-rgt1-in81.7%
metadata-eval81.7%
mul0-lft81.7%
metadata-eval81.7%
distribute-lft-out81.7%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in C around inf 83.4%
Final simplification82.1%
(FPCore (A B C) :precision binary64 (if (<= C 5.3e+116) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (/ (* 180.0 (atan (+ (/ 0.0 B) (* -0.5 (/ (+ B (/ (* A B) C)) C))))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 5.3e+116) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 5.3e+116) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 5.3e+116: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = (180.0 * math.atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 5.3e+116) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 / B) + Float64(-0.5 * Float64(Float64(B + Float64(Float64(A * B) / C)) / C))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 5.3e+116) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = (180.0 * atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 5.3e+116], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 / B), $MachinePrecision] + N[(-0.5 * N[(N[(B + N[(N[(A * B), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 5.3 \cdot 10^{+116}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B} + -0.5 \cdot \frac{B + \frac{A \cdot B}{C}}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 5.3000000000000002e116Initial program 59.3%
associate-*l/59.3%
*-lft-identity59.3%
+-commutative59.3%
unpow259.3%
unpow259.3%
hypot-define81.9%
Simplified81.9%
if 5.3000000000000002e116 < C Initial program 16.3%
associate-*l/16.3%
*-lft-identity16.3%
+-commutative16.3%
unpow216.3%
unpow216.3%
hypot-define51.5%
Simplified51.5%
*-commutative51.5%
associate-*l/51.5%
hypot-undefine16.3%
unpow216.3%
unpow216.3%
+-commutative16.3%
unpow216.3%
unpow216.3%
hypot-define51.5%
Applied egg-rr51.5%
Taylor expanded in C around inf 81.7%
associate-*r/81.7%
distribute-rgt1-in81.7%
metadata-eval81.7%
mul0-lft81.7%
metadata-eval81.7%
distribute-lft-out81.7%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in C around inf 83.4%
Final simplification82.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))))
(if (<= A -3.3e+41)
t_0
(if (<= A -2.55e-77)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A -1.45e-131)
t_0
(if (<= A -3.5e-250)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 3.5e-195)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= A 1.7e-127)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
double tmp;
if (A <= -3.3e+41) {
tmp = t_0;
} else if (A <= -2.55e-77) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= -1.45e-131) {
tmp = t_0;
} else if (A <= -3.5e-250) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 3.5e-195) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (A <= 1.7e-127) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
double tmp;
if (A <= -3.3e+41) {
tmp = t_0;
} else if (A <= -2.55e-77) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= -1.45e-131) {
tmp = t_0;
} else if (A <= -3.5e-250) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 3.5e-195) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (A <= 1.7e-127) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) tmp = 0 if A <= -3.3e+41: tmp = t_0 elif A <= -2.55e-77: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= -1.45e-131: tmp = t_0 elif A <= -3.5e-250: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 3.5e-195: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif A <= 1.7e-127: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)) tmp = 0.0 if (A <= -3.3e+41) tmp = t_0; elseif (A <= -2.55e-77) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= -1.45e-131) tmp = t_0; elseif (A <= -3.5e-250) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 3.5e-195) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (A <= 1.7e-127) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((0.5 * (B / A))) / pi); tmp = 0.0; if (A <= -3.3e+41) tmp = t_0; elseif (A <= -2.55e-77) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= -1.45e-131) tmp = t_0; elseif (A <= -3.5e-250) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 3.5e-195) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (A <= 1.7e-127) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.3e+41], t$95$0, If[LessEqual[A, -2.55e-77], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.45e-131], t$95$0, If[LessEqual[A, -3.5e-250], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.5e-195], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.7e-127], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -3.3 \cdot 10^{+41}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -2.55 \cdot 10^{-77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.45 \cdot 10^{-131}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -3.5 \cdot 10^{-250}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 3.5 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.7 \cdot 10^{-127}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.3e41 or -2.55000000000000016e-77 < A < -1.4500000000000001e-131Initial program 24.9%
Taylor expanded in A around -inf 67.4%
if -3.3e41 < A < -2.55000000000000016e-77Initial program 42.0%
Taylor expanded in C around inf 44.2%
Taylor expanded in A around inf 44.2%
if -1.4500000000000001e-131 < A < -3.4999999999999999e-250Initial program 48.4%
Taylor expanded in B around inf 46.4%
if -3.4999999999999999e-250 < A < 3.50000000000000014e-195Initial program 71.1%
Taylor expanded in C around -inf 43.9%
if 3.50000000000000014e-195 < A < 1.6999999999999999e-127Initial program 46.3%
Taylor expanded in B around -inf 46.6%
if 1.6999999999999999e-127 < A Initial program 77.0%
Taylor expanded in A around inf 58.5%
Final simplification56.1%
(FPCore (A B C)
:precision binary64
(if (<= B -2.2e-208)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B -1.6e-304)
(/ (* 180.0 (atan (+ (/ 0.0 B) (* -0.5 (/ (+ B (/ (* A B) C)) C))))) PI)
(if (<= B 4.8e-278)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 3.45e-90)
(* -180.0 (/ (atan (* -0.5 (/ (+ B (/ (* C B) A)) A))) PI))
(/ (* 180.0 (atan (+ (/ C B) (- -1.0 (/ A B))))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.2e-208) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= -1.6e-304) {
tmp = (180.0 * atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / ((double) M_PI);
} else if (B <= 4.8e-278) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 3.45e-90) {
tmp = -180.0 * (atan((-0.5 * ((B + ((C * B) / A)) / A))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.2e-208) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= -1.6e-304) {
tmp = (180.0 * Math.atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / Math.PI;
} else if (B <= 4.8e-278) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 3.45e-90) {
tmp = -180.0 * (Math.atan((-0.5 * ((B + ((C * B) / A)) / A))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((C / B) + (-1.0 - (A / B))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.2e-208: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= -1.6e-304: tmp = (180.0 * math.atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / math.pi elif B <= 4.8e-278: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 3.45e-90: tmp = -180.0 * (math.atan((-0.5 * ((B + ((C * B) / A)) / A))) / math.pi) else: tmp = (180.0 * math.atan(((C / B) + (-1.0 - (A / B))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.2e-208) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= -1.6e-304) tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 / B) + Float64(-0.5 * Float64(Float64(B + Float64(Float64(A * B) / C)) / C))))) / pi); elseif (B <= 4.8e-278) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 3.45e-90) tmp = Float64(-180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(B + Float64(Float64(C * B) / A)) / A))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.2e-208) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= -1.6e-304) tmp = (180.0 * atan(((0.0 / B) + (-0.5 * ((B + ((A * B) / C)) / C))))) / pi; elseif (B <= 4.8e-278) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 3.45e-90) tmp = -180.0 * (atan((-0.5 * ((B + ((C * B) / A)) / A))) / pi); else tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.2e-208], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.6e-304], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 / B), $MachinePrecision] + N[(-0.5 * N[(N[(B + N[(N[(A * B), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 4.8e-278], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.45e-90], N[(-180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(B + N[(N[(C * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.2 \cdot 10^{-208}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-304}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B} + -0.5 \cdot \frac{B + \frac{A \cdot B}{C}}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-278}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.45 \cdot 10^{-90}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B + \frac{C \cdot B}{A}}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.2e-208Initial program 56.3%
Taylor expanded in B around -inf 76.0%
associate--l+76.0%
div-sub76.0%
Simplified76.0%
if -2.2e-208 < B < -1.59999999999999999e-304Initial program 49.7%
associate-*l/49.7%
*-lft-identity49.7%
+-commutative49.7%
unpow249.7%
unpow249.7%
hypot-define77.5%
Simplified77.5%
*-commutative77.5%
associate-*l/77.5%
hypot-undefine49.7%
unpow249.7%
unpow249.7%
+-commutative49.7%
unpow249.7%
unpow249.7%
hypot-define77.5%
Applied egg-rr77.5%
Taylor expanded in C around inf 58.2%
associate-*r/58.2%
distribute-rgt1-in58.2%
metadata-eval58.2%
mul0-lft58.2%
metadata-eval58.2%
distribute-lft-out58.2%
associate-/l*58.5%
Simplified58.5%
Taylor expanded in C around inf 63.0%
if -1.59999999999999999e-304 < B < 4.8e-278Initial program 100.0%
Taylor expanded in A around inf 100.0%
if 4.8e-278 < B < 3.45000000000000012e-90Initial program 42.4%
Taylor expanded in A around -inf 66.0%
mul-1-neg66.0%
distribute-lft-out66.0%
associate-/l*66.0%
Simplified66.0%
clear-num62.3%
inv-pow62.3%
atan-neg62.3%
+-commutative62.3%
fma-define62.3%
Applied egg-rr62.3%
unpow-162.3%
distribute-frac-neg262.3%
distribute-neg-frac62.3%
associate-*r/62.3%
Simplified62.3%
Taylor expanded in B around 0 66.0%
if 3.45000000000000012e-90 < B Initial program 51.6%
associate-*l/51.6%
*-lft-identity51.6%
+-commutative51.6%
unpow251.6%
unpow251.6%
hypot-define70.4%
Simplified70.4%
*-commutative70.4%
associate-*l/70.4%
hypot-undefine51.6%
unpow251.6%
unpow251.6%
+-commutative51.6%
unpow251.6%
unpow251.6%
hypot-define70.4%
Applied egg-rr70.4%
Taylor expanded in B around inf 68.9%
Final simplification72.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))))
(if (<= B -1.3e-118)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.4e-210)
t_0
(if (<= B -3e-301)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 1.75e-271)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 1.06e-21) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
double tmp;
if (B <= -1.3e-118) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.4e-210) {
tmp = t_0;
} else if (B <= -3e-301) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 1.75e-271) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 1.06e-21) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
double tmp;
if (B <= -1.3e-118) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.4e-210) {
tmp = t_0;
} else if (B <= -3e-301) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 1.75e-271) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 1.06e-21) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) tmp = 0 if B <= -1.3e-118: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.4e-210: tmp = t_0 elif B <= -3e-301: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 1.75e-271: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 1.06e-21: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)) tmp = 0.0 if (B <= -1.3e-118) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.4e-210) tmp = t_0; elseif (B <= -3e-301) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 1.75e-271) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 1.06e-21) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((0.5 * (B / A))) / pi); tmp = 0.0; if (B <= -1.3e-118) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.4e-210) tmp = t_0; elseif (B <= -3e-301) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 1.75e-271) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 1.06e-21) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.3e-118], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.4e-210], t$95$0, If[LessEqual[B, -3e-301], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.75e-271], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.06e-21], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.3 \cdot 10^{-118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.4 \cdot 10^{-210}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -3 \cdot 10^{-301}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.75 \cdot 10^{-271}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.06 \cdot 10^{-21}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.3e-118Initial program 57.0%
Taylor expanded in B around -inf 52.1%
if -1.3e-118 < B < -3.39999999999999974e-210 or 1.75e-271 < B < 1.05999999999999994e-21Initial program 48.2%
Taylor expanded in A around -inf 51.1%
if -3.39999999999999974e-210 < B < -2.99999999999999999e-301Initial program 49.6%
Taylor expanded in C around inf 54.2%
Taylor expanded in A around inf 54.2%
if -2.99999999999999999e-301 < B < 1.75e-271Initial program 100.0%
Taylor expanded in A around inf 100.0%
if 1.05999999999999994e-21 < B Initial program 50.1%
Taylor expanded in B around inf 54.3%
Final simplification54.1%
(FPCore (A B C)
:precision binary64
(if (<= B 2e-276)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 2.75e-90)
(* -180.0 (/ (atan (* -0.5 (/ (+ B (/ (* C B) A)) A))) PI))
(/ (* 180.0 (atan (+ (/ C B) (- -1.0 (/ A B))))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 2e-276) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 2.75e-90) {
tmp = -180.0 * (atan((-0.5 * ((B + ((C * B) / A)) / A))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 2e-276) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 2.75e-90) {
tmp = -180.0 * (Math.atan((-0.5 * ((B + ((C * B) / A)) / A))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((C / B) + (-1.0 - (A / B))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 2e-276: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 2.75e-90: tmp = -180.0 * (math.atan((-0.5 * ((B + ((C * B) / A)) / A))) / math.pi) else: tmp = (180.0 * math.atan(((C / B) + (-1.0 - (A / B))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= 2e-276) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 2.75e-90) tmp = Float64(-180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(B + Float64(Float64(C * B) / A)) / A))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 2e-276) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 2.75e-90) tmp = -180.0 * (atan((-0.5 * ((B + ((C * B) / A)) / A))) / pi); else tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 2e-276], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.75e-90], N[(-180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(B + N[(N[(C * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2 \cdot 10^{-276}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.75 \cdot 10^{-90}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B + \frac{C \cdot B}{A}}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < 2e-276Initial program 57.8%
Taylor expanded in B around -inf 70.4%
associate--l+70.4%
div-sub71.1%
Simplified71.1%
if 2e-276 < B < 2.75000000000000015e-90Initial program 42.4%
Taylor expanded in A around -inf 66.0%
mul-1-neg66.0%
distribute-lft-out66.0%
associate-/l*66.0%
Simplified66.0%
clear-num62.3%
inv-pow62.3%
atan-neg62.3%
+-commutative62.3%
fma-define62.3%
Applied egg-rr62.3%
unpow-162.3%
distribute-frac-neg262.3%
distribute-neg-frac62.3%
associate-*r/62.3%
Simplified62.3%
Taylor expanded in B around 0 66.0%
if 2.75000000000000015e-90 < B Initial program 51.6%
associate-*l/51.6%
*-lft-identity51.6%
+-commutative51.6%
unpow251.6%
unpow251.6%
hypot-define70.4%
Simplified70.4%
*-commutative70.4%
associate-*l/70.4%
hypot-undefine51.6%
unpow251.6%
unpow251.6%
+-commutative51.6%
unpow251.6%
unpow251.6%
hypot-define70.4%
Applied egg-rr70.4%
Taylor expanded in B around inf 68.9%
Final simplification69.7%
(FPCore (A B C)
:precision binary64
(if (<= B 3.1e-273)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 9.2e-123)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 3.1e-273) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 9.2e-123) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 3.1e-273) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 9.2e-123) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3.1e-273: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 9.2e-123: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 3.1e-273) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 9.2e-123) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 3.1e-273) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 9.2e-123) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3.1e-273], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.2e-123], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3.1 \cdot 10^{-273}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9.2 \cdot 10^{-123}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < 3.09999999999999988e-273Initial program 57.8%
Taylor expanded in B around -inf 70.4%
associate--l+70.4%
div-sub71.1%
Simplified71.1%
if 3.09999999999999988e-273 < B < 9.19999999999999947e-123Initial program 37.8%
associate-*l/37.8%
*-lft-identity37.8%
+-commutative37.8%
unpow237.8%
unpow237.8%
hypot-define69.0%
Simplified69.0%
*-commutative69.0%
associate-*l/69.0%
hypot-undefine37.8%
unpow237.8%
unpow237.8%
+-commutative37.8%
unpow237.8%
unpow237.8%
hypot-define69.0%
Applied egg-rr69.0%
Taylor expanded in A around -inf 65.8%
if 9.19999999999999947e-123 < B Initial program 52.2%
Taylor expanded in B around inf 67.4%
Final simplification69.2%
(FPCore (A B C)
:precision binary64
(if (<= B 7.5e-272)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 1.6e-122)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(/ (* 180.0 (atan (+ (/ C B) (- -1.0 (/ A B))))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 7.5e-272) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 1.6e-122) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 7.5e-272) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 1.6e-122) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((C / B) + (-1.0 - (A / B))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 7.5e-272: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 1.6e-122: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = (180.0 * math.atan(((C / B) + (-1.0 - (A / B))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= 7.5e-272) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 1.6e-122) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 7.5e-272) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 1.6e-122) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 7.5e-272], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.6e-122], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 7.5 \cdot 10^{-272}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.6 \cdot 10^{-122}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < 7.50000000000000005e-272Initial program 57.8%
Taylor expanded in B around -inf 70.4%
associate--l+70.4%
div-sub71.1%
Simplified71.1%
if 7.50000000000000005e-272 < B < 1.6000000000000001e-122Initial program 37.8%
associate-*l/37.8%
*-lft-identity37.8%
+-commutative37.8%
unpow237.8%
unpow237.8%
hypot-define69.0%
Simplified69.0%
*-commutative69.0%
associate-*l/69.0%
hypot-undefine37.8%
unpow237.8%
unpow237.8%
+-commutative37.8%
unpow237.8%
unpow237.8%
hypot-define69.0%
Applied egg-rr69.0%
Taylor expanded in A around -inf 65.8%
if 1.6000000000000001e-122 < B Initial program 52.2%
associate-*l/52.2%
*-lft-identity52.2%
+-commutative52.2%
unpow252.2%
unpow252.2%
hypot-define71.2%
Simplified71.2%
*-commutative71.2%
associate-*l/71.3%
hypot-undefine52.2%
unpow252.2%
unpow252.2%
+-commutative52.2%
unpow252.2%
unpow252.2%
hypot-define71.3%
Applied egg-rr71.3%
Taylor expanded in B around inf 67.4%
Final simplification69.2%
(FPCore (A B C)
:precision binary64
(if (<= B -23.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.5e-274)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 2.1e-124)
(/ (* 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 <= -23.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.5e-274) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 2.1e-124) {
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 <= -23.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.5e-274) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 2.1e-124) {
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 <= -23.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.5e-274: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 2.1e-124: 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 <= -23.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.5e-274) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 2.1e-124) tmp = Float64(Float64(180.0 * 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 <= -23.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.5e-274) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 2.1e-124) 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, -23.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.5e-274], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.1e-124], N[(N[(180.0 * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -23:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{-274}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-124}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -23Initial program 49.5%
Taylor expanded in B around -inf 59.7%
if -23 < B < 3.49999999999999982e-274Initial program 65.9%
Taylor expanded in A around inf 40.7%
if 3.49999999999999982e-274 < B < 2.1000000000000001e-124Initial program 39.0%
associate-*l/39.0%
*-lft-identity39.0%
+-commutative39.0%
unpow239.0%
unpow239.0%
hypot-define71.4%
Simplified71.4%
*-commutative71.4%
associate-*l/71.4%
hypot-undefine39.0%
unpow239.0%
unpow239.0%
+-commutative39.0%
unpow239.0%
unpow239.0%
hypot-define71.4%
Applied egg-rr71.4%
Taylor expanded in C around inf 43.7%
distribute-rgt1-in43.7%
metadata-eval43.7%
mul0-lft43.7%
metadata-eval43.7%
Simplified43.7%
if 2.1000000000000001e-124 < B Initial program 51.6%
Taylor expanded in B around inf 46.8%
Final simplification48.2%
(FPCore (A B C)
:precision binary64
(if (<= C -1.22e+123)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= C 60000.0)
(* (/ 180.0 PI) (atan (- 1.0 (/ A B))))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.22e+123) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (C <= 60000.0) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - (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 <= -1.22e+123) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (C <= 60000.0) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - (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 <= -1.22e+123: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif C <= 60000.0: tmp = (180.0 / math.pi) * math.atan((1.0 - (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 <= -1.22e+123) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (C <= 60000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(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 <= -1.22e+123) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (C <= 60000.0) tmp = (180.0 / pi) * atan((1.0 - (A / B))); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.22e+123], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 60000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(A / 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.22 \cdot 10^{+123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;C \leq 60000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{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.22e123Initial program 83.0%
Taylor expanded in C around -inf 79.0%
if -1.22e123 < C < 6e4Initial program 58.0%
associate-*l/58.0%
*-lft-identity58.0%
+-commutative58.0%
unpow258.0%
unpow258.0%
hypot-define81.0%
Simplified81.0%
clear-num81.0%
un-div-inv81.0%
hypot-undefine58.0%
unpow258.0%
unpow258.0%
+-commutative58.0%
unpow258.0%
unpow258.0%
hypot-define81.0%
Applied egg-rr81.0%
Simplified73.7%
Taylor expanded in C around 0 54.0%
mul-1-neg54.0%
unpow254.0%
unpow254.0%
hypot-define77.2%
Simplified77.2%
Taylor expanded in B around -inf 47.7%
mul-1-neg47.7%
sub-neg47.7%
Simplified47.7%
if 6e4 < C Initial program 22.5%
Taylor expanded in C around inf 63.4%
Taylor expanded in A around inf 63.4%
Final simplification57.0%
(FPCore (A B C)
:precision binary64
(if (<= A -1.5e+80)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 4.4e-84)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(* (/ 180.0 PI) (atan (- 1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+80) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 4.4e-84) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+80) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 4.4e-84) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e+80: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 4.4e-84: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi else: tmp = (180.0 / math.pi) * math.atan((1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e+80) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 4.4e-84) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e+80) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 4.4e-84) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e+80], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.4e-84], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.4 \cdot 10^{-84}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -1.49999999999999993e80Initial program 17.1%
Taylor expanded in A around -inf 75.0%
if -1.49999999999999993e80 < A < 4.3999999999999998e-84Initial program 56.2%
associate-*l/56.2%
*-lft-identity56.2%
+-commutative56.2%
unpow256.2%
unpow256.2%
hypot-define76.5%
Simplified76.5%
*-commutative76.5%
associate-*l/76.5%
hypot-undefine56.2%
unpow256.2%
unpow256.2%
+-commutative56.2%
unpow256.2%
unpow256.2%
hypot-define76.5%
Applied egg-rr76.5%
Taylor expanded in B around -inf 50.0%
associate--l+50.0%
div-sub50.0%
Simplified50.0%
Taylor expanded in C around inf 48.2%
if 4.3999999999999998e-84 < A Initial program 76.1%
associate-*l/76.1%
*-lft-identity76.1%
+-commutative76.1%
unpow276.1%
unpow276.1%
hypot-define97.6%
Simplified97.6%
clear-num97.6%
un-div-inv97.6%
hypot-undefine76.1%
unpow276.1%
unpow276.1%
+-commutative76.1%
unpow276.1%
unpow276.1%
hypot-define97.6%
Applied egg-rr97.6%
Simplified97.6%
Taylor expanded in C around 0 73.8%
mul-1-neg73.8%
unpow273.8%
unpow273.8%
hypot-define90.5%
Simplified90.5%
Taylor expanded in B around -inf 75.9%
mul-1-neg75.9%
sub-neg75.9%
Simplified75.9%
Final simplification62.6%
(FPCore (A B C)
:precision binary64
(if (<= A -1.3e+76)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 6.2e-83)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(/ (* 180.0 (atan (- 1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.3e+76) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 6.2e-83) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.3e+76) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 6.2e-83) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.3e+76: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 6.2e-83: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi else: tmp = (180.0 * math.atan((1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.3e+76) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 6.2e-83) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.3e+76) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 6.2e-83) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; else tmp = (180.0 * atan((1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.3e+76], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.2e-83], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.3 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.2 \cdot 10^{-83}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.3e76Initial program 17.1%
Taylor expanded in A around -inf 75.0%
if -1.3e76 < A < 6.19999999999999985e-83Initial program 56.2%
associate-*l/56.2%
*-lft-identity56.2%
+-commutative56.2%
unpow256.2%
unpow256.2%
hypot-define76.5%
Simplified76.5%
*-commutative76.5%
associate-*l/76.5%
hypot-undefine56.2%
unpow256.2%
unpow256.2%
+-commutative56.2%
unpow256.2%
unpow256.2%
hypot-define76.5%
Applied egg-rr76.5%
Taylor expanded in B around -inf 50.0%
associate--l+50.0%
div-sub50.0%
Simplified50.0%
Taylor expanded in C around inf 48.2%
if 6.19999999999999985e-83 < A Initial program 76.1%
associate-*l/76.1%
*-lft-identity76.1%
+-commutative76.1%
unpow276.1%
unpow276.1%
hypot-define97.6%
Simplified97.6%
*-commutative97.6%
associate-*l/97.6%
hypot-undefine76.1%
unpow276.1%
unpow276.1%
+-commutative76.1%
unpow276.1%
unpow276.1%
hypot-define97.6%
Applied egg-rr97.6%
Taylor expanded in B around -inf 76.6%
associate--l+76.6%
div-sub78.0%
Simplified78.0%
Taylor expanded in C around 0 75.9%
associate-*r/75.9%
mul-1-neg75.9%
Simplified75.9%
Final simplification62.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.32e-123)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.45e-124)
(/ (* 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 <= -1.32e-123) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.45e-124) {
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 <= -1.32e-123) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.45e-124) {
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 <= -1.32e-123: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.45e-124: 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 <= -1.32e-123) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.45e-124) tmp = Float64(Float64(180.0 * 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 <= -1.32e-123) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.45e-124) 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, -1.32e-123], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.45e-124], N[(N[(180.0 * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.32 \cdot 10^{-123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.45 \cdot 10^{-124}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.31999999999999994e-123Initial program 56.5%
Taylor expanded in B around -inf 51.6%
if -1.31999999999999994e-123 < B < 3.45e-124Initial program 52.3%
associate-*l/52.3%
*-lft-identity52.3%
+-commutative52.3%
unpow252.3%
unpow252.3%
hypot-define79.3%
Simplified79.3%
*-commutative79.3%
associate-*l/79.3%
hypot-undefine52.3%
unpow252.3%
unpow252.3%
+-commutative52.3%
unpow252.3%
unpow252.3%
hypot-define79.3%
Applied egg-rr79.3%
Taylor expanded in C around inf 36.9%
distribute-rgt1-in36.9%
metadata-eval36.9%
mul0-lft36.9%
metadata-eval36.9%
Simplified36.9%
if 3.45e-124 < B Initial program 51.6%
Taylor expanded in B around inf 46.8%
Final simplification45.7%
(FPCore (A B C) :precision binary64 (if (<= A -3.7e+77) (* 180.0 (/ (atan (* 0.5 (/ B A))) PI)) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.7e+77) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((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 <= -3.7e+77) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / 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 <= -3.7e+77: tmp = 180.0 * (math.atan((0.5 * (B / A))) / 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 <= -3.7e+77) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / 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 <= -3.7e+77) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.7e+77], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $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 -3.7 \cdot 10^{+77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.69999999999999995e77Initial program 17.1%
Taylor expanded in A around -inf 75.0%
if -3.69999999999999995e77 < A Initial program 64.0%
Taylor expanded in B around -inf 60.4%
associate--l+60.4%
div-sub61.0%
Simplified61.0%
Final simplification64.1%
(FPCore (A B C) :precision binary64 (if (<= A -1.1e+78) (* 180.0 (/ (atan (* 0.5 (/ B A))) PI)) (/ (* 180.0 (atan (+ 1.0 (/ (- C A) B)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.1e+78) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((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 <= -1.1e+78) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / 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 <= -1.1e+78: tmp = 180.0 * (math.atan((0.5 * (B / A))) / 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 <= -1.1e+78) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(Float64(180.0 * 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 <= -1.1e+78) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = (180.0 * atan((1.0 + ((C - A) / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.1e+78], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.1 \cdot 10^{+78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.10000000000000007e78Initial program 17.1%
Taylor expanded in A around -inf 75.0%
if -1.10000000000000007e78 < A Initial program 64.0%
associate-*l/64.0%
*-lft-identity64.0%
+-commutative64.0%
unpow264.0%
unpow264.0%
hypot-define84.7%
Simplified84.7%
*-commutative84.7%
associate-*l/84.8%
hypot-undefine64.0%
unpow264.0%
unpow264.0%
+-commutative64.0%
unpow264.0%
unpow264.0%
hypot-define84.8%
Applied egg-rr84.8%
Taylor expanded in B around -inf 60.4%
associate--l+60.4%
div-sub61.0%
Simplified61.0%
Final simplification64.1%
(FPCore (A B C) :precision binary64 (if (<= B -1e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.999999999999969e-311Initial program 55.9%
Taylor expanded in B around -inf 39.3%
if -9.999999999999969e-311 < B Initial program 51.1%
Taylor expanded in B around inf 36.8%
Final simplification38.1%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 53.6%
Taylor expanded in B around inf 19.0%
Final simplification19.0%
herbie shell --seed 2024055
(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)))