I have read in a book that the control WorkingPrecision default is 16. Nevertheless when I have used the FindRoot command as showed below with WorkingPrecision ->16 and without WorkingPrecision control I found different answers. I would like to know why.
You’re actually running into a number of items. First, Mathematica’s default display setting shows 6 digits of precision. You can edit this by going to Edit->Preferences and then selecting the Advanced tab, then hitting the Option Inspector button. In the window that pops up, type precision. You can then edit the PrintPrecision directly. This is not, however, the underlying precision:
Here you see that 16 digits of numerical precision are underlying the result. However, you must also realize that those may not be real digits of precision. That is, when 16 digits determine the round-off location, the error can grow during the calculation. Now let’s look at the FullForm of your second calculation:
The default precision is what the computer uses for 64-bit floating-point arithmetic.
That turns out to be just UNDER 16 digits, because the precision is set by the
number of bits in the number, not a number of base-10 digits.
I now know how find up to as many roots as I need to any precision I want. Instead of Reduce I have used SetPrecsion with NSolve however it will only solve 64 roots at a time with precision 30 so I have set up six NSolve lines and used the Join function to combine all the roots into one list each element with precision 30.
After a lot of trial and error I was actually able to use these roots in a generic trigonometric series.
There has to be an easier way. It’s awkward to use. Again I’ve looked through the documentation and came up empty. My answer is in the attached Notebook.
I’m an oldtimer and had an easier time with Fortran with all due respect.