Float 754 to Hamming You will be given as input an integer k in the range from -4503599627370496 (−252) to 4503599627370496 (252). As is well known, integers in this range can be represented exactly as double-precision floating-point values.

You should output the Hamming weight (number of ones) of the encoding of k in  binary64 format. This uses 1 bit for the sign, 11 bits for the exponent (encoded with an offset), and 52 for the mantissa; see the above link for details.

As an example, number 22 is represented as

0 10000000011 0110000000000000000000000000000000000000000000000000


Since there are 5 ones, the output is 5.

Note that endianness doesn't affect the result, so you can safely use your machine's actual internal representation of double-precision values to compute the output.

Additional rules


Programs or functions are allowed.
Any programming language can be used.
Standard loopholes are forbidden
The input number will be in decimal. Other than that, input/output means and format are flexible as usual.
Shortest code in bytes wins.


Test cases

22                -&gt;   5
714               -&gt;   6
0                 -&gt;   0
1                 -&gt;  10
4503599627370496  -&gt;   5
4503599627370495  -&gt;  55
1024              -&gt;   3
-1024             -&gt;   4
-4096             -&gt;   5
1000000000        -&gt;  16
-12345678         -&gt;  16
x86_64 machine language (Linux), 16 bytes
0:       f2 48 0f 2a c7          cvtsi2sd %rdi,  %xmm0
5:       66 48 0f 7e c0          movq     %xmm0, %rax
a:       f3 48 0f b8 c0          popcnt   %rax,  %rax
f:       c3                      retq

Accepts a single 64-bit integer parameter in RDI, converts it to a floating-point value in XMM0, stores those bits back in RAX, and then computes the hamming weight of RAX, leaving the result in RAX so it can be returned to the caller.
Requires a processor that supports the POPCNT instruction, which would be Intel Nehalem, AMD Barcelona, and later microarchitectures.
To Try it online!, compile and run the following C program:
#include&lt;stdio.h&gt;
const char g[]=&quot;\xF2\x48\x0F\x2A\xC7\x66\x48\x0F\x7E\xC0\xF3\x48\x0F\xB8\xC0\xC3&quot;;
#define f(x) ((int(*)(long))g)(x)

int main(int a){
  printf(&quot;%d\n&quot;,f(22));
  printf(&quot;%d\n&quot;,f(714));
  printf(&quot;%d\n&quot;,f(0));
  printf(&quot;%d\n&quot;,f(1));
  printf(&quot;%d\n&quot;,f(4503599627370496L));
  printf(&quot;%d\n&quot;,f(4503599627370495L));
  printf(&quot;%d\n&quot;,f(1024));
  printf(&quot;%d\n&quot;,f(-1024));
  printf(&quot;%d\n&quot;,f(-4096));
  printf(&quot;%d\n&quot;,f(1000000000));
  printf(&quot;%d\n&quot;,f(-12345678));
}

Edit: Fixed segfault in TIO link.