]> www.ginac.de Git - cln.git/blob - src/real/misc/cl_R_abs.cc
Finalize CLN 1.3.7 release.
[cln.git] / src / real / misc / cl_R_abs.cc
1 // abs().
2
3 // General includes.
4 #include "base/cl_sysdep.h"
5
6 // Specification.
7 #include "cln/real.h"
8
9
10 // Implementation.
11
12 namespace cln {
13
14 const cl_R abs (const cl_R& x)
15 {
16         // Methode:
17         // Bei x<0: (- x), sonst x.
18         if (minusp(x))
19                 return -x;
20         else
21                 return x;
22 }
23
24 }  // namespace cln