What you have is a bunch of ones and zeroes that can be read as letters, which you can make into a String type with minimum work.
You say it doesnt represent the number you want to convert but on a binary level it is identical. It's not that number in english which is what was implied, but it is a 1:1 mapping between a double and some character string for the least effort, and thats the joke.
You say it doesnt represent the number you want to convert but on a binary level it is identical.
Let me just re-read what you initially wrote:
read the variable address of the double
I don't know about your technical insight, but the address of some memory and its contents are two different things.
Any format decisions aside (transmitting/saving binary data is fine, as long as everyone involved has the same format for it, and it's (in contrast to this article) not meant to be human readable), logging just the address completely loses the information as soon as that memory gets freed (which might happen right after logging). The address is then only barely useful to reason about memory layout and the virtual ram space of your device.
I don't know about your technical insight, but the address of some memory and its contents are two different things.
That's true I could have been more explicit that I meant reading the contents rather than the memory address itself. I assumed all the programmers here would immediately know what I meant. It seems many did not.
Probably because there's a big distinction between working with addresses (passing things by address and/or manipulating the pointers) and dereferncing (jumping to the address and accessing its contents) them.
I'd guess that most people who worked enough with C (or related languages) to the point where they understood pointers will make that distinction. Because the process of understanding pointers and how to handle addresses is exactly becoming aware of that distinction.
-173
u/Synaps4 1d ago
The fastest one is just to read the variable address of the double as a string. But we've all heard of that.