# Limits of Mathematica's numeric precision?

Posted 6 months ago
1461 Views
|
5 Replies
|
4 Total Likes
|
 I seem to have bumped up against the limits of Mathematica with regard to number of digits it can handle. See enclosed. I see reference to much greater precision so it makes me wonder if that is really what's going on.
5 Replies
Sort By:
Posted 6 months ago
Posted 6 months ago
 The function N usually evaluates with the standard \$MachinePrecision If you insist in higher precision e.g. like this: N[((-5551459608 + 3925475120 Sqrt[2]) Sqrt[2 - Sqrt[2]])^2, 100] and N[Expand[((-5551459608 + 3925475120 Sqrt[2]) Sqrt[2 - Sqrt[2]])^2], 100] you get the same result. You could also try N[((-5551459608 + 3925475120 Sqrt[2]) Sqrt[2 - Sqrt[2]])^2 - (210443293513022896768 - 148805879898289354304 Sqrt[2]), 100] and study the warning. This link might help.Cheers, MarcoPS: Note that Simplify[((-5551459608 + 3925475120 Sqrt[2]) Sqrt[2 - Sqrt[2]])^2 - (210443293513022896768 - 148805879898289354304 Sqrt[2])] uses "infinite precision" and vanishes - as expected.
Posted 6 months ago
 Thanks Marco! I (I will attach a notebook in future questions)
Posted 6 months ago
 As I understand it, N[x] calculates x using machine precision and keeping no track of accumulating errors. Instead, N[x,n] calculates x with all whatever internal precision required to get the result with n correct digits, keeping track of errors. The situation is complicated and you can get apparently contradictory results: x = ((-5551459608 + 3925475120 Sqrt[2]) Sqrt[2 - Sqrt[2]])^2; y = 174288; N[Expand[x]] N[Expand[x], 6] N[Expand[x], 7] y < x < y + 1 y < Expand[x] < y + 1 y < N[Expand[x]] < y + 1 y < N[Expand[x], 6] < y + 1 y < N[Expand[x], 7] < y + 1 
Posted 6 months ago
 Welcome to Wolfram Community! Please make sure you know the rules: https://wolfr.am/READ-1STThe rules explain how to format your code properly. Posting code Images doesn't help other members to copy your code. Please EDIT your post and make sure code blocks start on a new paragraph and look framed and colored like this. int = Integrate[1/(x^3 - 1), x]; Map[Framed, int, Infinity] You can also embed notebook or attach notebook.