]> www.ginac.de Git - cln.git/blob - src/integer/bitwise/cl_I_dpf.cc
* All Files have been modified for inclusion of namespace cln;
[cln.git] / src / integer / bitwise / cl_I_dpf.cc
1 // deposit_field().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cln/integer.h"
8
9
10 // Implementation.
11
12 #include "cln/integer.h"
13 #include "cl_I.h"
14
15 namespace cln {
16
17 const cl_I deposit_field (const cl_I& newbyte, const cl_I& n, const cl_byte& b)
18 {
19       // Methode:
20       // (DEPOSIT-FIELD newbyte (byte s p) integer)
21       //  = (logxor integer
22       //            (ash (logxor (ldb (byte s p) newbyte) (ldb (byte s p) integer))
23       //                 p
24       //    )       )
25       return logxor(n, ash(logxor(ldb(newbyte,b),ldb(n,b)), b.position));
26 }
27
28 }  // namespace cln