php 浮点数比较 bccomp
2022-07-28 14:58:37
209
{{single.collect_count}}

语法: int bccomp(string left operand, string right operand, int [scale]);

返回值: 整数

函数种类: 数学运算

解析:

此函数比较二个高精确度的数字。输入二个字符串,若二个字符串一样大则返回 0;若左边的数字字符串 (left operand) 比右边 (right operand) 的大则返回 +1;若左边的数字字符串比右边的小则返回 -1。scale 是一个可有可无的选项,表示返回值的小数点后所需的位数。


回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}