cheeseong2001 / pe

0 stars 0 forks source link

Lack of guide on how to input large numbers #6

Open cheeseong2001 opened 4 months ago

cheeseong2001 commented 4 months ago

image.png

Given in the example above, it seems that for extremely large numbers, there is an "E" in the answer. This not documented in the user guide nor in the help gen command.

Perhaps you could specify somewhere on how to input large numbers?

nus-pe-script commented 4 months ago

Team's Response

we take input as a double value , which should torlerate 308 decimal digits . from my screenshot you can see it can easily take long input image.png

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: Yes you are right that it can tolerate up to many digits. I have no problems with that, I suppose it might be a limitation of how the numbers are printed?

However, the answer is still wrong. In the given question, 4.2624674e+17 should be the correct answer. So does that mean the way that the answer is processed is wrong?

Upon further digging, 9.223372036854776E15 seems to be the largest integer that Double can represent. Instead of using parseDouble() for this case, shouldn't a parseLong() or something similar be used? parseDouble() should only be used where decimals could occur in the result, for example the division operation only.