Open nus-se-bot opened 3 years ago
The reason for this bug was because we accepted the inputs as doubles and then ran a integer check on them before calling parseInt. Due to floating point arithmetic the "40.000000000000001" was parsed into 40 instead of 40.000000000000001 which went through our integer checks and threw an exception when calling parseInt. Thanks for pointing this out! This error only occurs on the fringe cases due to Double .parseDouble() being unable to accurately represent the number. As this case is quite rare the team believes this can be reduced to a medium.
--
When trying to add beef to stored ingredients, I accidentally put the quantity into the argument. My command is "add ingr stored 40.000000000000001". Since 40.000000000000001 is not a stored ingredients, I should receive messages alarming me not to add non-stored ingredients. Instead I get this exception and was thrown out of the program.
[original: nus-cs2113-AY2122S1/pe-interim#70] [original labels: severity.High type.FunctionalityBug]