Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C - <b>fieeetomsbin() convert ieee single-precision number to ms binary</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
fieeetomsbin()           Convert IEEE Single-Precision Number to MS Binary

 #include   <math.h>

 int        fieeetomsbin(ieee,msbin);
 float      *ieee;                       Pointer to IEEE float
 float      *msbin;                      Pointer to MS binary

    fieeetomsbin() converts the single-precision IEEE format value 'ieee'
    to the Microsoft binary format 'msbin'.  'float' values in Microsoft
    C are normally in IEEE format.

    Returns:    0 if successful, 1 if an overflow resulted.

      Notes:    fieeetomsbin() does not handle IEEE NANs and infinities,
                and IEEE denormals are treated as 0 in the conversion.

                Microsoft BASIC stores numbers in Microsoft binary
                format.

  -------------------------------- Example ---------------------------------

    The following statement converts an IEEE float to a Microsoft binary
    float:

          #include <math.h>
          #include <stdlib.h>              /* for perror */

          main()
          {
              float IEEE, msbin;

              if(fieetomsbin(&IEEE,&msbin) == 1)
                   perror("OVERFLOW CONVERTING TO MS BINARY');
           }

See Also: fmsbintoieee() dieeetomsbin() dmsbintoieee()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson