home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a120 / 1.ddi / WATCOM_C / WAT71.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-22  |  611 b   |  24 lines

  1. /*------------------------------------------------------------------*/
  2. /* ╡{ªí└╔ªW║┘: wat71.c                                              */
  3. /*------------------------------------------------------------------*/
  4. #include <math.h>
  5. #include <stdio.h>
  6.  
  7. void main()
  8. {
  9.    double value, p;
  10.    int q;
  11.  
  12.    value = 32.0;
  13.    p = frexp(value, &q);
  14.    printf("╝╞Ñ╪ªr %lf = %lf * 2^%d\n", value, p, q);
  15.  
  16.    value = 81.0;
  17.    p = frexp(value, &q);
  18.    printf("╝╞Ñ╪ªr %lf = %lf * 2^%d\n", value, p, q);
  19.  
  20.    value = -128.0;
  21.    p = frexp(value, &q);
  22.    printf("╝╞Ñ╪ªr %lf = %lf * 2^%d\n", value, p, q);
  23. }
  24.