From owner-freebsd-chat Wed Oct 21 19:00:55 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA12078 for freebsd-chat-outgoing; Wed, 21 Oct 1998 19:00:55 -0700 (PDT) (envelope-from owner-freebsd-chat@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA12037; Wed, 21 Oct 1998 19:00:45 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id MAA04831; Thu, 22 Oct 1998 12:00:12 +1000 Date: Thu, 22 Oct 1998 12:00:12 +1000 From: Bruce Evans Message-Id: <199810220200.MAA04831@godzilla.zeta.org.au> To: bde@zeta.org.au, mike@smith.net.au Subject: Re: Bug in rintf()?... Cc: bde@FreeBSD.ORG, freebsd-chat@FreeBSD.ORG, jobaldwi@vt.edu Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >> >> rintf(3.5) returns 4.0 >> >> rintf(3910.5) returns 3910.0 (should return 3911.0) >> >> This seems to be correct. rintf() rounds to the nearest integer according >> to the prevailing rounding mode. The default prevailing rounding mode >> is round-to-even. rintf() even seems to get this right for all the >> other rounding modes (towards +Inf, towards -Inf and towards 0). > >Where do you set the rounding mode? The only reference I could find >was fpsetround(), which offers nearest, -inf, +inf and truncate. One way is sufficent. >math(3) lists 3 types for ieee754 (+inf, -inf and 0). Also the standard type (round to even). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message