Help me choose an arbitrary precision program

In summary, the conversation is about a user looking for a tool to solve a problem involving subquadratic trig functions, specifically the tangent function. They have been using Pari, but it is too slow for high precision calculations. They are asking for suggestions and testing the speed of different platforms, and are open to using a stand-alone system or library. They are hoping to find a subquadratic solution, but are open to any solution that works.
  • #1
CRGreathouse
Science Advisor
Homework Helper
2,845
0
This is a crosspost from General Math; I wasn't sure what place was more appropriate.

I'm looking for a tool to solve a problem I've been working on. In particular, I want something that implements subquadratic trig functions -- in my case I'm looking for the tangent. I've been using Pari, but its tangent routine seems to be [itex]\mathcal{O}(n^2)[/itex] or [itex]\mathcal{O}(n^2\log n)[/itex] based on timing, and for high precision this simply takes too long. 10,000 digits in Pari takes half a second, but 100,000 takes more than a minute, and ten million takes over a week, which isn't feasible.

Any suggestions? Can anyone test their preferred platform (Math'ca, Maple, etc.) to see how long these take? I was testing tan(1) if you want comparability. I tested Maxima, but it seemed to be inappropriate for the task: it uses an [itex]\mathcal{O}(n^2\log n)\textrm{-ish}[/itex] algorithm, and took at least 30 times longer than Pari.

I could use a stand-alone system like Mathematica or a library, whatever I can find. I will need programming ability (too many problems to type by hand), but that shouldn't be hard to find.
 
Technology news on Phys.org
  • #2
I'm really hoping for something that's subquadratic, but I'll take anything that works.Thanks in advance.
 
  • #3


I would suggest looking into the GNU MPFR library for arbitrary precision calculations. It is specifically designed for high precision calculations and has efficient implementations for trigonometric functions such as tangent. It also has support for various programming languages such as C, C++, and Python. I would recommend testing it out with your specific problem and comparing its performance with other platforms.
 

Related to Help me choose an arbitrary precision program

1. What is an arbitrary precision program?

An arbitrary precision program is a type of computer software that allows for calculations and computations with numbers of any size and precision. This means that it can handle numbers with an unlimited number of digits after the decimal point, unlike traditional computer programs which have a finite number of digits they can work with.

2. Why would I need an arbitrary precision program?

An arbitrary precision program is useful for tasks that require a high level of precision, such as scientific calculations, financial analysis, and cryptography. It can also be used to avoid rounding errors that can occur with traditional computer programs when working with very large or very small numbers.

3. How does an arbitrary precision program work?

An arbitrary precision program uses advanced algorithms and data structures to store and manipulate numbers with a high level of precision. It typically involves working with numbers in their decimal form rather than converting them to binary, which can cause rounding errors.

4. What are some popular arbitrary precision programs?

Some popular arbitrary precision programs include GNU MPFR, MPFI, and GMP. These programs are open-source and widely used in scientific computing, financial analysis, and cryptography. Other commercial programs, such as Mathematica and Maple, also have arbitrary precision capabilities.

5. Are there any limitations to arbitrary precision programs?

While arbitrary precision programs can handle numbers of any size and precision, they can still be limited by the memory and processing power of the computer they are running on. Additionally, certain operations, such as division and square roots, may still result in rounding errors due to the limitations of the computer's hardware.

Similar threads

Replies
10
Views
2K
Replies
3
Views
2K
Replies
7
Views
3K
Replies
9
Views
2K
Replies
13
Views
2K
Replies
49
Views
10K
Replies
9
Views
2K
Back
Top