1

I need to solve an ODE with very high precision. I am not sure yet how much precision I need so I have some question before changing the settings.

From what I understand, the working precision is how many digits the machine uses for calculation. Is this decimal digits? Can I specify binary digits? Will I gain anything by specifying binary digits?

What is the difference between AccuracyGoal and PrecisionGoal? Their description is the same. Assuming that I want 50 correct digits, which one should I set and what working precision should I choose? Is there a rule of thumb I should follow?

How certain can I be about the precision of the result? Is there any way to keep track of the error?

Can I compile with arbitrary precision? If yes, what type do I declare? Is there any other trick that I can use to speed things up?

tst
  • 953
  • 6
  • 13
  • 2
    What I can say is that compile with arbitrary precision does not work; Compile supports only machine precision reals (a.k.a. doubles). 50 correct digits? I doubt that you will find a numerical scheme that can get you 50 precise digits for a nontrivial ODE. Actually, without knowing the ODE, it is hard so say anything. – Henrik Schumacher Mar 05 '18 at 22:55
  • Just out of curiosity - what's the use of 50 digits? – Vsevolod A. Mar 05 '18 at 23:02
  • @VsevolodA. Oh, I probably need more than that anyway. There are the so-called exponentially small phenomena and the accuracy required to detect them is insane. – tst Mar 05 '18 at 23:10
  • @HenrikSchumacher I see, there is a deeper problem here. Thanks for that. – tst Mar 05 '18 at 23:15
  • 1
    @VsevolodA. 50 digits. Must be related to string theory ;) – Henrik Schumacher Mar 05 '18 at 23:18
  • 1
    @HenrikSchumacher just imagine someone looking at the first 45 digits with straight face and on the last five going "HERE IT IS I KNEW IT" – Vsevolod A. Mar 05 '18 at 23:19
  • 1
    @tst Just to give you a glimpse at the relations: The ratio between the diameter of the observable universe and the diameter of a hydrogen atom is about 1.375*10^37... – Henrik Schumacher Mar 05 '18 at 23:31
  • @HenrikSchumacher so the problem is that I need to measure the difference of two solutions that are very close to eachother. With some simple heuristics I expect that they coincide for the first 50 digits! I don't have an easy reference to give, but if you are really curious you could Google about "exponentially small phenomena in dynamics". – tst Mar 05 '18 at 23:48
  • By the way, your comment made me realise the scale, which I didn't consider before at all. I have done something similar for a map, so I didn't need an ODE solver and then I needed at least 280 digits. Which now I find hilarious – tst Mar 05 '18 at 23:51
  • 1
    If you read the "Details" sections, you find statements like "With AccuracyGoal->a and PrecisionGoal->p, the Wolfram Language attempts to make the numerical error in a result of size x be less than (10^-a) + x 10^-p", which shows a difference between them. Also related: https://mathematica.stackexchange.com/a/139311 and this search. – Michael E2 Mar 06 '18 at 02:36

0 Answers0