突然发现自己从来没有写过正儿八经的大数.于是在退役之前写一把.
希望能在用到大数时替代掉慢死的Python.
项目地址Github.com/Frankaiyou/LargeIntegar
Completed
- [x] Input;
- [x] Output;
- [x] Compare size;
- [x] Integar Addition;
- [x] Integar substruction;
ToDoList
- [ ] Fix the memory assignation when addition or substruction;
- [ ] Fix the Output that appear Prefix zero;
- [ ] Fix the Compare;
- [ ] Multiplicaion;
- [ ] division;
- [ ] Manage the memory;
实现思路是用一段连续的int32来表示整段数字, 每个int32只用4位, 为的是方便乘法操作.
[小工程]大数类
原文:https://www.cnblogs.com/qdscwyy/p/9787181.html