Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

division by zero exception #63

Open
rschumi0 opened this issue Mar 1, 2020 · 0 comments
Open

division by zero exception #63

rschumi0 opened this issue Mar 1, 2020 · 0 comments

Comments

@rschumi0
Copy link

rschumi0 commented Mar 1, 2020

I noticed that kjtest.sh produces a generator error, when a division by zero is performed, which makes it really difficult to find the problem. Would it be possible that kjtest checks, if the same exception is produced by Java?

int a =0;
int b = 234;
int c = b / a;
System.out.println(""+c);

Moreover, in some cases K-Java reports a division by zero exception, even though it should not, since the result should be Infinity, when the computation is done with doubles or floats.

int a =0;
double b = 234;
double c = b / a;
System.out.println(""+c);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant