In C#, I write
unsafe void Main() {
float f = 3.14f;
int i = *(int*)&f;
}
Is it possible to translate this code to F#?
My understanding is that a pointer is represented by the nativeptr<'a> type, but I for the life of me I cannot find an equivalent of the address reference & and pointer dereference * operators. I suspect NativePtr.get may be the latter, but its implementation escapes me, as I do not understand IL well enough.
I know about BitConverter and Marshal, but am looking for a way to implement bit mangling without copying memory.