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

Invalid DTypes Allowed #95

Open
OliverKillane opened this issue Mar 13, 2024 · 0 comments
Open

Invalid DTypes Allowed #95

OliverKillane opened this issue Mar 13, 2024 · 0 comments

Comments

@OliverKillane
Copy link

OliverKillane commented Mar 13, 2024

Given the description for fxp types from the quickstart docs
The below patterns should not be possible.

Fxp(a, True, x, f>=x)
Fxp(a, False, x, f>x)

For example

from fxpmath import Fxp

num = Fxp(-3, True, 1, 10)

print(num.dtype) # 'fxp-s1/10'
print(num())     # -0.0009765625
print(num.val)   # -1

There is no failure on construction, and the behaviour in this case is not documented.
I am unsure if this is a bug, or a conscious design choice. Please close this if it is the latter.

@OliverKillane OliverKillane changed the title Invalid Types Allowed Invalid DTypes Allowed Mar 13, 2024
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