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

Precision on floating point members in struct #175

Closed
lawrence-koh opened this issue Jul 12, 2024 · 2 comments · Fixed by #176
Closed

Precision on floating point members in struct #175

lawrence-koh opened this issue Jul 12, 2024 · 2 comments · Fixed by #176

Comments

@lawrence-koh
Copy link

lawrence-koh commented Jul 12, 2024

Hi, I have a struct that has a long double member.

After using BINLOG_ADAPT_STRUCT and logging the struct member, when the output file is read using bread, there is some loss of precision.

e.g. 1234234.0234242 becomes 1.23423e+06.

Is there a way to control the precision that is being printed by bread?

erenon added a commit to erenon/ms-binlog that referenced this issue Jul 16, 2024
To avoid scientific notation.
Fixes morganstanley#175
@erenon
Copy link
Contributor

erenon commented Jul 16, 2024

Thanks for the report, the situation is being improved in: https://github.com/morganstanley/binlog/pull/176/files

@lawrence-koh
Copy link
Author

@erenon thank you for your help on this!

erenon added a commit to erenon/ms-binlog that referenced this issue Jul 29, 2024
To avoid scientific notation.

Do not test printing of numbers that cannot be
represented precisely using IEEE floats,
test x/(2^y) numbers only.

Fixes morganstanley#175
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

Successfully merging a pull request may close this issue.

2 participants