Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
7.233907357909E+16我从乘法中得到整数溢出值。
7.233907357909E+16
现在我需要计算模数7.233907357909E+16 % 15。
7.233907357909E+16 % 15
我该如何解决它,任何想法如何做到这一点?
您应该研究bcmul并bcmod进行任意精度计算。
bcmul
bcmod
例子:
$res = bcmul('134334244395933282', '2834783723423487283'); $modRes = bcmod($res, '15'); echo $modRes;