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

Fixed point should not accept floating point in constructor #21

Open
slundqui opened this issue Aug 21, 2023 · 0 comments
Open

Fixed point should not accept floating point in constructor #21

slundqui opened this issue Aug 21, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@slundqui
Copy link
Contributor

There are rounding issues when initializing fixed point to floating point:

>>> from fixedpointmath import FixedPoint
>>> FixedPoint(1000e18)
FixedPoint("999999999999999939709.166371603178586112")

Therefore, we should not allow floating points to be passed into fixedpoint constructor

slundqui added a commit to delvtech/agent0 that referenced this issue Aug 21, 2023
1. Spinning local postgres container for testing
(#836)
2. Using conftest for test fixtures to avoid importing fixture
dependencies in tests
3. Fixing rounding bugs with fixedpoint
(delvtech/fixedpointmath#21)
@dpaiton dpaiton added the bug Something isn't working label Sep 28, 2023
@dpaiton dpaiton changed the title Fixed point should not accept floating point in constructor fixedpointmath: Fixed point should not accept floating point in constructor Sep 28, 2023
@dpaiton dpaiton changed the title fixedpointmath: Fixed point should not accept floating point in constructor Fixed point should not accept floating point in constructor Nov 17, 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

No branches or pull requests

2 participants