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

NaNs #337

Open
NicoLaval opened this issue May 20, 2024 · 3 comments
Open

NaNs #337

NicoLaval opened this issue May 20, 2024 · 3 comments
Labels
bug Something isn't working Needs more information

Comments

@NicoLaval
Copy link
Collaborator

@noahboerger you reported Trevas sometimes return NaNs results, could you provide examples please?

@NicoLaval NicoLaval added bug Something isn't working question Further information is requested Needs more information and removed question Further information is requested labels May 20, 2024
@hadrienk
Copy link
Collaborator

Using floating point arithmetic means NaN is a possibility.

@NicoLaval 0.0 / 0.0 or sqrt(-1) are examples.

What I can see is missing though is the possibility to react on it. Something like if foo = NaN maybe? If we have package/namespace we could put all those in a math package.

@noahboerger
Copy link
Collaborator

Yes this is exactly what i have also observed. It seems like in the test cases from BdI cases which are resulting in NaNs are then mapped to nulls, so that at least the script can react on it. Nevertheless i am not sure if this is the correct behaviour, especially because the possibility to distinguish between NaNs and real null values is lost with this approach.

@NicoLaval
Copy link
Collaborator Author

@hadrienk mathematically I agree.

But VTL spec is more precise, Reference manual:

  • line 3184: divided by 0 generates a run-time error (TO CHECK / TODO in Trevas code)
  • line: sqrt is only defined for value >= 0. It's not specified, but I think we have to throw a InvalidParameterError issue if it's not respected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs more information
Projects
None yet
Development

No branches or pull requests

3 participants