]> www.ginac.de Git - cln.git/blob - src/integer/bitwise/cl_I_dpf.cc
7597853bd286f2d94053d8e8de1ee679a40a0fe5
[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 "cl_integer.h"
8
9
10 // Implementation.
11
12 #include "cl_integer.h"
13 #include "cl_I.h"
14
15 const cl_I deposit_field (const cl_I& newbyte, const cl_I& n, const cl_byte& b)
16 {
17       // Methode:
18       // (DEPOSIT-FIELD newbyte (byte s p) integer)
19       //  = (logxor integer
20       //            (ash (logxor (ldb (byte s p) newbyte) (ldb (byte s p) integer))
21       //                 p
22       //    )       )
23       return logxor(n, ash(logxor(ldb(newbyte,b),ldb(n,b)), b.position));
24 }