Remainder/Modulus with mpf's in MPIR

206 Views Asked by At

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!

0

There are 0 best solutions below