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.
ではなくbcadd(4.9,3)戻りたいです。ここでは、小数点以下の桁数が多くない例を使用していますが、基本的な考え方 (切り捨てではなく丸めたい) はそのままです。どうすればいいですか?87
bcadd(4.9,3)
8
7
bcadd精度 (および ) を指定できますbcscale。bcadd(4.9,3,$some_huge_number)10進数の最大値がある場合は、に変更できます..その後、使用できますround().
bcadd
bcscale
bcadd(4.9,3,$some_huge_number)
round()