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

About PositSpec::WithInfs #15

Open
aleasto opened this issue Jan 27, 2024 · 1 comment
Open

About PositSpec::WithInfs #15

aleasto opened this issue Jan 27, 2024 · 1 comment

Comments

@aleasto
Copy link
Contributor

aleasto commented Jan 27, 2024

What is the difference between PositSpec::WithNanInfs and PositSpec::WithInfs?
The documentation says:

	WithNanInfs, /// one top Nan and two signed Infinites (for more float compatibility)
	WithInfs /// one top Nan and two signed Infinites (for more float compatibility)

which is the same description for both options.

Looking at the headers instead they are defined differently:
https://github.com/federicorossifr/cppposit/blob/eb387bfc94b3424ff6afe2b579cabb8a85e342e4/include/traits/posittraits.hpp#L63
https://github.com/federicorossifr/cppposit/blob/eb387bfc94b3424ff6afe2b579cabb8a85e342e4/include/traits/posittraits.hpp#L74

However the question rises, what value is "at the top" with WithInfs? The the posit is still probably symmetric with one top point...?
And similarly, what value is returned by operations like +Inf + -Inf, which in IEEE754 would be NaN?

@aleasto
Copy link
Contributor Author

aleasto commented Jan 27, 2024

Ah well i guess that the answer is "the same as PositSpec::WithNone"

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