fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3. #include <string.h>
  4.  
  5. int main()
  6. {
  7. uint64_t vbi = 0x4141414142424242ULL; // hex representation of double
  8. double r, vb, va = 1.4426950408889634074;
  9.  
  10. memcpy(&vb, &vbi, sizeof(vb)); // copy hex to double
  11. r = va * vb;
  12. printf("va = %f, vb = %f, r = %f\n", va, vb, r);
  13. return 0;
  14. }
Success #stdin #stdout 0s 2156KB
stdin
Standard input is empty
stdout
va = 1.442695, vb = 2261634.517647, r = 3262848.902913