[英]How to take the exponent of math/big.Float in Go?
I couldn't find anything in the API . 我在API中找不到任何内容。 Converting the number to a
math/big.Int
and back is not an option because the fractional component is significant to my calculation. 不能将数字转换为
math/big.Int
并返回,因为小数部分对我的计算很重要。
I'll end up repeatedly multiplying if there's no API, but that's a dissatisfying solution ( math/big.Int.Exp
is just O(log(n))
) which might not be practical when I run into this problem again. 如果没有API,我将反复重复乘法,但这是一个令人不满意的解决方案(
math/big.Int.Exp
只是O(log(n))
),当我再次遇到此问题时可能不切实际。
Thanks! 谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.