Could you find good numerical approximations to math. problem with a PC?

  • Thread starter Thread starter Arian.D
  • Start date Start date
  • Tags Tags
    Numerical pc
AI Thread Summary
The discussion centers on the potential for amateur research in numerical analysis, particularly in relation to programming and handling large numbers. The participant expresses a keen interest in numerical methods and has experience with programming in Pascal and C++. They inquire about the feasibility of approximating mathematical constants like pi and e to 1000 decimal places, highlighting challenges faced with large number arithmetic, such as buffer overflows. Key recommendations include exploring arbitrary precision arithmetic, which is essential for performing calculations with a high degree of accuracy. Resources such as the Apfloat library for C++ and GMP (GNU Multiple Precision Arithmetic Library) are suggested for those interested in high-performance calculations. Additionally, the use of tools like Mathcad for symbolic processing and specific algorithms like the spigot algorithm for generating digits of pi are mentioned as useful for handling large numerical computations. Overall, the thread emphasizes the importance of understanding advanced programming techniques and mathematical concepts to achieve ambitious numerical analysis goals.
Arian.D
Messages
101
Reaction score
0
I've recently taken a basic numerical analysis course in university and the subject intrigues me so much. I know Pascal and C++ fairly well, not very good like a professional programmer, but just to tell you how good I am, I've coded several programs for numerical integration using trapezoidal method, Simpson's rule, midpoint rule and Gaussian quadrature rule.
So my main question is, how far I could go forward doing amateur research in numerical analysis? I've seen that when I try to do arithmetic on large numbers things go wrong and with my limited knowledge of CS I guess a buffer overflow happens. So I guess I need to know some professional programming to be able to get some fascinating results. For example can I approximate pi up to 1000 decimals on a PC? Can I approximate e up to 1000 decimals? Things like that.

I feel I have very little information about the subject, that's why I can't explain myself very well, but I think I've somehow tried my best to tell you what my intention is, I leave the rest up to the reader that helps me what I should do. My goal is to do amateur research in numerical methods of computing math. operators by computer. What things do I need to know? What limits will I face? etc. Thanks in advance.
 
Technology news on Phys.org
Arbitrary Precision Arithmetic is what you need. Here you have a package for C++ since you know how to program on C++. http://www.apfloat.org/apfloat/

you can do more research on your own, the term is "arbitrary precision arithmetic". That's what Mathematica and other programs use I guess.

Here's a citation of what the website says:
ApFloat said:
Apfloat is a high performance arbitrary precision package. That means you can do calculations involving millions of digits with it.

EDIT: Perhaps you would like this one too: http://gmplib.org/
 
Last edited:
Have a look at the Wiki entry for Arbitrary Precision Arithmetic http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic

I use Mathcad as a general purpose mathematical tool and make use of its symbolic processor (either Maple or MuPad based, depending upon version) for large numbers.

There are also some interesting algorithms for generating large numbers, such as the spigot algorithm for pi. In the image below, I show one such implemented in Mathcad. It calculates each digit of pi and stores them in a vector. I then reduce the vector to a string for more convenient display (if you'd be so good as to ignore the missing decimal point between the first '3' and '1', I'd be grateful).
 

Attachments

  • phys - 12 06 14 arbitrary precision arithmetic 01.jpg
    phys - 12 06 14 arbitrary precision arithmetic 01.jpg
    31.8 KB · Views: 491
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...
Back
Top