Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Other Sciences
Programming and Computer Science
Dealing with 1000 digit numbers
Reply to thread
Message
[QUOTE="Baluncore, post: 6055327, member: 447632"] If the huge absolute magnitude of the exponent is the problem, then you should consider carrying the mantissa in a float64, with the exponent as an integer in a second variable. Another technique is to represented the numbers as logarithms. If each number is represented by a fraction, the ratio of two integers, then the implicit division that generates the artefact does not have to be executed until human readable output requires long division. You will get good at fraction arithmetic. You may need to apply Euclid's algorithm to simplify the fractions. Both problems can also be solved by writing an arithmetic package that processes strings of numeric characters. Maybe keep the position of the decimal points in signed integer variables. There are many digit-by-digit computational methods available. You will get to revisit long multiplication, division and root extraction as used by the great human computers of the past. If you really need speed, or have numbers with more than 10k digits, you should go for the gmp lib, rather than numeric strings. [/QUOTE]
Insert quotes…
Post reply
Forums
Other Sciences
Programming and Computer Science
Dealing with 1000 digit numbers
Back
Top