]> www.ginac.de Git - cln.git/blob - src/float/lfloat/misc/cl_LF_signum.cc
* All Files have been modified for inclusion of namespace cln;
[cln.git] / src / float / lfloat / misc / cl_LF_signum.cc
1 // signum().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cln/lfloat.h"
8
9
10 // Implementation.
11
12 #include "cl_LF.h"
13 #include "cl_LF_impl.h"
14
15 #undef MAYBE_INLINE
16 #define MAYBE_INLINE inline
17 #include "cl_LF_minusp.cc"
18 #include "cl_LF_zerop.cc"
19
20 namespace cln {
21
22 MAYBE_INLINE2
23 const cl_LF signum (const cl_LF& x)
24 {
25         if (zerop(x)) { return x; } // x=0 -> 0.0
26         else // je nach Vorzeichen von x
27         { return encode_LF1s(TheLfloat(x)->sign,TheLfloat(x)->len); }
28 }
29
30 }  // namespace cln