Keil Logo

F64ToRawF64

Summary
uint64_t out = F64ToRawF64   (double   in); /* returns a raw F64 value */
Description

The F64ToRawF64 function converts a value from double to raw (binary representation) F64 format.

Note

F64 refers to the C type "double".

Return Value

uint64_t

Example
FUNC unsigned long long GetDReg(int idx)
{
  switch(idx) {
    case  0: return D0;
    case  1: return D1;
    case  2: return D2;
    case  3: return D3;
    case  4: return D4;
    case  5: return D5;
    case  6: return D6;
    case  7: return D7;
    case  8: return D8;
    case  9: return D9;
    case 10: return D10;
    case 11: return D11;
    case 12: return D12;
    case 13: return D13;
    case 14: return D14;
    case 15: return D15;
    default: return 0;
  }
}

FUNC void PrintAllRawFloat64()
{
  int i;
  unsigned long long valF;
  double valU;

  for(i=0; i<16; i++) {
    valF = GetDReg(i);
    valU = F64ToRawF64(valF);
    printf("D%i: %16llx --> %g\n", i, valF, valU);
  }
}

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.