Hello,
how can I achieve
long l = WHAT_EVER_MACRO (-12.5); main() { printf("%X",l); }
resulting in output "0xC1480000" the binary representation of the float -12.5 . Without that MACRO the value is 0xFFFFFFF4 = -12 for integers .
Because of given circumstances in an existing project I have to store float values during initialization in long variables.
Is there any possibility?
Thanks in advance
Jürgen
"But that would obviously depend on:"
sure. but why is it relevant here?
"So why did you write "and why you think it will help maintain data integrity / validity.""
because I presumed that we were talking about THIS PARTICULAR case in this very discussion, not ALL cases.
maybe that's an assumption not applicable to you guys?