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.
我想知道在 MPIR 中检查一个数字是否为整数(或超接近它)的最佳方法是什么。我正在取一个数字的平方根,mpf_sqrt()然后我想检查平方根是否产生一个整数。使用 java,我使用.remainder()它BigDecimal,然后查看余数是大于 .99999 还是小于 1.000001。但我没有看到remainder()mpf 的模数。我正在使用 Visual Studio C++。感谢所有帮助!
mpf_sqrt()
.remainder()
BigDecimal
remainder()