]> www.ginac.de Git - cln.git/blob - src/float/dfloat/misc/cl_DF_abs.cc
* All Files have been modified for inclusion of namespace cln;
[cln.git] / src / float / dfloat / misc / cl_DF_abs.cc
1 // abs().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cln/dfloat.h"
8
9
10 // Implementation.
11
12 #undef MAYBE_INLINE
13 #define MAYBE_INLINE inline
14 #include "cl_DF_minusp.cc"
15
16 namespace cln {
17
18 const cl_DF abs (const cl_DF& x)
19 {
20 // x<0 -> (- x), x>=0 -> x
21         if (minusp(x)) return -x; else return x;
22 }
23
24 }  // namespace cln