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>dieeetomsbin() convert ieee double to ms binary double</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
dieeetomsbin()           Convert IEEE Double to MS Binary Double

 #include <math.h>

 int        dieeetomsbin(ieee,msbin);
 double     *ieee;                       Pointer to IEEE double
 double     *msbin;                      Pointer to MS binary

    dieeetomsbin() converts the double precision IEEE format value 'ieee'
    to the Microsoft binary format 'msbin'.  'double' values in Microsoft
    C are normally in IEEE format.

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

      Notes:    dieeetomsbin() 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.
                This routine enables C programs to use the numeric data in
                files created by MS BASIC.

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

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

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

          main()
          {
              double IEEE, msbin;

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

See Also: fieeetomsbin() fmsbintoieee()

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