1

I am wondering what is the best possible way to check if a number is an integer (or super close to it) in MPIR. I am taking the square root of a number with mpf_sqrt() and then I want to check if the square root yields an integer. With java I use .remainder() that is used with BigDecimal and then see if the remainder is greater than .99999 or less than 1.000001. But I dont see a remainder() or modulus for mpf's. I am using Visual Studio C++. All help is appreciated!

Javia1492
  • 862
  • 11
  • 28
Seth Kitchen
  • 1,526
  • 19
  • 53

0 Answers0