Skip to content

Invalid DTypes Allowed #95

@OliverKillane

Description

@OliverKillane

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions