Skip to content

Instantly share code, notes, and snippets.

@FROGGS

FROGGS/output Secret

Created July 5, 2015 13:36
Show Gist options
  • Save FROGGS/4f1fac6ac4a47d555981 to your computer and use it in GitHub Desktop.
Save FROGGS/4f1fac6ac4a47d555981 to your computer and use it in GitHub Desktop.
root@debian-mipsel:~/MoarVM# ./test_double
2141029028
#include <stdio.h>
#include <stdlib.h>
struct MVMP6numBody {
/* Float storage slot. */
union {
double n64;
float n32;
} value;
};
typedef struct MVMP6numBody MVMP6numBody;
int main(int argc, char **argv) {
MVMP6numBody body;
body.value.n64 = 42.1;
printf("%d\n", body.value.n64);
return EXIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment