
高精度
冬天的一缕阳光
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
小数高精度乘法
函数模板代码: const int size=1000; //大数位数 void mult(char* A,char* B,char* ans) { //A*B=ans int i,j,k; int fract; //总小数个数 int dot=-1; //小数点位置 for(k=0; A[k]!='\0'; k++) if(A[原创 2013-07-22 16:27:02 · 1877 阅读 · 0 评论 -
小数高精度加法
# include # include #define ExPand(a,b) for(i = 0 ; i num,"0") ; a->dec+=b typedef struct Real{ char num[1000] ; int dec ; }Real ; Real r1, r2, r3 ; char s1[1000], s2[1000], ans[1000] ; int原创 2013-07-22 16:37:12 · 1692 阅读 · 0 评论 -
高精度整数的四则运算
void Add(char *str1, char *str2, char *str3) { // str3 = str1 + str2; int i, j, i1, i2, tmp, carry; int len1 = strlen(str1), len2 = strlen(str2); char ch; i1 = len1-1; i2 = len原创 2013-07-22 16:57:30 · 992 阅读 · 0 评论 -
I-number
Description The I-number of x is defined to be an integer y, which satisfied the the conditions below: 1. y>x; 2. the sum of each digit of y(under base 10) is the multiple of 10; 3. among all原创 2013-07-24 21:20:12 · 1042 阅读 · 0 评论