]> www.ginac.de Git - cln.git/blob - src/float/misc/cl_F_sign2.cc
* All Files have been modified for inclusion of namespace cln;
[cln.git] / src / float / misc / cl_F_sign2.cc
1 // float_sign().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cln/float.h"
8
9
10 // Implementation.
11
12 #include "cl_F.h"
13
14 namespace cln {
15
16 const cl_F float_sign (const cl_F& x, const cl_F& y)
17 {
18   // Methode:
19   // Falls x<0 xor y<0, Ergebnis (- y), sonst Ergebnis y.
20         if (minusp(x) != minusp(y))
21                 return -y;
22         else
23                 return y;
24 }
25
26 }  // namespace cln