]> www.ginac.de Git - cln.git/blob - src/float/sfloat/misc/cl_SF_sign.cc
* All Files have been modified for inclusion of namespace cln;
[cln.git] / src / float / sfloat / misc / cl_SF_sign.cc
1 // float_sign().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cln/sfloat.h"
8
9
10 // Implementation.
11
12 #include "cl_SF.h"
13
14 #undef MAYBE_INLINE
15 #define MAYBE_INLINE inline
16 #include "cl_SF_minusp.cc"
17
18 namespace cln {
19
20 MAYBE_INLINE2
21 const cl_SF float_sign (const cl_SF& x)
22 {
23 // Methode: x>=0 -> Ergebnis 1.0; x<0 -> Ergebnis -1.0
24         return encode_SF(SF_sign(x),1,bit(SF_mant_len));
25 }
26
27 }  // namespace cln