]> www.ginac.de Git - cln.git/blob - src/float/sfloat/elem/cl_SF_uminus.cc
Use paths relative the `src' directory in the #include directives.
[cln.git] / src / float / sfloat / elem / cl_SF_uminus.cc
1 // unary operator -
2
3 // General includes.
4 #include "base/cl_sysdep.h"
5
6 // Specification.
7 #include "cln/sfloat.h"
8
9
10 // Implementation.
11
12 #include "float/sfloat/cl_SF.h"
13
14 #include "base/cl_inline.h"
15 #include "float/sfloat/elem/cl_SF_zerop.cc"
16
17 namespace cln {
18
19 const cl_SF operator- (const cl_SF& x)
20 {
21 // Methode:
22 // Falls x=0.0, fertig. Sonst Vorzeichenbit umdrehen.
23         if (zerop_inline(x))
24                 return SF_0;
25         return cl_SF_from_word(x.word ^ ((cl_uint)1 << SF_sign_shift));
26 }
27
28 }  // namespace cln