mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2009-08-22, 18:30   #1
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009

13·151 Posts
Question How Does It Work?

How does P95, or any other numeric application, work with numbers which are made up of millions of digits?

I've been a programmer for over 20 years and I do not know of any data type in any programming platform that can do this.

storm5510 is offline   Reply With Quote
Old 2009-08-22, 18:38   #2
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

10AB16 Posts
Default

http://www.mersenneforum.org/showthread.php?t=7128
Mini-Geek is offline   Reply With Quote
Old 2009-08-23, 01:45   #3
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

22×3×641 Posts
Default

Quote:
Originally Posted by storm5510 View Post
I've been a programmer for over 20 years and I do not know of any data type in any programming platform that can do this.
It's time for you to acquire, and start studying, The Art of Computer Programming (TAOCP) by Donald E. Knuth. This work should be in the personal library of every serious practitioner of computer science. It's on many lists of best technical literature of our time. (See http://en.wikipedia.org/wiki/The_Art...er_Programming)

Chapter 4.3 in TAOCP Volume 2 is about multiple-precision arithmetic. It explains the basics of:

a) representing integers that are too large to fit within a single computer word (or other data type element),

b) performing arithmetic on such multiple-precision integers,

c) modular arithmetic on multiple-precision integers, and

d) fast multiplication of multiple-precision integers.

Last fiddled with by cheesehead on 2009-08-23 at 01:52
cheesehead is offline   Reply With Quote
Old 2009-08-23, 14:23   #4
lfm
 
lfm's Avatar
 
Jul 2006
Calgary

52·17 Posts
Default

Quote:
Originally Posted by storm5510 View Post
How does P95, or any other numeric application, work with numbers which are made up of millions of digits?

I've been a programmer for over 20 years and I do not know of any data type in any programming platform that can do this.

Simply put (it gets much more complex when you start optimizing) use an array of numbers for each number. similar to when you do arithmetic by hand you can treat a number as an array of digits and operate on one "digit" at a time.
lfm is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate work/effort for PRP work? James Heinrich PrimeNet 0 2011-06-28 19:29
No Work Pilgrim Information & Answers 1 2008-01-31 18:53
Out of Work? birdman2584 Sierpinski/Riesel Base 5 12 2006-11-22 00:06
It seems to work, but why ? T.Rex Math 15 2005-10-15 10:38
work to do... guido72 Software 2 2002-09-26 15:47

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


Fri Aug 6 22:52:13 UTC 2021 up 14 days, 17:21, 1 user, load averages: 4.26, 4.15, 3.94

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.