PageRenderTime 71ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/cln-1.3.2/src/float/dfloat/misc/cl_DF_exponent.cc

#
C++ | 23 lines | 11 code | 8 blank | 4 comment | 1 complexity | eb03da79d6ee94be290a6ccc35c69e5e MD5 | raw file
Possible License(s): GPL-2.0
  1. // float_exponent().
  2. // General includes.
  3. #include "base/cl_sysdep.h"
  4. // Specification.
  5. #include "cln/dfloat.h"
  6. // Implementation.
  7. #include "float/dfloat/cl_DF.h"
  8. namespace cln {
  9. CL_INLINE sintE CL_INLINE_DECL(float_exponent) (const cl_DF& x)
  10. {
  11. var uintL uexp = DF_uexp(TheDfloat(x)->dfloat_value_semhi);
  12. if (uexp==0) { return 0; }
  13. return (sintL)(uexp - DF_exp_mid);
  14. }
  15. } // namespace cln