Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It dosen't show the full prime number when it's a large number #5

Closed
emiliopedrollo opened this issue Apr 30, 2022 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@emiliopedrollo
Copy link
Contributor

I tried to run with width 80 and it took me almost 12 hours to compute. At the end I got just a parcial number:

{
  prime: '7777777777777777777777777777777777777777777777777777777777722940000000000000000000000000000000000000000000000000000000000000000004999999999999999999999999999999777777777777777777777777777777777777777777777777777777772294000000000000000000000000000000000000000000000000000090000000000000000000999999999999999999999999999977777777777777777777777777777777777777777777777777777729400000000000000000000000000000000000000000000000000000000000000000000000000000499999999999999999994999997777777777777777777777777777777777777777777777777777294000000000000000000000000000000000000000000000000000000000000000000000000000000000499999999999999999499999777777777777777777777777777777777727222222222222229940000400000000000000000000000000000000000000000000000000000000000000000000000000000000499999999999999499999977777777777777777777777777777777772222222222222294440400000000000000000000000000000000000000000000000000000000000000000000000000000000000000999999999999949999997777777777777777777777777777777772222222299922944404000000000000000000000000000000000000000088000088888888888888888880800000000000000000000004999999999994999999777777777777777777717777777777777222299999929944440000000000000000000000000000000000000000000000000000888888888888888888880000000000000000000009999999994999999977777777777777777777777777777777722999999299444440000000000000000000000000000000000000000000000000000000008888888888888888888080000000000000000099999999499999997777777777777777777777777777777772999449294444000000000000000000000000444400400444444444400000000000000000000888888888888888888880000000000000004999999999999999777777777777777777777777777777772299992994444000000000000004404444444444444444444444444444440000000000000000000888888888888888888888880000000000049999949999999977777777777777777777777777777777229992994440000000044444444444444444444444444444444444444444444444000000000000000888888888888888888888800000000004999994999999997777777777777777777777777777777729922994440000000444444444444444444444444444444444444444444444444440000000000000000888888888888888888888800000000099999999999999777777777777777777777777777777772922994440000004444444444444444444444444444444444444444444444444444000000000000000008888888888888888888888000000049999499999999977777777777777777777777777777777922994440000044444444999444444444444444444444444444444444444444444400000000000000000088888888888888888888880000009999949999999997777777777777777777777777777777222994440000444999999999999999999444444444444444444444444444444444444000004000000000000888888888888888888888880009999999999999999777777777777777777777777777777727299440000499999999999999999999999999994444444444444444444444444444444404444000000000088888888888888888888888009999999999999999977777777777777777777777777777772299440004999992229999999999999999999999999444444444444444444444444444444444444400000000888888888888888888880049999999999999999997777777777777777777777777777777299444444992222222222222999999999999999999999994444444444444444444444444444444444000000088888888888888888004999999999999999999999777777777777777777777777777777229992299922222222222222229999999999999999999999999444444444444444444444444444444444400008888888888880004999999999999999999999999977777777777777777777777777777722222229922277777222222222299999999999999999999999999999944494444444444444444444440000004088000004449999999999999999999999999999997777777777777777777777777777772922229922277777777722222229999994449999999999999944999994444444444444400000000000000000400044999999999999999999999999999999999999777777777777777777777777777777227229922777777777777722229999444444444444444994444444444444444444444400000000044444444440004999999999999999999999999999999999999977777777777777777777777777777722222992777777777777722299999994444444440004444444444444444944444444444444444444444999999400449999999999999999999999999999999999997777777777777777777777777777777722992277777777777772299222999999944444444444444444449999999999444444444444444444444499940044999999999999999999999999999999999999777777777777777777777777777777722292277777777777772222222222299999444444444444444499999999994444444400000000044444499994004999999999999999999999999999999999999977777777777777777777777777777772229227777777722222292222222229994444444444444444449999999994444440000000000440449449999400499999999999999999999999499999999999997777777777777777777777777777777222222777777772299992222299994994000000444044444444999999444400000000880000049444444499940004499999499999999999999949999999999999777777777777777777777777777227722222277777777772299229999999999940000044444444444999994999944444000000080004994444499994800499999944999999999999949999999999999977777777777777777777777777222272722277777777777772222222222299999444444444444449999992922994444444400000004444499999999404999999994404999999999994999999999999997777777777777777777777777722227222227777777777777277777722222999999444444444999999999999999944444400044444444449999999990499999999940009999999994499999999999999777777777777777777777777777227772222777777777777727777777222299999999999999999999949929999999444940044444444499999999999099999999994499999999999449999999999999977777777777777777777777777722772222227777777777777277777772222299999999999992222922999999994400000044994444449999999999949999999999499999999999949999999999999997777777777777777777777777772272222229277777777777727777772222229999999999999222292779999440088888880499994444999999999249999999999949999999999944999999999999999777777777777777777777777777722222277292777777777777277722222222999999999999999999222994000000000000004999994999999999994999999999949999999999994499999999999999977777777777777777777777777772222227772927777777777722222222222222222229999999999929940000044400000000449999999999999999099999999949999999999994499999999999999997777777777777777777777777777727222277729277777777777722222222222222229999999999999400044444440000000004499999999999999909999999999999999999999449999999999999999777777777777777777777777777777777777777722277777777772222222222222222999999999440000099440000008888888004499999999999990444999999999999999999944999999999999999977777777777777777777777777777777777777777222277777222222222222222229999999444000000000000000008888888888800499999999444044999999999999999999944999999999999999997777777777777777777777777777777777777777777299222222222222222299999999944400000004444000000888888888888888800444444444404999999999999999999994499999999999999999777777777777777777777777777777777777227777777244499922222222222999999440000000004440000000888888888888888888800000000004999999999999999999999449999999999999999977777777777777777777777777777777777222777777772444444499922299999944000888000004440000008888888888888888888888088888800499999999999999999999449999999999999999997777777777777777777777777777777777722277777777244404000004444440000888888000000000000000088888888888888888888880888800049999999999999999999944999999999999999999777777777777777777777777777777777777227777777724440000000000000008888880000000000000000888888888888888888888888008888009999999999999999999944499999999999999999977777777777777777777777777777777777777772277779440000000000000000000000000000000000000888888888888888888888888880888804999999999999999999994449999999999999999997777777777777777777777777777777777777777722777944000000000000000000000000000000000008888888888888888888888888888808880999999999999999999999449999999999999999999777777777777777777777777777777777777777777292244440000000000000000000000000004400088888888888888888888888888888888880499999999999999999999444999999999999999999977777777777777777777777777777777777777777729994444400000000000000000000004404000888888888888888888888888888888888880009999999999999999999944499999999999999999997777777777777777777777777777777777777777777299444440000000000000000444444400008888888888888888888888888888888888888800999999999999999999994499999999999999999999777777777777777777777777777777777777777777724444000000000000000044404000000088888888888888888888888888888888888888800999999999999999999994449999999999999999999977777777777777777777777777777777777777777777244440000000000000000000000000088888888888888888888888888888888888888888499999999999999999999444999999999999999999997777777777777777777777777777777777777777777772944400000000000000000000000008888888888888888888888888888888888888888099999999999999999999444999999999999999999999777777777777777777777777777777777777227777777729440000000000000000000000000888888888888888888888888888888888888808049999999999999999999944499999999999999999999977777777777777777777777777777777777292777777777299400000000000000000000000000888888888888888888888888888888888888099999999999999999999994449999999999999999999997777777777777777777777777777777777729277777777722294000000000000000000000000088888888888888888888888888888888880499999999999999999999999444999999999999994449999777777777777777777777777777777777772927777777772222940000000000000000000008888888888888888888888888888888888888499999999999999999999999444999999999999999449999977777777777777777777777777777777772292777777772222299940000000000000000088888888888888888888888888888888888888499999999999999999999999944499999999999999404999997777777777777777777777777777777772229977777777222222999940000000000000088888888888888888888888888888888888888499999999999999999999999994449999999999999940999999777777777777777777777777777772222222297777777722222999999940000000000088888888888888888888888888888888888880929999999999999999999999994444999999999999994499999977777777777777777777777777772222222272277777722222299999999900000000000008888008888888888888888888888888884272992999999999999999999999444999999999999994049999997777777777777777777777777777222222292292777172222222999999999400000000000888880888888888888888888888888889222292299999999999999999999944499999999999999449999999777777777777777777777777777772222222229977777222222999999999994400000000008888888888888888888888888888800999922222994929999999999999944449999999999999904999999977777777777777777777777777277222222777299277722222999999999999444000000008888888'... 2800 more characters,
  attempts: 767,
  simultaneous: 12,
  distinctTested: 9216
}

Captura de Tela-20220429230332-1920x1053

Bummer.

@TotalTechGeek
Copy link
Owner

I... can definitely understand how that would be extremely frustrating! I will resolve this first thing in the morning 😬

@TotalTechGeek TotalTechGeek added the bug Something isn't working label Apr 30, 2022
@sodiboo
Copy link

sodiboo commented Apr 30, 2022

Also, something kinda annoying that's highly related to this is that it seems to just output a javascript object as is. I thought it was JSON at first, but no, there are no quotes around the keys, so you can't use JSON to parse the response. i ended up grepping for the line with prime and just sending it to deno eval to extract the real value. It would be great if there could be a flag like --result-only that makes it only print the resulting prime as is, without truncating or anything like that (i'm running thousands of images through pictoprime, which is why i need to automate it)

@TotalTechGeek
Copy link
Owner

@Terrain2

Awesome, I was going to introduce a --quiet flag & make it output JSON / the prime only,

I also have good-ish news, I was planning on releasing a version that helps with that use-case as well (converting multiple images to make something like a video).

@TotalTechGeek
Copy link
Owner

Hi,

I've now released a new version that should resolve the above issues:

By default, it will give you the json output (and it will be exported properly this time), but if you wish to only export the prime, you may also use -x prime.

Using -q or --quiet will get rid of the debug output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants