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

Feature request: fast_fixed_point #134

Open
spannella opened this issue Jul 29, 2022 · 1 comment
Open

Feature request: fast_fixed_point #134

spannella opened this issue Jul 29, 2022 · 1 comment

Comments

@spannella
Copy link

Hi in many applications I have I cannot use double / float but use a fixed-point integer representation, for instance storing the number in a int64_t with the stored value is 1 billion times the original value allowing for 9 digits of decimal.
Example:
int64_t val;
fast_fixed_point("42.123456789", val, 9)
then val would be set to 42123456789

I think it should be pretty easy to adapt the current code to support this use case.

@lemire
Copy link
Member

lemire commented Jul 29, 2022

Pull request invited!

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