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

from_f32/from_f64 with NaN or Infinity returns None #16

Closed
KodrAus opened this issue Jun 11, 2023 · 0 comments · Fixed by #18
Closed

from_f32/from_f64 with NaN or Infinity returns None #16

KodrAus opened this issue Jun 11, 2023 · 0 comments · Fixed by #18
Labels
bug Something isn't working

Comments

@KodrAus
Copy link
Owner

KodrAus commented Jun 11, 2023

print_decimal![Bitstring32::from_f32(f32::NAN).unwrap(), as_le_bytes]; // FIX None

This should return Some, with the payload encoded as an integer (probably zero, but may be something else). If the payload doesn't fit, then it should return None.

@KodrAus KodrAus added the bug Something isn't working label Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant