home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_11_07 / 1107094a < prev    next >
Text File  |  1993-05-01  |  374b  |  26 lines

  1. /* REAL_L2.C, Listing 2 */
  2.  
  3. #include <math.h>
  4. #include <real_t.h>
  5.  
  6. void main( void )
  7.    {
  8.  
  9.    int i;
  10.    real_t x, error;
  11.  
  12.    x = RC( 1.0 );
  13.    error = RC( 0.0 );
  14.    for ( i = 0; i < 30000; i++ )
  15.       {
  16.       error += fabs( x - RC( 0.1 ) * x * RC( 10.0 ) );
  17.       x++;
  18.       }
  19.    error = error;
  20.  
  21.    }   /* function main */
  22.  
  23. /* End of REAL_L2.C */
  24.  
  25.  
  26.