]> www.ginac.de Git - cln.git/blob - src/float/sfloat/elem/cl_SF_minus.cc
* */*: Convert encoding from ISO 8859-1 to UTF-8.
[cln.git] / src / float / sfloat / elem / cl_SF_minus.cc
1 // binary operator -
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_zerop.cc"
17
18 namespace cln {
19
20 const cl_SF operator- (const cl_SF& x1, const cl_SF& x2)
21 {
22 // Methode:
23 // (- x1 x2) = (+ x1 (- x2))
24         if (zerop(x2))
25                 return x1;
26         else
27                 return x1 + cl_SF_from_word(x2.word ^ bit(SF_sign_shift));
28 }
29
30 }  // namespace cln