]> www.ginac.de Git - cln.git/blob - src/float/ffloat/misc/cl_FF_abs.cc
Finalize CLN 1.3.7 release.
[cln.git] / src / float / ffloat / misc / cl_FF_abs.cc
1 // abs().
2
3 // General includes.
4 #include "base/cl_sysdep.h"
5
6 // Specification.
7 #include "cln/ffloat.h"
8
9
10 // Implementation.
11
12 #include "base/cl_inline.h"
13 #include "float/ffloat/elem/cl_FF_minusp.cc"
14
15 namespace cln {
16
17 const cl_FF CL_FLATTEN abs (const cl_FF& x)
18 {
19 // x<0 -> (- x), x>=0 -> x
20         if (minusp_inline(x)) return -x; else return x;
21 }
22
23 }  // namespace cln