]> www.ginac.de Git - cln.git/blob - src/float/lfloat/misc/cl_LF_abs.cc
* */*: Remove cl_boolean, cl_true, and cl_false in favor of built-in
[cln.git] / src / float / lfloat / misc / cl_LF_abs.cc
1 // abs().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cln/lfloat.h"
8
9
10 // Implementation.
11
12 #undef MAYBE_INLINE
13 #define MAYBE_INLINE inline
14 #include "cl_LF_minusp.cc"
15
16 namespace cln {
17
18 const cl_LF abs (const cl_LF& x)
19 {
20 // x<0 -> (- x), x>=0 -> x
21         if (minusp(x)) return -x; else return x;
22 }
23
24 }  // namespace cln