1、C#中:

上取整——Math.Ceiling(Double),即返回大于或等于指定双精度浮点数的最大整数(也可称为取天板值);

              eg:  Math.Ceiling(1.01)=2;      Math.Ceiling(1.37)=2;

下取整——Math.Floor(Double),即返回小于或等于指定双精度浮点数的最大整数(也可称为取地板值);

              eg:  Math.Floor(1.99) =1;       Math.Floor(1.87) =1;

 

2.Oracle中:

上取整——ceil(number),

             eg:ceil(1.001) from dual;    --the result is 2

上取整——floor(number),

             egselect floor(1.999) from dual;  --the result is 1

      

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2021-08-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-26
  • 2021-07-23
  • 2022-02-07
相关资源
相似解决方案