microsoft / calculator

Windows Calculator: A simple yet powerful calculator that ships with Windows
MIT License
29.67k stars 5.37k forks source link

Bug effecting Scienctific Calulator on Windows 10 #1998

Closed CamoCatX closed 1 year ago

CamoCatX commented 1 year ago

Describe the bug This bug, when done, prints "invalid input" even though the input is clearly valid

Steps To Reproduce

  1. Go to the scientific calculator.
  2. Press the 2 key
  3. Put the 2 to the power of 123,456,789
  4. Press enter

Expected behavior Expected behavior would be to show the correct answer

Additional context

Requested Assignment I'm just reporting this problem. I don't want to fix it.

Flippchen commented 1 year ago

The number you are suggesting would need a 123.456.789 bit integer (roughly 15 MB) to store it, which C# or any other programming language does not support. 😉 However, there are other solutions to work with such big numbers (https://cs.stackexchange.com/questions/140881/how-do-computers-perform-operations-on-numbers-that-are-larger-than-64-bits).

So, to conclude, the number you are trying to calculate is simply too big. No basic calculator works on such big numbers

CamoCatX commented 1 year ago

@Flippchen Thanks for the solution! Closing issue...