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

 #include <math.h>

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

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

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

      Notes:    IEEE NANs and infinities are not converted by
                dmsbintoieee(); IEEE denormals are treated as 0.

                Microsoft BASIC stores numbers in Microsoft binary
                format. This routine enables C programs to use the
                numeric data in files created by MS BASIC.

 Portability:   Applies to MS DOS only.

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

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

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

            main()
            {
                double IEEE, msbin;

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


See Also: fieeetomsbin() fmsbintoieee()

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