Calculating roots with bc_math or GMP

瘦欲@ 提交于 2019-11-29 11:20:20

I'm not a PHP programmer but looking at the manual it says you have to pass them in as strings i.e.

bcpow( '4', '0.5' )

Does that help?

Edit: The user contributed notes in the manual page confirm that it doesn't support non-integer exponents.

I did come across this discussion of a PHP N-th root algorithm after a quick search so perhaps that's what you require.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!