首页 > 其他 > 详细

Math.Celing、Math.Floor、Math.DivRem与Math.BigMul

时间:2017-12-31 11:38:34      阅读:218      评论:0      收藏:0      [点我收藏+]

返回大于或等于指定数字的最小整数。例如:

double a=Math.Celing(0.00);  //0

double a=Math.Celing(0.40);  //1

double a=Math.Celing(0.60);  //1

double a=Math.Celing(1.00);  //1

double a=Math.Celing(1.10);  //2

 

返回小于或等于指定数字的最大整数。例如:

double g=Math.Floor(1.00);   //1

double k=Math.Floor(1.90);   //1

double l=Math.Floor(2.00);   //1

double m=Math.Floor(2.10);   //1

 

返回两个32位有符号整数的商,并将余数作为输出参数传递。例如:

int ys;

double s=Math.DivRem(5,3,out ys);  //s=1;ys=2

 

生成两个32位数字的完整乘积。例如:

long cj=Math.BigMul(2,3);  //6

Math.Celing、Math.Floor、Math.DivRem与Math.BigMul

原文:https://www.cnblogs.com/shy1766IT/p/8157175.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!