I’m doing some floating point operations on an AVR (using AVR Studio and winAVR). It took me half a day to figure out what was going wrong, but apparently in avr-libc “double” is just another word for “single”:
Single precision is just fine for the computations I’m doing, but to comply with a specified packet format I have to transmit the final computed values as IEEE 754-2008 64-bit doubles, and the conversion isn’t straightforward. After a fruitless search I’m working on my own function to convert the floats to the byte values they would have as doubles, but so far I’m not having much luck. Does anyone know of a library or some example code that would help with this?