From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,8011528f7d77263a,start X-Google-Attributes: gid1014db,public X-Google-Thread: 1164f8,8011528f7d77263a,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-11-09 14:29:17 PST Xref: gmd.de comp.lang.c:34587 comp.sys.dec:11708 Path: gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!lax.pe-nelson.com!milt From: milt@lax.pe-nelson.com (Milt Ratcliff) Newsgroups: comp.lang.c,comp.sys.dec Subject: Rounding double precision numbers Keywords: rounding Message-ID: <910@lax.lax.pe-nelson.com> Date: 9 Nov 93 22:01:17 GMT Followup-To: comp.lang.c Organization: PE-Nelson We are trying to find routines for VMS which will allow double precision numbers to be rounded in a controlled manner. Specifically if the number is exactly 'n.5' the rounding must be to the nearest even integer. For example, 3.5 would round to 4 while 2.5 would round to 2. This is quite easy under SunOS, using irint() to round the number and the ieee_flags() to set the rounding direction, both defined in math.h. All of the include files involved, with SunOS, contain a Sun copyright. Are these ieee routines a standard? If so, who defines it and more importantly are there implementations around which could run under VMS. Incidentally, DEC support claims that neither OSF/1 nor Ultrix contain these routines. -- -- Milt