read double from, inconsistent results with some values

Started by
12 comments, last by Brother Bob 10 years, 5 months ago

Alessio, you still have the third incorrect parameter in your call to open(). You need to OR the last two parameters there as well.

thank you. now it works with that values too.


-6.27744e+066

That looks a lot like accidental/uninitialised memory reinterpreted as a double - the upper bytes are 0xCDCDCDCE...

Are you sure you are running the exact same program you have reproduced here? Apart from the missing bitwise-OR already mentioned, there isn't anything particularly wrong with your code snippet, and a compiler bug is beyond unlikely.

it was the comma in the input-mode of open()... anyway it is so strange, the comma don't brake me the read-back if I use other floating values.. Probably since ios openmodes are macros, some "funny" things happened...

"Recursion is the first step towards madness." - "Skegg?ld, Skálm?ld, Skildir ro Klofnir!"
Direct3D 12 quick reference: https://github.com/alessiot89/D3D12QuickRef/
Advertisement


it was the comma in the input-mode of open()... anyway it is so strange, the comma don't brake me the read-back if I use other floating values.. Probably since ios openmodes are macros, some "funny" things happened...

Weird. That just results in a compile error on Clang.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]


it was the comma in the input-mode of open()... anyway it is so strange, the comma don't brake me the read-back if I use other floating values.. Probably since ios openmodes are macros, some "funny" things happened...

Weird. That just results in a compile error on Clang.

Pure Microsoft magic laugh.png

"Recursion is the first step towards madness." - "Skegg?ld, Skálm?ld, Skildir ro Klofnir!"
Direct3D 12 quick reference: https://github.com/alessiot89/D3D12QuickRef/

The library that ships with MSVC apparently has an extra implementation defined parameter for (I guess) internal use. Since it has a default value, the public interface remains unchanged, but unexpected things happen when you call it the wrong way.

This topic is closed to new replies.

Advertisement