美文网首页
取整 != 四舍五入

取整 != 四舍五入

作者: 风华清 | 来源:发表于2019-07-24 15:21 被阅读0次

取整int

四舍五入round

向上取整POSIX::ceil

向下取整就是int或者POSIX::floor

其中ceil和floor,要使用库POSIX,在perl源代码里加入

#!/usr/bin/perl

use strict;

use warnings;

use POSIX;

---------------------

作者:亓磊

来源:CSDN

原文:https://blog.csdn.net/u011729865/article/details/52669460

版权声明:本文为博主原创文章,转载请附上博文链接!

相关文章

网友评论

      本文标题:取整 != 四舍五入

      本文链接:https://www.haomeiwen.com/subject/icixrctx.html