mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Information & Answers

Reply
 
Thread Tools
Old 2019-10-14, 22:11   #1
mmkstarr
 
Oct 2019

22 Posts
Thumbs up Viewing a prime?

Is there a way to view the prime in decimal form that is trying to be calculated?
Michael
mmkstarr is offline   Reply With Quote
Old 2019-10-14, 22:56   #2
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

2×1,579 Posts
Default

There is this very old program but it still works in Windows 10 command prompt:
http://www.apfloat.org/apfloat/mprintc5.zip

If you want to print the full number of the exponent you are working on, lets say 290000049-1, just run in the command prompt:
mprint.exe 90000049 10 > 90000049.txt

and it will be written to the file 90000049.txt, it took 9 sec on 1-core of my 4 year old Haswell-E. The number 10 is the base (decimal) but you can change that between 2 and 36.

Last fiddled with by ATH on 2019-10-14 at 22:58
ATH is offline   Reply With Quote
Old 2019-10-14, 22:58   #3
mmkstarr
 
Oct 2019

48 Posts
Smile

Thanks, I got it. I just didn't know what the prime # was and the formula.

What I did was actually plug in 2**(M)-1 into python. It's chugging as we speak.

Many thanks!
mmkstarr is offline   Reply With Quote
Old 2019-10-14, 23:55   #4
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

2×1,579 Posts
Default

You will not get a result in Python unless you add some arbitrary precision library like GMP or MPIR:
https://gmplib.org/
http://mpir.org/

These numbers are millions of digits long and no "normal" programming language has variables that can handle them.
ATH is offline   Reply With Quote
Old 2019-10-15, 00:25   #5
mmkstarr
 
Oct 2019

22 Posts
Smile

Ah, okay. That explains why, hours later, it's not done yet.

I'll look into your advices.

Thanks.
mmkstarr is offline   Reply With Quote
Old 2019-10-15, 20:08   #6
pepi37
 
pepi37's Avatar
 
Dec 2011
After milion nines:)

1,451 Posts
Default

WIN PFGW64
pfgw -od -lname.txt -qnumber you tested


example


pfgw -od -lquasi-repdigit-k9.txt -q9*10^380734+1

Last fiddled with by pepi37 on 2019-10-15 at 20:08
pepi37 is online now   Reply With Quote
Old 2019-10-15, 20:08   #7
mmkstarr
 
Oct 2019

22 Posts
Default

The python crunch was successful but the DOS window clipped the result -_-.
mmkstarr is offline   Reply With Quote
Old 2019-10-15, 20:48   #8
hansl
 
hansl's Avatar
 
Apr 2019

5×41 Posts
Default

mmkstarr, you might be interested in learning PARI/GP, its a very fast general calculator/scripting language and good with large integers. It uses GMP internally.

Using ATH's example of 2^90000049-1, you can output to a file very easily with a single command:
Code:
write("M90000049.txt", 2^90000049-1)
Takes about 8.5s on my computer, to write a 27,092,716 digit decimal number to the file.

Just keep in mind if you write to the same file twice it will append the next output, not overwrite from scratch, so don't accidentally append more than one result to the same file.

There's also even a subforum here for it, if you want to learn more: https://mersenneforum.org/forumdisplay.php?f=155
hansl is offline   Reply With Quote
Old 2019-10-16, 02:32   #9
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

PARI/GP is a good language for messing around with big (or not so big) numbers like that. Stop by the forum if you want help, or alternatively join the mailing list (not a part of mersenneforum).
CRGreathouse is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
disk died, prime work lost forever? where to put prime? on SSD or HDD? emily PrimeNet 3 2013-03-01 05:49
Viewing American Idol leads to eternal damnation? jasong jasong 39 2011-01-30 01:30
People viewing davieddy Forum Feedback 4 2008-10-17 04:00
Viewing Detailed System Information jinydu Lounge 8 2005-09-10 06:36
Idle curiosity: How to covert a huge prime to acutal digits for viewing? dans Math 8 2004-03-31 22:34

All times are UTC. The time now is 23:22.


Fri Aug 6 23:22:32 UTC 2021 up 14 days, 17:51, 1 user, load averages: 3.87, 4.01, 4.02

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.