]> www.ginac.de Git - cln.git/blob - src/float/lfloat/elem/cl_LF_1minus.cc
* All Files have been modified for inclusion of namespace cln;
[cln.git] / src / float / lfloat / elem / cl_LF_1minus.cc
1 // LF_LF_minus_LF().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cl_LF.h"
8
9
10 // Implementation.
11
12 #include "cl_LF_impl.h"
13 #include "cl_DS.h"
14
15 namespace cln {
16
17 const cl_LF LF_LF_minus_LF (const cl_LF& x1, const cl_LF& x2)
18 {
19 // Methode:
20 // (- x1 x2) = (+ x1 (- x2))
21       if (TheLfloat(x2)->expo == 0)
22         { return x1; }
23         else
24         { var uintC len2 = TheLfloat(x2)->len;
25           var Lfloat mx2 = allocate_lfloat(len2, TheLfloat(x2)->expo, ~ TheLfloat(x2)->sign);
26           copy_loop_up(&TheLfloat(x2)->data[0],&TheLfloat(mx2)->data[0],len2);
27           return LF_LF_plus_LF(x1,mx2);
28         }
29 }
30
31 }  // namespace cln