]> www.ginac.de Git - cln.git/blob - src/float/misc/cl_F_abs.cc
Remove libtool bits from the repository.
[cln.git] / src / float / misc / cl_F_abs.cc
1 // abs().
2
3 // General includes.
4 #include "base/cl_sysdep.h"
5
6 // Specification.
7 #include "cln/float.h"
8
9
10 // Implementation.
11
12 #include "float/cl_F.h"
13 #include "cln/sfloat.h"
14 #include "cln/ffloat.h"
15 #include "cln/dfloat.h"
16 #include "cln/lfloat.h"
17
18 #include "base/cl_inline.h"
19 #include "float/sfloat/elem/cl_SF_minusp.cc"
20 #include "float/ffloat/elem/cl_FF_minusp.cc"
21 #include "float/dfloat/elem/cl_DF_minusp.cc"
22 #include "float/lfloat/elem/cl_LF_minusp.cc"
23
24 namespace cln {
25
26 const cl_F CL_FLATTEN abs (const cl_F& x)
27 {
28 // x<0 -> (- x), x>=0 -> x
29         floatcase(x
30         ,       if (minusp_inline(x)) return -x; else return x;
31         ,       if (minusp_inline(x)) return -x; else return x;
32         ,       if (minusp_inline(x)) return -x; else return x;
33         ,       if (minusp_inline(x)) return -x; else return x;
34         );
35 }
36
37 }  // namespace cln