]> www.ginac.de Git - cln.git/blob - src/float/lfloat/misc/cl_LF_abs.cc
11cab15accde229f594321952240df46fb685d7e
[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 "cl_lfloat.h"
8
9
10 // Implementation.
11
12 #undef MAYBE_INLINE
13 #define MAYBE_INLINE inline
14 #include "cl_LF_minusp.cc"
15
16 const cl_LF abs (const cl_LF& x)
17 {
18 // x<0 -> (- x), x>=0 -> x
19         if (minusp(x)) return -x; else return x;
20 }