home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / bsd / 10238 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.2 KB  |  40 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!karl
  3. From: karl@NeoSoft.com (Karl Lehenbauer)
  4. Subject: [386BSD] unofficial patch to get rint(3) created in libm
  5. Organization: NeoSoft Communications Services -- (713) 684-5900
  6. Date: Tue, 15 Dec 1992 08:19:16 GMT
  7. Message-ID: <BzAKG5.20L@NeoSoft.com>
  8. Lines: 30
  9.  
  10. There is a manpage for the rint(3) function but it is not present in
  11. libm.  The following patch to /usr/src/lib/libm/common_source/floor.c
  12. allows the C version to be compiled in.  
  13.  
  14. After applying the patch, cd to /usr/src/lib/libm, do a "make" and
  15. "make install", then maybe a "make clean".  libm will then contain
  16. the rint function.
  17.  
  18. *** floor.c.pre-neosoft    Tue Dec 15 02:16:30 1992
  19. --- floor.c    Tue Dec 15 02:18:51 1992
  20. ***************
  21. *** 98,104 ****
  22.       }
  23.   }
  24.   
  25. - #ifndef national            /* rint() is in ./NATIONAL/support.s */
  26.   /*
  27.    * algorithm for rint(x) in pseudo-pascal form ...
  28.    *
  29. --- 98,103 ----
  30. ***************
  31. *** 137,140 ****
  32.       t = x + s;                /* x+s rounded to integer */
  33.       return (t - s);
  34.   }
  35. - #endif    /* not national */
  36. --- 136,138 ----
  37. -- 
  38. -- Email info@NeoSoft.com for info on getting interactive Internet access.
  39. "Turn on your hot tub by email now.  Ask me how."
  40.