
(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 24 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 -1.45e+190) (* (atan (/ (* B 0.5) A)) (/ 180.0 PI)) (/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.45e+190) {
tmp = atan(((B * 0.5) / A)) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.45e+190) {
tmp = Math.atan(((B * 0.5) / A)) * (180.0 / Math.PI);
} else {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.45e+190: tmp = math.atan(((B * 0.5) / A)) * (180.0 / math.pi) else: tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.45e+190) tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.45e+190) tmp = atan(((B * 0.5) / A)) * (180.0 / pi); else tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.45e+190], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.45 \cdot 10^{+190}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.44999999999999995e190Initial program 5.6%
Taylor expanded in A around -inf 91.5%
associate-*r/91.5%
Simplified91.5%
Taylor expanded in B around 0 91.5%
associate-*r/91.5%
*-commutative91.5%
associate-/l*91.7%
associate-*r/91.7%
*-commutative91.7%
Simplified91.7%
if -1.44999999999999995e190 < A Initial program 56.5%
associate-*r/56.5%
associate-*l/56.5%
*-un-lft-identity56.5%
unpow256.5%
unpow256.5%
hypot-define80.5%
Applied egg-rr80.5%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(if (<= C -1.4e-147)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(if (<= C 2.8e+58)
(* 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 <= -1.4e-147) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else if (C <= 2.8e+58) {
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 <= -1.4e-147) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else if (C <= 2.8e+58) {
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 <= -1.4e-147: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) elif C <= 2.8e+58: 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 <= -1.4e-147) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); elseif (C <= 2.8e+58) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-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 <= -1.4e-147) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); elseif (C <= 2.8e+58) 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, -1.4e-147], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.8e+58], 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 -1.4 \cdot 10^{-147}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{elif}\;C \leq 2.8 \cdot 10^{+58}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \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 < -1.4e-147Initial program 67.4%
Taylor expanded in B around 0 67.4%
Simplified88.0%
Taylor expanded in A around 0 67.4%
unpow267.4%
unpow267.4%
hypot-define86.2%
Simplified86.2%
if -1.4e-147 < C < 2.7999999999999998e58Initial program 51.3%
Taylor expanded in C around 0 50.3%
mul-1-neg50.3%
distribute-neg-frac250.3%
+-commutative50.3%
unpow250.3%
unpow250.3%
hypot-define74.9%
Simplified74.9%
if 2.7999999999999998e58 < C Initial program 16.9%
associate-*r/16.9%
associate-*l/16.9%
*-un-lft-identity16.9%
unpow216.9%
unpow216.9%
hypot-define51.2%
Applied egg-rr51.2%
Taylor expanded in C around inf 76.9%
Taylor expanded in A around inf 76.9%
Final simplification79.1%
(FPCore (A B C)
:precision binary64
(if (<= C -5e-147)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(if (<= C 3.7e+59)
(* (/ 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 <= -5e-147) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else if (C <= 3.7e+59) {
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 <= -5e-147) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else if (C <= 3.7e+59) {
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 <= -5e-147: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) elif C <= 3.7e+59: 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 <= -5e-147) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); elseif (C <= 3.7e+59) tmp = Float64(Float64(180.0 / 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 <= -5e-147) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); elseif (C <= 3.7e+59) 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, -5e-147], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.7e+59], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $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 -5 \cdot 10^{-147}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{elif}\;C \leq 3.7 \cdot 10^{+59}:\\
\;\;\;\;\frac{180}{\pi} \cdot \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 < -5.00000000000000013e-147Initial program 67.4%
Taylor expanded in B around 0 67.4%
Simplified88.0%
Taylor expanded in A around 0 67.4%
unpow267.4%
unpow267.4%
hypot-define86.2%
Simplified86.2%
if -5.00000000000000013e-147 < C < 3.69999999999999997e59Initial program 51.3%
Taylor expanded in B around 0 49.6%
Simplified69.0%
Taylor expanded in C around 0 50.3%
distribute-lft-in50.3%
mul-1-neg50.3%
unsub-neg50.3%
mul-1-neg50.3%
unpow250.3%
unpow250.3%
hypot-define74.9%
Simplified74.9%
if 3.69999999999999997e59 < C Initial program 16.9%
associate-*r/16.9%
associate-*l/16.9%
*-un-lft-identity16.9%
unpow216.9%
unpow216.9%
hypot-define51.2%
Applied egg-rr51.2%
Taylor expanded in C around inf 76.9%
Taylor expanded in A around inf 76.9%
Final simplification79.1%
(FPCore (A B C)
:precision binary64
(if (<= C -2.9e-147)
(/ (* 180.0 (atan (- (/ C B) (/ (hypot B C) B)))) PI)
(if (<= C 1e+55)
(* (/ 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 <= -2.9e-147) {
tmp = (180.0 * atan(((C / B) - (hypot(B, C) / B)))) / ((double) M_PI);
} else if (C <= 1e+55) {
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 <= -2.9e-147) {
tmp = (180.0 * Math.atan(((C / B) - (Math.hypot(B, C) / B)))) / Math.PI;
} else if (C <= 1e+55) {
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 <= -2.9e-147: tmp = (180.0 * math.atan(((C / B) - (math.hypot(B, C) / B)))) / math.pi elif C <= 1e+55: 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 <= -2.9e-147) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) - Float64(hypot(B, C) / B)))) / pi); elseif (C <= 1e+55) tmp = Float64(Float64(180.0 / 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 <= -2.9e-147) tmp = (180.0 * atan(((C / B) - (hypot(B, C) / B)))) / pi; elseif (C <= 1e+55) 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, -2.9e-147], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] - N[(N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 1e+55], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $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 -2.9 \cdot 10^{-147}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - \frac{\mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 10^{+55}:\\
\;\;\;\;\frac{180}{\pi} \cdot \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 < -2.9000000000000001e-147Initial program 67.4%
associate-*r/67.4%
associate-*l/67.4%
*-un-lft-identity67.4%
unpow267.4%
unpow267.4%
hypot-define91.2%
Applied egg-rr91.2%
div-sub87.8%
Applied egg-rr87.8%
Taylor expanded in A around 0 67.4%
associate-*l/67.4%
*-lft-identity67.4%
unpow267.4%
unpow267.4%
hypot-define86.2%
Simplified86.2%
if -2.9000000000000001e-147 < C < 1.00000000000000001e55Initial program 51.3%
Taylor expanded in B around 0 49.6%
Simplified69.0%
Taylor expanded in C around 0 50.3%
distribute-lft-in50.3%
mul-1-neg50.3%
unsub-neg50.3%
mul-1-neg50.3%
unpow250.3%
unpow250.3%
hypot-define74.9%
Simplified74.9%
if 1.00000000000000001e55 < C Initial program 16.9%
associate-*r/16.9%
associate-*l/16.9%
*-un-lft-identity16.9%
unpow216.9%
unpow216.9%
hypot-define51.2%
Applied egg-rr51.2%
Taylor expanded in C around inf 76.9%
Taylor expanded in A around inf 76.9%
Final simplification79.1%
(FPCore (A B C)
:precision binary64
(if (<= A -8e+188)
(* (atan (/ (* B 0.5) A)) (/ 180.0 PI))
(if (<= A 1.05e+73)
(* 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 <= -8e+188) {
tmp = atan(((B * 0.5) / A)) * (180.0 / ((double) M_PI));
} else if (A <= 1.05e+73) {
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 <= -8e+188) {
tmp = Math.atan(((B * 0.5) / A)) * (180.0 / Math.PI);
} else if (A <= 1.05e+73) {
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 <= -8e+188: tmp = math.atan(((B * 0.5) / A)) * (180.0 / math.pi) elif A <= 1.05e+73: 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 <= -8e+188) tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) * Float64(180.0 / pi)); elseif (A <= 1.05e+73) 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 <= -8e+188) tmp = atan(((B * 0.5) / A)) * (180.0 / pi); elseif (A <= 1.05e+73) 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, -8e+188], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.05e+73], 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 -8 \cdot 10^{+188}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 1.05 \cdot 10^{+73}:\\
\;\;\;\;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 < -8.0000000000000002e188Initial program 5.6%
Taylor expanded in A around -inf 91.5%
associate-*r/91.5%
Simplified91.5%
Taylor expanded in B around 0 91.5%
associate-*r/91.5%
*-commutative91.5%
associate-/l*91.7%
associate-*r/91.7%
*-commutative91.7%
Simplified91.7%
if -8.0000000000000002e188 < A < 1.0500000000000001e73Initial program 52.6%
Taylor expanded in A around 0 47.5%
unpow247.5%
unpow247.5%
hypot-define72.2%
Simplified72.2%
if 1.0500000000000001e73 < A Initial program 71.8%
Taylor expanded in B around -inf 79.4%
associate--l+79.4%
div-sub81.7%
Simplified81.7%
Final simplification76.3%
(FPCore (A B C)
:precision binary64
(if (<= A -8e+188)
(* (atan (/ (* B 0.5) A)) (/ 180.0 PI))
(if (<= A 1.22e+73)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8e+188) {
tmp = atan(((B * 0.5) / A)) * (180.0 / ((double) M_PI));
} else if (A <= 1.22e+73) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} 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 <= -8e+188) {
tmp = Math.atan(((B * 0.5) / A)) * (180.0 / Math.PI);
} else if (A <= 1.22e+73) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8e+188: tmp = math.atan(((B * 0.5) / A)) * (180.0 / math.pi) elif A <= 1.22e+73: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) 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 <= -8e+188) tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) * Float64(180.0 / pi)); elseif (A <= 1.22e+73) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); 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 <= -8e+188) tmp = atan(((B * 0.5) / A)) * (180.0 / pi); elseif (A <= 1.22e+73) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8e+188], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.22e+73], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $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 -8 \cdot 10^{+188}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 1.22 \cdot 10^{+73}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.0000000000000002e188Initial program 5.6%
Taylor expanded in A around -inf 91.5%
associate-*r/91.5%
Simplified91.5%
Taylor expanded in B around 0 91.5%
associate-*r/91.5%
*-commutative91.5%
associate-/l*91.7%
associate-*r/91.7%
*-commutative91.7%
Simplified91.7%
if -8.0000000000000002e188 < A < 1.21999999999999998e73Initial program 52.6%
Taylor expanded in B around 0 51.5%
Simplified74.8%
Taylor expanded in A around 0 47.5%
unpow247.5%
unpow247.5%
hypot-define72.2%
Simplified72.2%
if 1.21999999999999998e73 < A Initial program 71.8%
Taylor expanded in B around -inf 79.4%
associate--l+79.4%
div-sub81.7%
Simplified81.7%
Final simplification76.3%
(FPCore (A B C) :precision binary64 (if (<= A -4.9e+128) (* (atan (/ (* B 0.5) A)) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.9e+128) {
tmp = atan(((B * 0.5) / A)) * (180.0 / ((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 <= -4.9e+128) {
tmp = Math.atan(((B * 0.5) / A)) * (180.0 / 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 <= -4.9e+128: tmp = math.atan(((B * 0.5) / A)) * (180.0 / 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 <= -4.9e+128) tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) * Float64(180.0 / 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 <= -4.9e+128) tmp = atan(((B * 0.5) / A)) * (180.0 / 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, -4.9e+128], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / 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 -4.9 \cdot 10^{+128}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\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 < -4.90000000000000018e128Initial program 11.2%
Taylor expanded in A around -inf 81.3%
associate-*r/81.3%
Simplified81.3%
Taylor expanded in B around 0 81.3%
associate-*r/81.3%
*-commutative81.3%
associate-/l*81.5%
associate-*r/81.5%
*-commutative81.5%
Simplified81.5%
if -4.90000000000000018e128 < A Initial program 58.7%
Simplified80.5%
Final simplification80.7%
(FPCore (A B C) :precision binary64 (if (<= A -4.3e+190) (* (atan (/ (* B 0.5) A)) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.3e+190) {
tmp = atan(((B * 0.5) / A)) * (180.0 / ((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 <= -4.3e+190) {
tmp = Math.atan(((B * 0.5) / A)) * (180.0 / 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 <= -4.3e+190: tmp = math.atan(((B * 0.5) / A)) * (180.0 / 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 <= -4.3e+190) tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.3e+190) tmp = atan(((B * 0.5) / A)) * (180.0 / 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, -4.3e+190], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.3 \cdot 10^{+190}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.3000000000000001e190Initial program 5.6%
Taylor expanded in A around -inf 91.5%
associate-*r/91.5%
Simplified91.5%
Taylor expanded in B around 0 91.5%
associate-*r/91.5%
*-commutative91.5%
associate-/l*91.7%
associate-*r/91.7%
*-commutative91.7%
Simplified91.7%
if -4.3000000000000001e190 < A Initial program 56.5%
associate-*l/56.5%
*-lft-identity56.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-define80.5%
Simplified80.5%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))
(t_1 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -1.26e+63)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2e-33)
t_0
(if (<= B -1.6e-104)
t_1
(if (<= B -2.05e-290)
t_0
(if (<= B 4.1e-258)
t_1
(if (<= B 1.85e-235)
t_0
(if (<= B 1.75e-188)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 8e-37) 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 / C))) / ((double) M_PI));
double t_1 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -1.26e+63) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2e-33) {
tmp = t_0;
} else if (B <= -1.6e-104) {
tmp = t_1;
} else if (B <= -2.05e-290) {
tmp = t_0;
} else if (B <= 4.1e-258) {
tmp = t_1;
} else if (B <= 1.85e-235) {
tmp = t_0;
} else if (B <= 1.75e-188) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 8e-37) {
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 / C))) / Math.PI);
double t_1 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -1.26e+63) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2e-33) {
tmp = t_0;
} else if (B <= -1.6e-104) {
tmp = t_1;
} else if (B <= -2.05e-290) {
tmp = t_0;
} else if (B <= 4.1e-258) {
tmp = t_1;
} else if (B <= 1.85e-235) {
tmp = t_0;
} else if (B <= 1.75e-188) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 8e-37) {
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 / C))) / math.pi) t_1 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -1.26e+63: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2e-33: tmp = t_0 elif B <= -1.6e-104: tmp = t_1 elif B <= -2.05e-290: tmp = t_0 elif B <= 4.1e-258: tmp = t_1 elif B <= 1.85e-235: tmp = t_0 elif B <= 1.75e-188: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 8e-37: 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 / C))) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -1.26e+63) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2e-33) tmp = t_0; elseif (B <= -1.6e-104) tmp = t_1; elseif (B <= -2.05e-290) tmp = t_0; elseif (B <= 4.1e-258) tmp = t_1; elseif (B <= 1.85e-235) tmp = t_0; elseif (B <= 1.75e-188) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 8e-37) 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 / C))) / pi); t_1 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -1.26e+63) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2e-33) tmp = t_0; elseif (B <= -1.6e-104) tmp = t_1; elseif (B <= -2.05e-290) tmp = t_0; elseif (B <= 4.1e-258) tmp = t_1; elseif (B <= 1.85e-235) tmp = t_0; elseif (B <= 1.75e-188) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 8e-37) 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 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.26e+63], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2e-33], t$95$0, If[LessEqual[B, -1.6e-104], t$95$1, If[LessEqual[B, -2.05e-290], t$95$0, If[LessEqual[B, 4.1e-258], t$95$1, If[LessEqual[B, 1.85e-235], t$95$0, If[LessEqual[B, 1.75e-188], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8e-37], 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}{C}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.26 \cdot 10^{+63}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2 \cdot 10^{-33}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -2.05 \cdot 10^{-290}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 4.1 \cdot 10^{-258}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 1.85 \cdot 10^{-235}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.75 \cdot 10^{-188}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 8 \cdot 10^{-37}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.26e63Initial program 38.9%
Taylor expanded in B around -inf 76.8%
if -1.26e63 < B < -2.0000000000000001e-33 or -1.59999999999999994e-104 < B < -2.0500000000000001e-290 or 4.1000000000000001e-258 < B < 1.8500000000000001e-235 or 1.75e-188 < B < 8.00000000000000053e-37Initial program 44.8%
associate-*r/44.8%
associate-*l/44.8%
*-un-lft-identity44.8%
unpow244.8%
unpow244.8%
hypot-define63.0%
Applied egg-rr63.0%
Taylor expanded in C around inf 44.2%
Taylor expanded in A around inf 44.2%
if -2.0000000000000001e-33 < B < -1.59999999999999994e-104 or -2.0500000000000001e-290 < B < 4.1000000000000001e-258Initial program 78.7%
Taylor expanded in B around inf 63.5%
Taylor expanded in C around inf 60.5%
if 1.8500000000000001e-235 < B < 1.75e-188Initial program 62.7%
Taylor expanded in A around inf 51.2%
if 8.00000000000000053e-37 < B Initial program 52.3%
Taylor expanded in B around inf 64.9%
Final simplification58.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
(if (<= B -1.46e+63)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.6e-33)
t_0
(if (<= B -3.7e-103)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= B -7.4e-292)
t_0
(if (<= B 4.3e-259)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 9.2e-236)
t_0
(if (<= B 6.9e-187)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 1.4e-33) 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 / C))) / ((double) M_PI));
double tmp;
if (B <= -1.46e+63) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.6e-33) {
tmp = t_0;
} else if (B <= -3.7e-103) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (B <= -7.4e-292) {
tmp = t_0;
} else if (B <= 4.3e-259) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 9.2e-236) {
tmp = t_0;
} else if (B <= 6.9e-187) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 1.4e-33) {
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 / C))) / Math.PI);
double tmp;
if (B <= -1.46e+63) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.6e-33) {
tmp = t_0;
} else if (B <= -3.7e-103) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (B <= -7.4e-292) {
tmp = t_0;
} else if (B <= 4.3e-259) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 9.2e-236) {
tmp = t_0;
} else if (B <= 6.9e-187) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 1.4e-33) {
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 / C))) / math.pi) tmp = 0 if B <= -1.46e+63: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.6e-33: tmp = t_0 elif B <= -3.7e-103: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif B <= -7.4e-292: tmp = t_0 elif B <= 4.3e-259: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 9.2e-236: tmp = t_0 elif B <= 6.9e-187: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 1.4e-33: 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 / C))) / pi)) tmp = 0.0 if (B <= -1.46e+63) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.6e-33) tmp = t_0; elseif (B <= -3.7e-103) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (B <= -7.4e-292) tmp = t_0; elseif (B <= 4.3e-259) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 9.2e-236) tmp = t_0; elseif (B <= 6.9e-187) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 1.4e-33) 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 / C))) / pi); tmp = 0.0; if (B <= -1.46e+63) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.6e-33) tmp = t_0; elseif (B <= -3.7e-103) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (B <= -7.4e-292) tmp = t_0; elseif (B <= 4.3e-259) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 9.2e-236) tmp = t_0; elseif (B <= 6.9e-187) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 1.4e-33) 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 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.46e+63], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.6e-33], t$95$0, If[LessEqual[B, -3.7e-103], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7.4e-292], t$95$0, If[LessEqual[B, 4.3e-259], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.2e-236], t$95$0, If[LessEqual[B, 6.9e-187], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e-33], 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}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.46 \cdot 10^{+63}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-33}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -3.7 \cdot 10^{-103}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;B \leq -7.4 \cdot 10^{-292}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 4.3 \cdot 10^{-259}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9.2 \cdot 10^{-236}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 6.9 \cdot 10^{-187}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-33}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.4599999999999999e63Initial program 38.9%
Taylor expanded in B around -inf 76.8%
if -1.4599999999999999e63 < B < -1.59999999999999988e-33 or -3.6999999999999999e-103 < B < -7.39999999999999993e-292 or 4.3000000000000001e-259 < B < 9.20000000000000024e-236 or 6.90000000000000045e-187 < B < 1.4e-33Initial program 44.8%
associate-*r/44.8%
associate-*l/44.8%
*-un-lft-identity44.8%
unpow244.8%
unpow244.8%
hypot-define63.0%
Applied egg-rr63.0%
Taylor expanded in C around inf 44.2%
Taylor expanded in A around inf 44.2%
if -1.59999999999999988e-33 < B < -3.6999999999999999e-103Initial program 83.0%
Taylor expanded in C around -inf 54.3%
if -7.39999999999999993e-292 < B < 4.3000000000000001e-259Initial program 71.4%
Taylor expanded in B around inf 60.3%
Taylor expanded in C around inf 71.0%
if 9.20000000000000024e-236 < B < 6.90000000000000045e-187Initial program 62.7%
Taylor expanded in A around inf 51.2%
if 1.4e-33 < B Initial program 52.3%
Taylor expanded in B around inf 64.9%
Final simplification58.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (* B 0.5) A)))
(t_1 (/ (- C A) B))
(t_2 (* 180.0 (/ (atan (+ 1.0 t_1)) PI))))
(if (<= B -1.42e+66)
t_2
(if (<= B -7.2e+27)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B -9.5e-193)
t_2
(if (<= B -8.8e-222)
(* 180.0 (/ t_0 PI))
(if (<= B -2e-269)
t_2
(if (<= B 2.6e-272)
(* t_0 (/ 180.0 PI))
(/ (* 180.0 (atan (+ t_1 -1.0))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = atan(((B * 0.5) / A));
double t_1 = (C - A) / B;
double t_2 = 180.0 * (atan((1.0 + t_1)) / ((double) M_PI));
double tmp;
if (B <= -1.42e+66) {
tmp = t_2;
} else if (B <= -7.2e+27) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= -9.5e-193) {
tmp = t_2;
} else if (B <= -8.8e-222) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (B <= -2e-269) {
tmp = t_2;
} else if (B <= 2.6e-272) {
tmp = t_0 * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 * atan((t_1 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((B * 0.5) / A));
double t_1 = (C - A) / B;
double t_2 = 180.0 * (Math.atan((1.0 + t_1)) / Math.PI);
double tmp;
if (B <= -1.42e+66) {
tmp = t_2;
} else if (B <= -7.2e+27) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= -9.5e-193) {
tmp = t_2;
} else if (B <= -8.8e-222) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (B <= -2e-269) {
tmp = t_2;
} else if (B <= 2.6e-272) {
tmp = t_0 * (180.0 / Math.PI);
} else {
tmp = (180.0 * Math.atan((t_1 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((B * 0.5) / A)) t_1 = (C - A) / B t_2 = 180.0 * (math.atan((1.0 + t_1)) / math.pi) tmp = 0 if B <= -1.42e+66: tmp = t_2 elif B <= -7.2e+27: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= -9.5e-193: tmp = t_2 elif B <= -8.8e-222: tmp = 180.0 * (t_0 / math.pi) elif B <= -2e-269: tmp = t_2 elif B <= 2.6e-272: tmp = t_0 * (180.0 / math.pi) else: tmp = (180.0 * math.atan((t_1 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(B * 0.5) / A)) t_1 = Float64(Float64(C - A) / B) t_2 = Float64(180.0 * Float64(atan(Float64(1.0 + t_1)) / pi)) tmp = 0.0 if (B <= -1.42e+66) tmp = t_2; elseif (B <= -7.2e+27) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= -9.5e-193) tmp = t_2; elseif (B <= -8.8e-222) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (B <= -2e-269) tmp = t_2; elseif (B <= 2.6e-272) tmp = Float64(t_0 * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(t_1 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((B * 0.5) / A)); t_1 = (C - A) / B; t_2 = 180.0 * (atan((1.0 + t_1)) / pi); tmp = 0.0; if (B <= -1.42e+66) tmp = t_2; elseif (B <= -7.2e+27) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= -9.5e-193) tmp = t_2; elseif (B <= -8.8e-222) tmp = 180.0 * (t_0 / pi); elseif (B <= -2e-269) tmp = t_2; elseif (B <= 2.6e-272) tmp = t_0 * (180.0 / pi); else tmp = (180.0 * atan((t_1 + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.42e+66], t$95$2, If[LessEqual[B, -7.2e+27], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.5e-193], t$95$2, If[LessEqual[B, -8.8e-222], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2e-269], t$95$2, If[LessEqual[B, 2.6e-272], N[(t$95$0 * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$1 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
t_1 := \frac{C - A}{B}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(1 + t\_1\right)}{\pi}\\
\mathbf{if}\;B \leq -1.42 \cdot 10^{+66}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq -7.2 \cdot 10^{+27}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq -9.5 \cdot 10^{-193}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq -8.8 \cdot 10^{-222}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{elif}\;B \leq -2 \cdot 10^{-269}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq 2.6 \cdot 10^{-272}:\\
\;\;\;\;t\_0 \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_1 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.4200000000000001e66 or -7.19999999999999966e27 < B < -9.5000000000000003e-193 or -8.8000000000000001e-222 < B < -1.9999999999999999e-269Initial program 53.1%
Taylor expanded in B around -inf 71.1%
associate--l+71.1%
div-sub72.0%
Simplified72.0%
if -1.4200000000000001e66 < B < -7.19999999999999966e27Initial program 13.7%
associate-*r/13.7%
associate-*l/13.7%
*-un-lft-identity13.7%
unpow213.7%
unpow213.7%
hypot-define14.5%
Applied egg-rr14.5%
Taylor expanded in C around inf 52.9%
Taylor expanded in A around inf 53.0%
if -9.5000000000000003e-193 < B < -8.8000000000000001e-222Initial program 5.7%
Taylor expanded in A around -inf 88.4%
associate-*r/88.4%
Simplified88.4%
if -1.9999999999999999e-269 < B < 2.59999999999999992e-272Initial program 48.1%
Taylor expanded in A around -inf 70.5%
associate-*r/70.5%
Simplified70.5%
Taylor expanded in B around 0 70.5%
associate-*r/70.5%
*-commutative70.5%
associate-/l*70.6%
associate-*r/70.6%
*-commutative70.6%
Simplified70.6%
if 2.59999999999999992e-272 < B Initial program 53.5%
associate-*r/53.5%
associate-*l/53.5%
*-un-lft-identity53.5%
unpow253.5%
unpow253.5%
hypot-define78.7%
Applied egg-rr78.7%
Taylor expanded in B around inf 65.1%
sub-neg65.1%
+-commutative65.1%
distribute-neg-in65.1%
metadata-eval65.1%
mul-1-neg65.1%
associate-+l+65.1%
+-commutative65.1%
mul-1-neg65.1%
sub-neg65.1%
div-sub66.7%
Simplified66.7%
Final simplification69.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (* B 0.5) A)))
(t_1 (/ (- C A) B))
(t_2 (atan (+ 1.0 t_1)))
(t_3 (* 180.0 (/ t_2 PI))))
(if (<= B -1.42e+66)
(/ (* 180.0 t_2) PI)
(if (<= B -7.2e+27)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B -2.7e-191)
t_3
(if (<= B -8.8e-222)
(* 180.0 (/ t_0 PI))
(if (<= B -1.02e-268)
t_3
(if (<= B 9e-273)
(* t_0 (/ 180.0 PI))
(/ (* 180.0 (atan (+ t_1 -1.0))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = atan(((B * 0.5) / A));
double t_1 = (C - A) / B;
double t_2 = atan((1.0 + t_1));
double t_3 = 180.0 * (t_2 / ((double) M_PI));
double tmp;
if (B <= -1.42e+66) {
tmp = (180.0 * t_2) / ((double) M_PI);
} else if (B <= -7.2e+27) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= -2.7e-191) {
tmp = t_3;
} else if (B <= -8.8e-222) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (B <= -1.02e-268) {
tmp = t_3;
} else if (B <= 9e-273) {
tmp = t_0 * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 * atan((t_1 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((B * 0.5) / A));
double t_1 = (C - A) / B;
double t_2 = Math.atan((1.0 + t_1));
double t_3 = 180.0 * (t_2 / Math.PI);
double tmp;
if (B <= -1.42e+66) {
tmp = (180.0 * t_2) / Math.PI;
} else if (B <= -7.2e+27) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= -2.7e-191) {
tmp = t_3;
} else if (B <= -8.8e-222) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (B <= -1.02e-268) {
tmp = t_3;
} else if (B <= 9e-273) {
tmp = t_0 * (180.0 / Math.PI);
} else {
tmp = (180.0 * Math.atan((t_1 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((B * 0.5) / A)) t_1 = (C - A) / B t_2 = math.atan((1.0 + t_1)) t_3 = 180.0 * (t_2 / math.pi) tmp = 0 if B <= -1.42e+66: tmp = (180.0 * t_2) / math.pi elif B <= -7.2e+27: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= -2.7e-191: tmp = t_3 elif B <= -8.8e-222: tmp = 180.0 * (t_0 / math.pi) elif B <= -1.02e-268: tmp = t_3 elif B <= 9e-273: tmp = t_0 * (180.0 / math.pi) else: tmp = (180.0 * math.atan((t_1 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(B * 0.5) / A)) t_1 = Float64(Float64(C - A) / B) t_2 = atan(Float64(1.0 + t_1)) t_3 = Float64(180.0 * Float64(t_2 / pi)) tmp = 0.0 if (B <= -1.42e+66) tmp = Float64(Float64(180.0 * t_2) / pi); elseif (B <= -7.2e+27) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= -2.7e-191) tmp = t_3; elseif (B <= -8.8e-222) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (B <= -1.02e-268) tmp = t_3; elseif (B <= 9e-273) tmp = Float64(t_0 * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(t_1 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((B * 0.5) / A)); t_1 = (C - A) / B; t_2 = atan((1.0 + t_1)); t_3 = 180.0 * (t_2 / pi); tmp = 0.0; if (B <= -1.42e+66) tmp = (180.0 * t_2) / pi; elseif (B <= -7.2e+27) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= -2.7e-191) tmp = t_3; elseif (B <= -8.8e-222) tmp = 180.0 * (t_0 / pi); elseif (B <= -1.02e-268) tmp = t_3; elseif (B <= 9e-273) tmp = t_0 * (180.0 / pi); else tmp = (180.0 * atan((t_1 + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(180.0 * N[(t$95$2 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.42e+66], N[(N[(180.0 * t$95$2), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -7.2e+27], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.7e-191], t$95$3, If[LessEqual[B, -8.8e-222], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.02e-268], t$95$3, If[LessEqual[B, 9e-273], N[(t$95$0 * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$1 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
t_1 := \frac{C - A}{B}\\
t_2 := \tan^{-1} \left(1 + t\_1\right)\\
t_3 := 180 \cdot \frac{t\_2}{\pi}\\
\mathbf{if}\;B \leq -1.42 \cdot 10^{+66}:\\
\;\;\;\;\frac{180 \cdot t\_2}{\pi}\\
\mathbf{elif}\;B \leq -7.2 \cdot 10^{+27}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.7 \cdot 10^{-191}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;B \leq -8.8 \cdot 10^{-222}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{elif}\;B \leq -1.02 \cdot 10^{-268}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-273}:\\
\;\;\;\;t\_0 \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_1 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.4200000000000001e66Initial program 39.6%
associate-*r/39.6%
associate-*l/39.6%
*-un-lft-identity39.6%
unpow239.6%
unpow239.6%
hypot-define84.9%
Applied egg-rr84.9%
Taylor expanded in B around -inf 81.6%
associate--l+81.6%
div-sub81.6%
Simplified81.6%
if -1.4200000000000001e66 < B < -7.19999999999999966e27Initial program 13.7%
associate-*r/13.7%
associate-*l/13.7%
*-un-lft-identity13.7%
unpow213.7%
unpow213.7%
hypot-define14.5%
Applied egg-rr14.5%
Taylor expanded in C around inf 52.9%
Taylor expanded in A around inf 53.0%
if -7.19999999999999966e27 < B < -2.69999999999999999e-191 or -8.8000000000000001e-222 < B < -1.0200000000000001e-268Initial program 65.2%
Taylor expanded in B around -inf 61.7%
associate--l+61.7%
div-sub63.5%
Simplified63.5%
if -2.69999999999999999e-191 < B < -8.8000000000000001e-222Initial program 5.7%
Taylor expanded in A around -inf 88.4%
associate-*r/88.4%
Simplified88.4%
if -1.0200000000000001e-268 < B < 8.99999999999999921e-273Initial program 48.1%
Taylor expanded in A around -inf 70.5%
associate-*r/70.5%
Simplified70.5%
Taylor expanded in B around 0 70.5%
associate-*r/70.5%
*-commutative70.5%
associate-/l*70.6%
associate-*r/70.6%
*-commutative70.6%
Simplified70.6%
if 8.99999999999999921e-273 < B Initial program 53.5%
associate-*r/53.5%
associate-*l/53.5%
*-un-lft-identity53.5%
unpow253.5%
unpow253.5%
hypot-define78.7%
Applied egg-rr78.7%
Taylor expanded in B around inf 65.1%
sub-neg65.1%
+-commutative65.1%
distribute-neg-in65.1%
metadata-eval65.1%
mul-1-neg65.1%
associate-+l+65.1%
+-commutative65.1%
mul-1-neg65.1%
sub-neg65.1%
div-sub66.7%
Simplified66.7%
Final simplification69.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B))
(t_1 (atan (+ 1.0 t_0)))
(t_2 (* 180.0 (/ t_1 PI))))
(if (<= B -1.42e+66)
(/ (* 180.0 t_1) PI)
(if (<= B -7.2e+27)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B -4.6e-189)
t_2
(if (<= B -8.8e-222)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- A))) PI))
(if (<= B -6.2e-267)
t_2
(if (<= B 2.5e-272)
(* (atan (/ (* B 0.5) A)) (/ 180.0 PI))
(/ (* 180.0 (atan (+ t_0 -1.0))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = atan((1.0 + t_0));
double t_2 = 180.0 * (t_1 / ((double) M_PI));
double tmp;
if (B <= -1.42e+66) {
tmp = (180.0 * t_1) / ((double) M_PI);
} else if (B <= -7.2e+27) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= -4.6e-189) {
tmp = t_2;
} else if (B <= -8.8e-222) {
tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / ((double) M_PI));
} else if (B <= -6.2e-267) {
tmp = t_2;
} else if (B <= 2.5e-272) {
tmp = atan(((B * 0.5) / A)) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = Math.atan((1.0 + t_0));
double t_2 = 180.0 * (t_1 / Math.PI);
double tmp;
if (B <= -1.42e+66) {
tmp = (180.0 * t_1) / Math.PI;
} else if (B <= -7.2e+27) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= -4.6e-189) {
tmp = t_2;
} else if (B <= -8.8e-222) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / Math.PI);
} else if (B <= -6.2e-267) {
tmp = t_2;
} else if (B <= 2.5e-272) {
tmp = Math.atan(((B * 0.5) / A)) * (180.0 / Math.PI);
} else {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B t_1 = math.atan((1.0 + t_0)) t_2 = 180.0 * (t_1 / math.pi) tmp = 0 if B <= -1.42e+66: tmp = (180.0 * t_1) / math.pi elif B <= -7.2e+27: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= -4.6e-189: tmp = t_2 elif B <= -8.8e-222: tmp = 180.0 * (math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / math.pi) elif B <= -6.2e-267: tmp = t_2 elif B <= 2.5e-272: tmp = math.atan(((B * 0.5) / A)) * (180.0 / math.pi) else: tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) t_1 = atan(Float64(1.0 + t_0)) t_2 = Float64(180.0 * Float64(t_1 / pi)) tmp = 0.0 if (B <= -1.42e+66) tmp = Float64(Float64(180.0 * t_1) / pi); elseif (B <= -7.2e+27) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= -4.6e-189) tmp = t_2; elseif (B <= -8.8e-222) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-A))) / pi)); elseif (B <= -6.2e-267) tmp = t_2; elseif (B <= 2.5e-272) tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; t_1 = atan((1.0 + t_0)); t_2 = 180.0 * (t_1 / pi); tmp = 0.0; if (B <= -1.42e+66) tmp = (180.0 * t_1) / pi; elseif (B <= -7.2e+27) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= -4.6e-189) tmp = t_2; elseif (B <= -8.8e-222) tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / pi); elseif (B <= -6.2e-267) tmp = t_2; elseif (B <= 2.5e-272) tmp = atan(((B * 0.5) / A)) * (180.0 / pi); else tmp = (180.0 * atan((t_0 + -1.0))) / pi; 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[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.42e+66], N[(N[(180.0 * t$95$1), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -7.2e+27], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.6e-189], t$95$2, If[LessEqual[B, -8.8e-222], 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], If[LessEqual[B, -6.2e-267], t$95$2, If[LessEqual[B, 2.5e-272], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
t_1 := \tan^{-1} \left(1 + t\_0\right)\\
t_2 := 180 \cdot \frac{t\_1}{\pi}\\
\mathbf{if}\;B \leq -1.42 \cdot 10^{+66}:\\
\;\;\;\;\frac{180 \cdot t\_1}{\pi}\\
\mathbf{elif}\;B \leq -7.2 \cdot 10^{+27}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq -4.6 \cdot 10^{-189}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq -8.8 \cdot 10^{-222}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;B \leq -6.2 \cdot 10^{-267}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-272}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.4200000000000001e66Initial program 39.6%
associate-*r/39.6%
associate-*l/39.6%
*-un-lft-identity39.6%
unpow239.6%
unpow239.6%
hypot-define84.9%
Applied egg-rr84.9%
Taylor expanded in B around -inf 81.6%
associate--l+81.6%
div-sub81.6%
Simplified81.6%
if -1.4200000000000001e66 < B < -7.19999999999999966e27Initial program 13.7%
associate-*r/13.7%
associate-*l/13.7%
*-un-lft-identity13.7%
unpow213.7%
unpow213.7%
hypot-define14.5%
Applied egg-rr14.5%
Taylor expanded in C around inf 52.9%
Taylor expanded in A around inf 53.0%
if -7.19999999999999966e27 < B < -4.5999999999999996e-189 or -8.8000000000000001e-222 < B < -6.2000000000000002e-267Initial program 64.5%
Taylor expanded in B around -inf 61.0%
associate--l+61.0%
div-sub62.8%
Simplified62.8%
if -4.5999999999999996e-189 < B < -8.8000000000000001e-222Initial program 17.5%
Taylor expanded in A around -inf 89.8%
mul-1-neg89.8%
distribute-neg-frac289.8%
distribute-lft-out89.8%
associate-/l*89.8%
Simplified89.8%
if -6.2000000000000002e-267 < B < 2.49999999999999991e-272Initial program 48.1%
Taylor expanded in A around -inf 70.5%
associate-*r/70.5%
Simplified70.5%
Taylor expanded in B around 0 70.5%
associate-*r/70.5%
*-commutative70.5%
associate-/l*70.6%
associate-*r/70.6%
*-commutative70.6%
Simplified70.6%
if 2.49999999999999991e-272 < B Initial program 53.5%
associate-*r/53.5%
associate-*l/53.5%
*-un-lft-identity53.5%
unpow253.5%
unpow253.5%
hypot-define78.7%
Applied egg-rr78.7%
Taylor expanded in B around inf 65.1%
sub-neg65.1%
+-commutative65.1%
distribute-neg-in65.1%
metadata-eval65.1%
mul-1-neg65.1%
associate-+l+65.1%
+-commutative65.1%
mul-1-neg65.1%
sub-neg65.1%
div-sub66.7%
Simplified66.7%
Final simplification69.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
(if (<= C -1.12e+32)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= C -9.5e-206)
t_0
(if (<= C -7e-282)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 4.1e-5) t_0 (* 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 tmp;
if (C <= -1.12e+32) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (C <= -9.5e-206) {
tmp = t_0;
} else if (C <= -7e-282) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 4.1e-5) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -1.12e+32) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (C <= -9.5e-206) {
tmp = t_0;
} else if (C <= -7e-282) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 4.1e-5) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) tmp = 0 if C <= -1.12e+32: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif C <= -9.5e-206: tmp = t_0 elif C <= -7e-282: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 4.1e-5: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -1.12e+32) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (C <= -9.5e-206) tmp = t_0; elseif (C <= -7e-282) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 4.1e-5) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -1.12e+32) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (C <= -9.5e-206) tmp = t_0; elseif (C <= -7e-282) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 4.1e-5) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.12e+32], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -9.5e-206], t$95$0, If[LessEqual[C, -7e-282], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.1e-5], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.12 \cdot 10^{+32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;C \leq -9.5 \cdot 10^{-206}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -7 \cdot 10^{-282}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 4.1 \cdot 10^{-5}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.12000000000000007e32Initial program 74.6%
Taylor expanded in C around -inf 68.9%
if -1.12000000000000007e32 < C < -9.49999999999999979e-206 or -7.00000000000000013e-282 < C < 4.10000000000000005e-5Initial program 58.8%
Taylor expanded in B around inf 51.9%
Taylor expanded in C around 0 49.8%
neg-mul-149.8%
distribute-neg-in49.8%
metadata-eval49.8%
unsub-neg49.8%
Simplified49.8%
if -9.49999999999999979e-206 < C < -7.00000000000000013e-282Initial program 18.9%
Taylor expanded in B around -inf 46.1%
if 4.10000000000000005e-5 < C Initial program 20.3%
associate-*r/20.3%
associate-*l/20.3%
*-un-lft-identity20.3%
unpow220.3%
unpow220.3%
hypot-define49.3%
Applied egg-rr49.3%
Taylor expanded in C around inf 66.9%
Taylor expanded in A around inf 66.9%
Final simplification57.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -2.5e+19)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= C 3.5e-140)
t_0
(if (<= C 3.3e-67)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 2.4e-5) t_0 (* 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 tmp;
if (C <= -2.5e+19) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (C <= 3.5e-140) {
tmp = t_0;
} else if (C <= 3.3e-67) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 2.4e-5) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -2.5e+19) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (C <= 3.5e-140) {
tmp = t_0;
} else if (C <= 3.3e-67) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 2.4e-5) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -2.5e+19: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif C <= 3.5e-140: tmp = t_0 elif C <= 3.3e-67: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 2.4e-5: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -2.5e+19) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (C <= 3.5e-140) tmp = t_0; elseif (C <= 3.3e-67) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 2.4e-5) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -2.5e+19) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (C <= 3.5e-140) tmp = t_0; elseif (C <= 3.3e-67) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 2.4e-5) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2.5e+19], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.5e-140], t$95$0, If[LessEqual[C, 3.3e-67], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.4e-5], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -2.5 \cdot 10^{+19}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.5 \cdot 10^{-140}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 3.3 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 2.4 \cdot 10^{-5}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.5e19Initial program 73.6%
Taylor expanded in C around -inf 67.6%
if -2.5e19 < C < 3.4999999999999998e-140 or 3.3000000000000002e-67 < C < 2.4000000000000001e-5Initial program 56.9%
Taylor expanded in C around 0 54.5%
mul-1-neg54.5%
distribute-neg-frac254.5%
+-commutative54.5%
unpow254.5%
unpow254.5%
hypot-define80.8%
Simplified80.8%
Taylor expanded in B around -inf 55.1%
mul-1-neg55.1%
sub-neg55.1%
Simplified55.1%
if 3.4999999999999998e-140 < C < 3.3000000000000002e-67Initial program 38.0%
Taylor expanded in B around inf 49.1%
if 2.4000000000000001e-5 < C Initial program 20.3%
associate-*r/20.3%
associate-*l/20.3%
*-un-lft-identity20.3%
unpow220.3%
unpow220.3%
hypot-define49.3%
Applied egg-rr49.3%
Taylor expanded in C around inf 66.9%
Taylor expanded in A around inf 66.9%
Final simplification60.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -4.8e-148)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))
(if (<= C 1.65e-140)
t_0
(if (<= C 6.4e-65)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 3.2e-5) t_0 (* 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 tmp;
if (C <= -4.8e-148) {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
} else if (C <= 1.65e-140) {
tmp = t_0;
} else if (C <= 6.4e-65) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 3.2e-5) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -4.8e-148) {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
} else if (C <= 1.65e-140) {
tmp = t_0;
} else if (C <= 6.4e-65) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 3.2e-5) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -4.8e-148: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) elif C <= 1.65e-140: tmp = t_0 elif C <= 6.4e-65: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 3.2e-5: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -4.8e-148) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); elseif (C <= 1.65e-140) tmp = t_0; elseif (C <= 6.4e-65) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 3.2e-5) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -4.8e-148) tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); elseif (C <= 1.65e-140) tmp = t_0; elseif (C <= 6.4e-65) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 3.2e-5) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -4.8e-148], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.65e-140], t$95$0, If[LessEqual[C, 6.4e-65], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.2e-5], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -4.8 \cdot 10^{-148}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.65 \cdot 10^{-140}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 6.4 \cdot 10^{-65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 3.2 \cdot 10^{-5}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.8000000000000002e-148Initial program 67.4%
Taylor expanded in B around inf 68.8%
Taylor expanded in A around 0 70.3%
if -4.8000000000000002e-148 < C < 1.64999999999999994e-140 or 6.3999999999999998e-65 < C < 3.19999999999999986e-5Initial program 56.4%
Taylor expanded in C around 0 56.3%
mul-1-neg56.3%
distribute-neg-frac256.3%
+-commutative56.3%
unpow256.3%
unpow256.3%
hypot-define82.9%
Simplified82.9%
Taylor expanded in B around -inf 59.4%
mul-1-neg59.4%
sub-neg59.4%
Simplified59.4%
if 1.64999999999999994e-140 < C < 6.3999999999999998e-65Initial program 38.0%
Taylor expanded in B around inf 49.1%
if 3.19999999999999986e-5 < C Initial program 20.3%
associate-*r/20.3%
associate-*l/20.3%
*-un-lft-identity20.3%
unpow220.3%
unpow220.3%
hypot-define49.3%
Applied egg-rr49.3%
Taylor expanded in C around inf 66.9%
Taylor expanded in A around inf 66.9%
Final simplification64.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -1.5e-147)
(/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)
(if (<= C 3.55e-140)
t_0
(if (<= C 3.8e-67)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 3.5e-5) t_0 (* 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 tmp;
if (C <= -1.5e-147) {
tmp = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
} else if (C <= 3.55e-140) {
tmp = t_0;
} else if (C <= 3.8e-67) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 3.5e-5) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -1.5e-147) {
tmp = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
} else if (C <= 3.55e-140) {
tmp = t_0;
} else if (C <= 3.8e-67) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 3.5e-5) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -1.5e-147: tmp = (180.0 * math.atan(((C / B) + -1.0))) / math.pi elif C <= 3.55e-140: tmp = t_0 elif C <= 3.8e-67: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 3.5e-5: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -1.5e-147) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi); elseif (C <= 3.55e-140) tmp = t_0; elseif (C <= 3.8e-67) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 3.5e-5) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -1.5e-147) tmp = (180.0 * atan(((C / B) + -1.0))) / pi; elseif (C <= 3.55e-140) tmp = t_0; elseif (C <= 3.8e-67) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 3.5e-5) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.5e-147], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 3.55e-140], t$95$0, If[LessEqual[C, 3.8e-67], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.5e-5], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.5 \cdot 10^{-147}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.55 \cdot 10^{-140}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 3.8 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 3.5 \cdot 10^{-5}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.5000000000000001e-147Initial program 67.4%
associate-*r/67.4%
associate-*l/67.4%
*-un-lft-identity67.4%
unpow267.4%
unpow267.4%
hypot-define91.2%
Applied egg-rr91.2%
Taylor expanded in B around inf 68.8%
sub-neg68.8%
+-commutative68.8%
distribute-neg-in68.8%
metadata-eval68.8%
mul-1-neg68.8%
associate-+l+68.8%
+-commutative68.8%
mul-1-neg68.8%
sub-neg68.8%
div-sub71.2%
Simplified71.2%
Taylor expanded in C around inf 70.3%
if -1.5000000000000001e-147 < C < 3.54999999999999993e-140 or 3.79999999999999988e-67 < C < 3.4999999999999997e-5Initial program 56.4%
Taylor expanded in C around 0 56.3%
mul-1-neg56.3%
distribute-neg-frac256.3%
+-commutative56.3%
unpow256.3%
unpow256.3%
hypot-define82.9%
Simplified82.9%
Taylor expanded in B around -inf 59.4%
mul-1-neg59.4%
sub-neg59.4%
Simplified59.4%
if 3.54999999999999993e-140 < C < 3.79999999999999988e-67Initial program 38.0%
Taylor expanded in B around inf 49.1%
if 3.4999999999999997e-5 < C Initial program 20.3%
associate-*r/20.3%
associate-*l/20.3%
*-un-lft-identity20.3%
unpow220.3%
unpow220.3%
hypot-define49.3%
Applied egg-rr49.3%
Taylor expanded in C around inf 66.9%
Taylor expanded in A around inf 66.9%
Final simplification64.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -1.45e-58)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 6e-258)
t_0
(if (<= B 1.9e-81)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 1.85e-13) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -1.45e-58) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 6e-258) {
tmp = t_0;
} else if (B <= 1.9e-81) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 1.85e-13) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -1.45e-58) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 6e-258) {
tmp = t_0;
} else if (B <= 1.9e-81) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 1.85e-13) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -1.45e-58: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 6e-258: tmp = t_0 elif B <= 1.9e-81: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 1.85e-13: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -1.45e-58) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 6e-258) tmp = t_0; elseif (B <= 1.9e-81) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 1.85e-13) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -1.45e-58) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 6e-258) tmp = t_0; elseif (B <= 1.9e-81) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 1.85e-13) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.45e-58], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6e-258], t$95$0, If[LessEqual[B, 1.9e-81], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.85e-13], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.45 \cdot 10^{-58}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-258}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.9 \cdot 10^{-81}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 1.85 \cdot 10^{-13}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.44999999999999995e-58Initial program 40.9%
Taylor expanded in B around -inf 57.7%
if -1.44999999999999995e-58 < B < 6.00000000000000042e-258 or 1.8999999999999999e-81 < B < 1.84999999999999994e-13Initial program 62.5%
Taylor expanded in B around inf 52.9%
Taylor expanded in C around inf 41.9%
if 6.00000000000000042e-258 < B < 1.8999999999999999e-81Initial program 50.2%
associate-*r/50.2%
associate-*l/50.2%
*-un-lft-identity50.2%
unpow250.2%
unpow250.2%
hypot-define74.4%
Applied egg-rr74.4%
div-sub47.7%
Applied egg-rr47.7%
Taylor expanded in C around inf 9.5%
distribute-lft1-in9.5%
metadata-eval9.5%
mul0-lft29.5%
metadata-eval29.5%
Simplified29.5%
if 1.84999999999999994e-13 < B Initial program 47.3%
Taylor expanded in B around inf 66.8%
Final simplification50.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1e-59)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.16e-263)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 3.8e-32)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-59) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.16e-263) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 3.8e-32) {
tmp = 180.0 * (atan(((A / B) * -2.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-59) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.16e-263) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 3.8e-32) {
tmp = 180.0 * (Math.atan(((A / B) * -2.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-59: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.16e-263: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 3.8e-32: tmp = 180.0 * (math.atan(((A / B) * -2.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-59) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.16e-263) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 3.8e-32) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.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-59) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.16e-263) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 3.8e-32) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-59], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.16e-263], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-32], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $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 \cdot 10^{-59}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.16 \cdot 10^{-263}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1e-59Initial program 40.9%
Taylor expanded in B around -inf 57.7%
if -1e-59 < B < 1.1599999999999999e-263Initial program 59.9%
Taylor expanded in B around inf 49.2%
Taylor expanded in C around inf 39.9%
if 1.1599999999999999e-263 < B < 3.80000000000000008e-32Initial program 52.3%
Taylor expanded in A around inf 35.9%
if 3.80000000000000008e-32 < B Initial program 51.5%
Taylor expanded in B around inf 65.6%
Final simplification51.1%
(FPCore (A B C)
:precision binary64
(if (<= C 2e-140)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= C 3.3e-67)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 2.6e-5)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= 2e-140) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (C <= 3.3e-67) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 2.6e-5) {
tmp = 180.0 * (atan((1.0 - (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 <= 2e-140) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (C <= 3.3e-67) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 2.6e-5) {
tmp = 180.0 * (Math.atan((1.0 - (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 <= 2e-140: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif C <= 3.3e-67: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 2.6e-5: tmp = 180.0 * (math.atan((1.0 - (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 <= 2e-140) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (C <= 3.3e-67) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 2.6e-5) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(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 <= 2e-140) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (C <= 3.3e-67) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 2.6e-5) tmp = 180.0 * (atan((1.0 - (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, 2e-140], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.3e-67], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.6e-5], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 2 \cdot 10^{-140}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.3 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 2.6 \cdot 10^{-5}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{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 < 2e-140Initial program 63.0%
Taylor expanded in B around -inf 62.2%
associate--l+62.2%
div-sub63.4%
Simplified63.4%
if 2e-140 < C < 3.3000000000000002e-67Initial program 38.0%
Taylor expanded in B around inf 49.1%
if 3.3000000000000002e-67 < C < 2.59999999999999984e-5Initial program 45.4%
Taylor expanded in C around 0 45.4%
mul-1-neg45.4%
distribute-neg-frac245.4%
+-commutative45.4%
unpow245.4%
unpow245.4%
hypot-define78.6%
Simplified78.6%
Taylor expanded in B around -inf 55.1%
mul-1-neg55.1%
sub-neg55.1%
Simplified55.1%
if 2.59999999999999984e-5 < C Initial program 20.3%
associate-*r/20.3%
associate-*l/20.3%
*-un-lft-identity20.3%
unpow220.3%
unpow220.3%
hypot-define49.3%
Applied egg-rr49.3%
Taylor expanded in C around inf 66.9%
Taylor expanded in A around inf 66.9%
Final simplification63.1%
(FPCore (A B C)
:precision binary64
(if (<= B -2.2e-60)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.2e-264)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 2e-32)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.2e-60) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.2e-264) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 2e-32) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.2e-60) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.2e-264) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 2e-32) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.2e-60: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.2e-264: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 2e-32: tmp = 180.0 * (math.atan((-A / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.2e-60) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.2e-264) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 2e-32) 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 <= -2.2e-60) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.2e-264) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 2e-32) tmp = 180.0 * (atan((-A / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.2e-60], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.2e-264], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2e-32], 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 -2.2 \cdot 10^{-60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.2 \cdot 10^{-264}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2 \cdot 10^{-32}:\\
\;\;\;\;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 < -2.1999999999999999e-60Initial program 40.9%
Taylor expanded in B around -inf 57.7%
if -2.1999999999999999e-60 < B < 2.19999999999999994e-264Initial program 59.9%
Taylor expanded in B around inf 49.2%
Taylor expanded in C around inf 39.9%
if 2.19999999999999994e-264 < B < 2.00000000000000011e-32Initial program 52.3%
Taylor expanded in B around inf 46.2%
Taylor expanded in A around inf 35.5%
associate-*r/35.5%
mul-1-neg35.5%
Simplified35.5%
if 2.00000000000000011e-32 < B Initial program 51.5%
Taylor expanded in B around inf 65.6%
Final simplification51.0%
(FPCore (A B C) :precision binary64 (if (<= B -7.2e-101) (* 180.0 (/ (atan 1.0) PI)) (if (<= B 8e-88) (/ (* 180.0 (atan 0.0)) PI) (* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7.2e-101) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 8e-88) {
tmp = (180.0 * atan(0.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 <= -7.2e-101) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 8e-88) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -7.2e-101: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 8e-88: tmp = (180.0 * math.atan(0.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 <= -7.2e-101) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 8e-88) tmp = Float64(Float64(180.0 * atan(0.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 <= -7.2e-101) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 8e-88) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7.2e-101], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8e-88], N[(N[(180.0 * N[ArcTan[0.0], $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 -7.2 \cdot 10^{-101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 8 \cdot 10^{-88}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -7.19999999999999999e-101Initial program 45.8%
Taylor expanded in B around -inf 53.6%
if -7.19999999999999999e-101 < B < 7.99999999999999947e-88Initial program 52.6%
associate-*r/52.6%
associate-*l/52.6%
*-un-lft-identity52.6%
unpow252.6%
unpow252.6%
hypot-define78.1%
Applied egg-rr78.1%
div-sub49.0%
Applied egg-rr49.0%
Taylor expanded in C around inf 8.7%
distribute-lft1-in8.7%
metadata-eval8.7%
mul0-lft31.8%
metadata-eval31.8%
Simplified31.8%
if 7.99999999999999947e-88 < B Initial program 52.8%
Taylor expanded in B around inf 57.1%
Final simplification47.2%
(FPCore (A B C) :precision binary64 (if (<= B -2.3e-308) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.3e-308) {
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 <= -2.3e-308) {
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 <= -2.3e-308: 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 <= -2.3e-308) 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 <= -2.3e-308) 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, -2.3e-308], 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 -2.3 \cdot 10^{-308}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.2999999999999999e-308Initial program 48.2%
Taylor expanded in B around -inf 41.4%
if -2.2999999999999999e-308 < B Initial program 52.3%
Taylor expanded in B around inf 40.5%
Final simplification40.9%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 50.2%
Taylor expanded in B around inf 20.4%
Final simplification20.4%
herbie shell --seed 2024059
(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)))