15 Reputation

3 Badges

8 years, 303 days

MaplePrimes Activity

These are questions asked by Hamed_148

I am trying to integrate a very large matrix. In order to increase the speed I am using Grid[Map] to integrate the elements of the matrix in parallel. 

The only problem that I am having is that no matter what precision I set, it reduces to 10 digit when I use Grid[Map] package. This only happens if there are floating coefficients involved.

Let me show you by an example:

In the first example, I am not putting any coeffcients before the function:

Digits := 30;
Integrands := [seq(sin((1/10)*k*x), k = 1 .. 2^8)];
evalf(Grid[Map](int, Integrands, x = 0 .. Pi));

Here are the first 5 elements of the output: 
2.000000000000000000000000000000,, ....]

as we see here the precision is 30 as we defined


Now let's run it again, but this time put a random 30 digit (or any other digits) coeficient before sin function :

Digits := 30; 
Integrands := [seq(1.000000000000000000000000000000*sin((1/10)*k*x), k = 1 .. 2^8)]; 
evalf(Grid[Map](int, Integrands, x = 0 .. Pi))

Now the first 5 elements of the output change to:



It is visible that the precision changes to 10 numbers (not even 10 digits!)...It is really important for my problem to keep the calculation at least up to 30 digits...

Does anyone know why such a problem occurs? and how to solve it?

Thanks in advance...

Page 1 of 1