Excel + Calculations

  • Thread starter StevieTNZ
  • Start date
  • #1
1,472
380

Main Question or Discussion Point

Hi there,

If I perform the following calculation in Excel:
=100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000+50

I get: 100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

Shouldn't the answer be:
100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,050?
 

Answers and Replies

  • #2
phinds
Science Advisor
Insights Author
Gold Member
2019 Award
16,102
6,098
No, the answer will be constrained by the number of bits used by the computer to represent the numbers, and you've got WAY more than it can handle, so the 50 gets dropped as a rounding error.
 
  • #3
jtbell
Mentor
15,545
3,469
  • #4
1,472
380
Is there any other program out there that will present the result given in my original post?
 
  • #5
1,069
29
Lots of other programs can do that.
Computer Algebra Systems, like Mathematica, Sage, Maxima, Reduce, Maple... all do that.
http://en.wikipedia.org/wiki/Computer_algebra_system

Some calculator programs, like bc and many others do that.
https://www.google.com/search?q=big+integer+calculator&oq=big+integer+calculator

Many programming languages, like Icon, Java... do that, don't be fooled by those who think 64 bits is big.
https://www.google.com/search?q=programming+language+big+integer&oq=programming+language+big+integer
 
  • #6
Chronos
Science Advisor
Gold Member
11,408
738
64 bits is chump change for deep calculations. You need a monster computer to process calculations beyond a few hundred decimal points. That is why numerical analysis takes so long and is so incredibly expensive.
 
  • #7
harborsparrow
Gold Member
534
108
Just for grins, try putting the smaller number first.
 
  • #8
phinds
Science Advisor
Insights Author
Gold Member
2019 Award
16,102
6,098
Just for grins, try putting the smaller number first.
Do you really think that's going to have any effect on the fact that the larger number is WAY bigger than Excel can handle as an integer?
 
  • #9
harborsparrow
Gold Member
534
108
Do you really think that's going to have any effect on the fact that the larger number is WAY bigger than Excel can handle as an integer?
Sometimes it does help to prevent loss of precision by putting the smaller number first, when there is a huge range of magnitude difference between two operands.
 
  • #10
phinds
Science Advisor
Insights Author
Gold Member
2019 Award
16,102
6,098
Sometimes it does help to prevent loss of precision by putting the smaller number first, when there is a huge range of magnitude difference between two operands.
Yes, and that does not answer my question at all. I am asking about a specific case.
 

Related Threads on Excel + Calculations

Replies
3
Views
631
  • Last Post
Replies
4
Views
829
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
7
Views
26K
  • Last Post
Replies
1
Views
1K
Top