*BSD News Article 8912


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!karl
From: karl@NeoSoft.com (Karl Lehenbauer)
Subject: [386BSD] unofficial patch to get rint(3) created in libm
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Tue, 15 Dec 1992 08:19:16 GMT
Message-ID: <BzAKG5.20L@NeoSoft.com>
Lines: 30

There is a manpage for the rint(3) function but it is not present in
libm.  The following patch to /usr/src/lib/libm/common_source/floor.c
allows the C version to be compiled in.  

After applying the patch, cd to /usr/src/lib/libm, do a "make" and
"make install", then maybe a "make clean".  libm will then contain
the rint function.

*** floor.c.pre-neosoft	Tue Dec 15 02:16:30 1992
--- floor.c	Tue Dec 15 02:18:51 1992
***************
*** 98,104 ****
  	}
  }
  
- #ifndef national			/* rint() is in ./NATIONAL/support.s */
  /*
   * algorithm for rint(x) in pseudo-pascal form ...
   *
--- 98,103 ----
***************
*** 137,140 ****
  	t = x + s;				/* x+s rounded to integer */
  	return (t - s);
  }
- #endif	/* not national */
--- 136,138 ----
-- 
-- Email info@NeoSoft.com for info on getting interactive Internet access.
"Turn on your hot tub by email now.  Ask me how."