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

Fraction32.IsInfinity and UFraction32.IsInifinity returns true for NaN fractions #104

Open
Timie opened this issue Aug 11, 2022 · 0 comments

Comments

@Timie
Copy link

Timie commented Aug 11, 2022

UFraction32.IsInifity(new UFraction32(0,0)) and Fraction32.IsInifity(new Fraction32(0,0)) return both true even though the number is actually NaN. They should return false.

This is caused by the fact, that IsInfinity does not check whether numenator is not 0. See:

return (f.Denominator == 0);

and
return (f.Denominator == 0);

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