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

Inconsistent output across platform for double? #1062

Open
andrea-cassioli-maersk opened this issue Dec 17, 2024 · 3 comments
Open

Inconsistent output across platform for double? #1062

andrea-cassioli-maersk opened this issue Dec 17, 2024 · 3 comments

Comments

@andrea-cassioli-maersk
Copy link

Hi, I have noticed that sometimes serialised double numbers differs in the last digit between platform. For instance the same number is printed as follow.

on OSX

2.6721272258931175E7

on WSL

2.672127225893118E7

In general it seems OSX uses one less digit to print. Is it a known issue? Any suggestion on how to investigate further?

@grisumbras
Copy link
Member

Can you tell me what the source number is, so that I can write a test that reproduces the issue? Or better yet, can you provide a snippet that reproduces the issue? Also, what are the compilers you use on WSL and OSX, and what is the Boost version?

@andrea-cassioli-maersk
Copy link
Author

Thanks for the reply. I cannot really get a snippet to easily reproduce. But here a bit more details

boost version: 1.83
clang: 19.1
gcc: 11.4

"Can you tell me what the source number is" what do you mean?

@grisumbras
Copy link
Member

There's a double C++ object that is being serialized. What is its value?

Just to be clear, it's GCC 11.4 on WSL, and Clang 19.1 on OS X, right? Do both platforms have x86_64 architecture and use 64 bit address model?

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