Keil Logo


uint32_t out = F32ToRawF32   (float    in); /* returns a raw F32 value */

The F32ToRawF32 function converts a value from floating point to raw (binary representation) F32 format.


F32 refers to the C type "float".

Return Value


FUNC unsigned long GetSReg(int idx)
  switch(idx) {
    case  0: return S0;
    case  1: return S1;
    case  2: return S2;
    case  3: return S3;
    case  4: return S4;
    case  5: return S5;
    case  6: return S6;
    case  7: return S7;
    case  8: return S8;
    case  9: return S9;
    case 10: return S10;
    case 11: return S11;
    case 12: return S12;
    case 13: return S13;
    case 14: return S14;
    case 15: return S15;
    case 16: return S16;
    case 17: return S17;
    case 18: return S18;
    case 19: return S19;
    case 20: return S20;
    case 21: return S21;
    case 22: return S22;
    case 23: return S23;
    case 24: return S24;
    case 25: return S25;
    case 26: return S26;
    case 27: return S27;
    case 28: return S28;
    case 29: return S29;
    case 30: return S30;
    case 31: return S31;
    default: return 0;

FUNC void PrintAllRawFloat32()
  int i;
  unsigned long valU;
  float valF;

  for(i=0; i<32; i++) {
    valF = GetSReg(i);
    valU = F32ToRawF32(valF);
    printf("S%i: %16x --> %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.