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

X96 fixed point decimal type #164

Closed
mconcat opened this issue Feb 14, 2024 · 1 comment
Closed

X96 fixed point decimal type #164

mconcat opened this issue Feb 14, 2024 · 1 comment

Comments

@mconcat
Copy link
Contributor

mconcat commented Feb 14, 2024

I think the suffix X96 is meaningful because it tells us the bigint is actually a 96-bit fixed point integers, but I agree that they should not appear in the variable names. A better way would be defining a new X96 wrapper type so we can enforce the decimal computation at the type level. Once we adapt u256 types we can also work on it.

Originally posted by @mconcat in #160 (comment)

@r3v4s
Copy link
Member

r3v4s commented Feb 14, 2024

if swap only uses Q96 notation, I do agree making wrapper might be better
BUT, if my memory serves me right swap uses not only x96, but x128 too.

After we finish all of refactor stuff, if swap uses only few(I think up to two) Qx notations we can make wrapper, larger than that.... it might be to lead us too many wrapper being exist

@mconcat mconcat closed this as completed Apr 9, 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

2 participants