X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Ffloat%2Fsfloat%2Felem%2Fcl_SF_ftrunc.cc;h=edc957943588b589a9d38df615ad0793396beb0b;hb=665c18cd376d8d8c5a8eafb30681a3f9f46d4a99;hp=073b0f6e93e25833f8c2a417c5261d6945c8a133;hpb=dd9e0f894eec7e2a8cf85078330ddc0a6639090b;p=cln.git diff --git a/src/float/sfloat/elem/cl_SF_ftrunc.cc b/src/float/sfloat/elem/cl_SF_ftrunc.cc index 073b0f6..edc9579 100644 --- a/src/float/sfloat/elem/cl_SF_ftrunc.cc +++ b/src/float/sfloat/elem/cl_SF_ftrunc.cc @@ -4,13 +4,15 @@ #include "cl_sysdep.h" // Specification. -#include "cl_sfloat.h" +#include "cln/sfloat.h" // Implementation. #include "cl_SF.h" +namespace cln { + const cl_SF ftruncate (const cl_SF& x) { // Methode: @@ -26,9 +28,11 @@ const cl_SF ftruncate (const cl_SF& x) { return x; } else { return cl_SF_from_word( - x.word & // Bitmaske: Bits 16-e..0 gelöscht, alle anderen gesetzt + x.word & // Bitmaske: Bits 16-e..0 gelöscht, alle anderen gesetzt ~(bit(SF_mant_len+SF_mant_shift + 1+SF_exp_mid-uexp) - bit(SF_mant_shift)) ); } } } + +} // namespace cln