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

Lab 2 - Parsers #67

Open
gioannides opened this issue Feb 6, 2018 · 1 comment
Open

Lab 2 - Parsers #67

gioannides opened this issue Feb 6, 2018 · 1 comment

Comments

@gioannides
Copy link

  1. What should happen in a division by 0?
  2. What should happen in the log of a negative number?
  3. What should happen in the log of 0?
  4. inf x inf = NaN or inf? also including all of the inf and 0 variant calculations.
@m8pple
Copy link
Contributor

m8pple commented Feb 7, 2018

I actually don't have test-cases for this, as I wanted to avoid over-complicating
things, but we can define it for completeness.

I think all these cases are covered by IEEE 754 rules for double-precision, including
the functions. So as long as we say that these should be non-signalling NaN (i.e.
no exceptions during evaluation), then the only issue is how to actually print
them out (I think?)

So in that case, you get to choose - how does your program print them, and we
can pick that.

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

2 participants