I would like to export floating point numbers with a Python script into a binary file, and read the binary file with a C++ program, and interpret the bytes as floats. (On x86/IEEE754 machines. Without conversion. Just read data from a file and call it a float array.)
If I understand correctly Python uses floats that are the same as double in C. So 8 bytes. Is there a way to make this work? To export 4 byte floats from Python that will be the same representation as 4 byte floats in C++?
doubletype is.