only to about two digits (integer 50) on the C++ compiler I used a few days ago.
I am trying to implement the MAPM arbitrary precision library for 300000000
(three hundred million) digits. Any other method or precision greater than
200000 (two hundred thousand) digits will be helpful, but the one below is
best, unless a better method can be found. I did not know what to do with the
last few lines (if(int(X/Y)==X/N)cout<<"yes";
else cout<<"no";
cout<<"\tS: "<<S<<"\tR: "<<R<<"\ta: "<<a<<endl;) as far as
arbitrary precision goes.
Expand|Select|Wrap|Line Numbers
- #include<iostream>
- #include<cmath>
- #include<"m_apm.h">
- using namespace std;
- int main()
- {
- m_apm_cpp_precision(300000000);
- double a_mapm=m_apm_2.0,m_apm_R=1;
- for(int S=900;S<913;S+=2)
- {
- double N_mapm=m_apmpow(2,R)*S+1;
- double X_mapm=m_apmpow(a,S)-1;
- double Y_mapm=m_mapmpow(2,R)*S+1;
- if(int(X/Y)==X/N)cout<<"yes";
- else cout<<"no";
- cout<<"\tS: "<<S<<"\tR: "<<R<<"\ta: "<<a<<endl;
- }
- char q;
- cout<<"press enter to delete screen...";
- cin.get(q);
- return 0;
- }