[Android] Calculator type app will encounter divide by 0 error

Incident

In this update, we introduced a new solution to resolve the decimal point issue.

This solution allows all calculations to be handled in decimal, ensuring precise representation of decimal points.

However, the previous safeguard that prevented the app from crashing when dividing by zero no longer works.

So, for the Android calculator series, if you press any number, then the division sign, and then 0—bingo! The app will immediately shut down.

Planned Fix

We have identified the problematic code and have already fixed it.

Even if someone tries to intentionally cause a crash by dividing by zero, the app will no longer crash. However, we are still deciding how to handle the display part.

In mathematics, dividing by zero results in infinity, or it’s considered undefined.

The usual approach is to display “NaN,” meaning “Not a Number,” but that might be confusing for users. Currently, we are considering keeping the value as 0, though this would not align with the mathematical principle.

One possible approach is to display a short message informing the user that division by zero does not produce a valid result. However, this would require modifying more code, which could affect other parts of the app. Therefore, we might hold off on this update for now.

Expected Update Schedule

The code has been fixed, but before releasing the new version, we’ll collect error reports for a day or two to ensure there are no other issues. Once resolved, we’ll push out an update.

Tentatively, we plan to release the new version on August 18, 2024. Until then, please be careful not to use division by zero in the Travel Calculator, as it will cause the app to immediately crash—vanish without a trace.

This Is My Fault

So, if you want to blame someone, blame me.

I won’t hide from this responsibility.

Just please be gentle with the criticism.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.