X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Ffloat%2Flfloat%2Felem%2Fcl_LF_fround.cc;h=8decf62d8cea6b0bcf1c8a9e1d6d7145e63ad066;hb=c84c6db5d56829d69083c819688a973867694a2a;hp=fd8fbcc6ac63d440e605c7150aa0ddbc9582442d;hpb=dd9e0f894eec7e2a8cf85078330ddc0a6639090b;p=cln.git diff --git a/src/float/lfloat/elem/cl_LF_fround.cc b/src/float/lfloat/elem/cl_LF_fround.cc index fd8fbcc..8decf62 100644 --- a/src/float/lfloat/elem/cl_LF_fround.cc +++ b/src/float/lfloat/elem/cl_LF_fround.cc @@ -4,7 +4,7 @@ #include "cl_sysdep.h" // Specification. -#include "cl_lfloat.h" +#include "cln/lfloat.h" // Implementation. @@ -13,6 +13,8 @@ #include "cl_LF_impl.h" #include "cl_DS.h" +namespace cln { + const cl_LF fround (const cl_LF& x) { // Methode: @@ -27,7 +29,7 @@ const cl_LF fround (const cl_LF& x) var uintC mantlen; LF_decode(x, { return x; }, sign=,exp=,mantMSDptr=,mantlen=,); if (exp<0) { return encode_LF0(mantlen); } // e<0 -> Ergebnis 0.0 - if ((uintL)exp >= intDsize*(uintL)mantlen) // e>=16n -> x als Ergebnis + if ((uintL)exp >= intDsize*mantlen) // e>=16n -> x als Ergebnis { return x; } else // 0 <= e < 16n @@ -79,7 +81,7 @@ const cl_LF fround (const cl_LF& x) return encode_LF0(len); // e<0 -> Ergebnis 0.0 } var uintL exp = uexp - LF_exp_mid; - if (exp >= intDsize*(uintL)len) // e>=16n -> x als Ergebnis + if (exp >= intDsize*len) // e>=16n -> x als Ergebnis { return x; } // 0 <= e < 16n // alle hinteren 16n-e Bits wegrunden: @@ -132,3 +134,5 @@ const cl_LF fround (const cl_LF& x) } #endif } + +} // namespace cln