From owner-freebsd-bugs Mon Mar 29 14:20:24 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 6C41814C27 for ; Mon, 29 Mar 1999 14:20:18 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id OAA65747; Mon, 29 Mar 1999 14:20:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from ma-1.rootsweb.com (ma-1.rootsweb.com [209.192.148.153]) by hub.freebsd.org (Postfix) with ESMTP id 9F32714C27 for ; Mon, 29 Mar 1999 14:19:17 -0800 (PST) (envelope-from twp@ma-1.rootsweb.com) Received: (from twp@localhost) by ma-1.rootsweb.com (8.9.3/8.9.3) id RAA11713; Mon, 29 Mar 1999 17:09:54 -0500 (EST) Message-Id: <199903292209.RAA11713@ma-1.rootsweb.com> Date: Mon, 29 Mar 1999 17:09:54 -0500 (EST) From: twp@rootsweb.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/10863: rint(3) returns erratic results Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 10863 >Category: bin >Synopsis: rint(3) returns erratic results >Confidential: yes >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 29 14:20:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Tim Pierce >Release: FreeBSD 2.2.7-RELEASE i386 >Organization: RootsWeb Genealogical Data Cooperative >Environment: >Description: rint(3) appears to return inconsistent results for some inputs. For example, it rounds both 5.5 and 6.5 to 6. If rint always rounds up, it should round these numbers to 6 and 7; if it always rounds down, it should round these numbers to 5 and 6; if it always rounds to the nearest integer, it should round to 6 and 7. Is there any situation where it would be correct to round both 5.5 and 6.5 to 6? >How-To-Repeat: #include main() { printf ("%f\n", rint(5.5)); printf ("%f\n", rint(6.5)); } >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message