4 #include "base/cl_sysdep.h"
7 #include "cln/integer.h"
12 #include "integer/cl_I.h"
13 #include "base/digitseq/cl_DS.h"
17 const cl_I operator- (const cl_I& x)
20 #if (cl_value_len < intVsize)
21 return V_to_I(- FN_to_V(x));
22 #elif (cl_word_size==64)
23 return Q_to_I(- FN_to_Q(x));
24 #elif (intVsize==32) // && (cl_value_len == intVsize)
25 var sint32 xhi = sign_of(FN_to_V(x));
26 var uint32 xlo = FN_to_V(x);
27 return L2_to_I(-xhi-(xlo!=0),-xlo);
35 BN_to_NDS_1(x, MSDptr=,len=,LSDptr=); // NDS zu x bilden, len>0
36 // vorsorglich 1 Digit mehr belegen:
37 { var sintD sign = sign_of_sintD(mspref(MSDptr,0));
38 lsprefnext(MSDptr) = sign; len++;
41 neg_loop_lsp(LSDptr,len);
42 // MSDigit ist nun = 0x0000 oder = 0xFFFF
43 return DS_to_I(MSDptr,len); // DS wieder zum Integer machen