I'm having trouble following the documentation for GMP https://gmplib.org/manual/C_002b_002b-Interface-Floats there is no examples for what I want to do. It might be more than 1 question but I don't think that they are too long for having 4 individual questions asking for each answer.
How can I initialize a mpf_class with 20 decimal places of precision
mpf_class
How can I set a value to my mpf_class with any precision I want, eg: mpf_class myNum = 3.1415926535897932000000000000000000000000123456789
mpf_class myNum = 3.1415926535897932000000000000000000000000123456789
How can I make an std::string hold the value of my mpf_class with the precision (lets say my std::string holds exactly the number above (3.14...)
std::string
From my understanding with gmp (without the mpf_class) you need to manage the memory, ie, mpf_clear() is there any memory managment that I need to do with mpf_class? If so what are they?
gmp
mpf_clear()
1.4m articles
1.4m replys
5 comments
56.9k users