Essentially, xCritical gives the solutions to some equation (don't worry too much about the actual equation - it just returns one positive and one negative number, say 3 and -5). Then I make the change to a variable y, which is a Gaussian variable with variance 1. I want to solve this for a number of different values for W - which is why I have defined a set containing different values of W, in the full code, a loop repeats this calculation for different values of n.
I then want to use FindRoot to solve the equation below to find sigma
This works fine, and gives the correct results - I only include it to give context to the problem, and so that you can say which bits of code I need to change to increase precision. Where I run into problems is when I want to solve for 10^-20 instead:
Underflow occurs a lot here. Mathematica seems to be having problems with the small numbers. What changes do I need to make in order to be able to solve for 10^-20? I need something that will work automatically with zero input from me - people have recommended plotting graphs first to find approx solutions etc, which I don't have time to do as I want to run this for a lot of cases. Note that I only need sigma to be found to 5 signficant figures.
I've tried fiddling around with WorkingPrecision, PrecisionGoal, and AccuracyGoal - but could be missing something simple, or another way of asking Mathematica to solve the equation. I had a similar problem when I was working with anther system - and that was cleared up just by telling it to work to 40 digits of precision with one line at the start of the code, but doesn't seem to work with Mathematica.
Thank you for any help, please contact me email@example.com with any questions.