]> www.ginac.de Git - cln.git/blob - src/float/ffloat/misc/cl_FF_exponent.cc
Fix some conversions to cl_SF, cl_FF, and cl_DF.
[cln.git] / src / float / ffloat / misc / cl_FF_exponent.cc
1 // float_exponent().
2
3 // General includes.
4 #include "base/cl_sysdep.h"
5
6 // Specification.
7 #include "cln/ffloat.h"
8
9
10 // Implementation.
11
12 #include "float/ffloat/cl_FF.h"
13
14 namespace cln {
15
16 CL_INLINE sintE CL_INLINE_DECL(float_exponent) (const cl_FF& x)
17 {
18         var uintL uexp = FF_uexp(cl_ffloat_value(x));
19         if (uexp==0) { return 0; }
20         return (sintL)(uexp - FF_exp_mid);
21 }
22
23 }  // namespace cln