#include "gmpxx.h"
The following program gave me the output 1.5 on one line and 15 on the next.
// start main.,cpp
#include <iostream>
int main() {
mpf_class f(1.5);
std::cout << f << std::endl;
long xx(1000L);
std::cout << f.get_str(xx) << std::endl;
return 0;
}
// end main.cpp
Other info:
1) I installed gmp using homebrew
2) Darwin Marks-iMac.local 15.5.0 Darwin Kernel Version 15.5.0: Tue
Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
3) compiled with
g++ -L /usr/local/Cellar/gmp/6.1.1/lib/ -l gmpxx -l gmp test.cpp
Mark S.
_______________________________________________
gmp-bugs mailing list
[email protected]
https://gmplib.org/mailman/listinfo/gmp-bugs