您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

30 行
582 B

  1. // mul_10_plus_x().
  2. // General includes.
  3. #include "cl_sysdep.h"
  4. // Specification.
  5. #include "cln/integer.h"
  6. // Implementation.
  7. #include "cl_I.h"
  8. #include "cl_DS.h"
  9. namespace cln {
  10. const cl_I mul_10_plus_x (const cl_I& y, unsigned char x)
  11. {
  12. CL_ALLOCA_STACK;
  13. var uintD* MSDptr;
  14. var uintC len;
  15. var uintD* LSDptr;
  16. I_to_NDS_1(y, MSDptr=,len=,LSDptr=); // NDS zu Y
  17. var uintD carry = mulusmall_loop_lsp(10,LSDptr,len,x); // mal 10, plus x
  18. if (!(carry==0))
  19. { lsprefnext(MSDptr) = carry; len++; }
  20. return UDS_to_I(MSDptr,len); // UDS als Integer zur�ck
  21. }
  22. } // namespace cln