I don’t have much SQLite knowledge, but this points to a problem when two 32-bit words of the 64-bit IEEE 754 format doubleare swapped, as you can see in this example (which was launched using gccthe x86 machine):
$ cat test.c
#include <stdio.h>
int main(void)
{
union {
double d;
unsigned long long ull;
} u;
u.d = 1.5;
printf("%016llx\n", u.ull);
u.d = 5.30239915051991e-315;
printf("%016llx\n", u.ull);
return 0;
}
$ gcc -Wall -o test test.c
$ ./test
3ff8000000000000
000000003ff80000
$
source
share