我正在使用BCmath对64位无符号整数进行数学运算,我想将一个bcmath object转换为一个普通的整数(高、低部分),我该如何实现呢?
谢谢你的帮助
发布于 2011-01-18 23:47:46
内置的BCMath函数本身并不处理BCMath对象,它们只处理字符串以实现任意精度的计算。因此,您可以转换回具有普通类型转换的原生php int。
$val = (int) bcmod( bcpow( "9392", "394" ), "100" );在http://php.net/manual/en/book.bc.php中,方法签名是
string bcmod ( string $left_operand , string $modulus )
string bcpow ( string $left_operand , string $right_operand [, int $scale ] )https://stackoverflow.com/questions/4725966
复制相似问题