Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!mips!twg.com!david From: david@twg.com (David S. Herron) Newsgroups: comp.sys.amiga.tech Subject: Re: Help needed from UNIX buff Message-ID: <7734@gollum.twg.com> Date: 11 Aug 90 00:24:32 GMT References: <10936@wehi.dn.mu.oz> Reply-To: david@twg.com (David S. Herron) Organization: The Wollongong Group, Palo Alto, CA Lines: 36 In article <10936@wehi.dn.mu.oz> BAXTER_A@wehi.dn.mu.oz writes: >I am currently porting (I hope) HPGLtoPS and was wondering: > >What does the UNIX C function rint() do? > >Email would be nice, >Regards Alan Will a Unix beige do instead?? er.. Anyway, I'd never heard of this routine before so I looked it up. It's a new one to the man page I found it on, so it must be pretty recent. Quoting from the SunOS man page: ... double rint(x) double x; ... rint() rounds {\it {\bf x}} to an integral value according to the current IEEE rounding direction. There is an ieee_flags() routine which lets you set various IEEE floating point options. For instance, ieee_flags("set", "direction", "tozero", &out); will set the rounding direction towards zero. Weeeeiiirrrdd.. (useful though..) -- <- David Herron, an MMDF weenie, <- Formerly: David Herron -- NonResident E-Mail Hack <- <- Sign me up for one "I survived Jaka's Story" T-shirt!