Post Reply 
Largest Known Prime Number discovered
05-27-2019, 08:36 PM
Post: #17
RE: Largest Known Prime Number discovered
(01-07-2018 07:23 PM)Gerson W. Barbosa Wrote:  
(01-05-2018 01:24 PM)Don Shepherd Wrote:  My HP-65 can find that number in ..... well, I take that back!

My HP-50g can evaluate M4253 (2^4253 - 1) in less than 30 seconds, but that one was discovered in November 1961.

4253

« 1 DUP ROT
START DUP +
NEXT 1 -
»

EVAL


->

19079700752443907380746804296952917366935699474994017739474188267352897978700505​37063680498355149002443034959549507097257621863112241488288119202169045422069607​44666169364221195289538436845390250168663932838805192055137154390912666527533007​30929268753909225704336251785736662469997540237546295449029325923330313733064353​15565397399219262014386064390200751747230290568382725050515719675946083500634044​95977660656269020823960825567012344189908927956646011998057988548630107637380993​51982658238978188813570540865304521965580175808125116408055460905746802820330871​87246540810553232158601896113912960304711084431467456719677663089258585472715073​11563765171008318248647110097614890313562856541784154881743146033909602737947385​05535596033185561454090008145637865906837031726769698000118775099549109035010841​70509179915621679722810701613059725180448720483313063837150948549384157385498946​06070722584737978176686422134354526989443028353644037187375385397838259511833166​41613432369566036767689772228791877342096898232608902615003151542416546211133752​74311548906663273749214462768335645197767976338755035486650939145564820314822488​83127023777039667707976559857333357013727342079099064400455741830654320379350833​23624581934882406478358569292488102197833297494990612266442137603468781535048499​1

PS: M23209, discovered in 1979, takes about 333 seconds (6987 digits long).

The HP-50g with newRPL (build 1255) installed computes M4253 in 28.46 milliseconds.

Larger primes can be computed but full precision can be achieved only if the resulting number is shorter than 2000 digits, the maximum precision allowed. Larger numbers can be computed (MAXR is 1e30000) but the mantissa is rounded at 2000 digits (newRPL uses 16 guard digits).

Anyway here's more benchmarks, and the code I used:

M4253: 28.46 ms
M4423: 29.4 ms (largest at full precision)
M23209: 196.64 ms
M86243: 318.12 (largest before overflow)

Code:

«
  GETNFMT SWAP
  "#.A#" SETNFMT
  2000 SETPREC
  DUP
  "M" SWAP →STR ": " + +
  SWAP

  «
    2 SWAP ^ 1 -
  »
  TEVAL

  1_s * 1_ms CONVERT UNROT
  →STRE
  DUP STRLEN
  "DIGITS: " SWAP +
  UNROT +
  4 ROLL SETNFMT
»

The digits count is off-by-1 for approximated results because of the trailing dot that newRPL adds to the result to highlight the fact the number is approximated.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Largest Known Prime Number discovered - JoJo1973 - 05-27-2019 08:36 PM



User(s) browsing this thread: 1 Guest(s)