Clear Filters
Clear Filters

How to calculate very large number by Matlab

21 views (last 30 days)
I want to find S_1+S_2+S_3
  8 Comments
Steven Lord
Steven Lord on 14 Jun 2024
Even if you try to operate on this symbolically, it's extremely large.
x = exp(sym(2.8e10))
x = 
vpa(x, 10)
ans = 
numberOfDigits = vpa(log10(x))
numberOfDigits = 
12160245493.291051174231609729665
If you were able to write out x it would have over twelve billion digits.
What's the purpose of this calculation? What does S1+S2+S3 represent? I'd consider trying to find another way to compute that quantity that doesn't require combining numbers that vary by so so many orders of magnitude.
Fatima Majeed
Fatima Majeed on 14 Jun 2024
I am reading this paper https://doi.org/10.48550/arXiv.2204.01980 on the page 13 he wanted to calculate A(x,delta) to bound
\[
\left| \frac{\psi(x) - x}{x} \right|
\]

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!