From owner-freebsd-chat Wed Oct 21 10:45:16 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA15730 for freebsd-chat-outgoing; Wed, 21 Oct 1998 10:45:16 -0700 (PDT) (envelope-from owner-freebsd-chat@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA15725; Wed, 21 Oct 1998 10:45:08 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id KAA00881; Wed, 21 Oct 1998 10:49:09 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199810211749.KAA00881@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: jobaldwi@vt.edu cc: freebsd-chat@FreeBSD.ORG, bde@FreeBSD.ORG Subject: Re: Bug in rintf()?... In-reply-to: Your message of "Tue, 20 Oct 1998 23:15:18 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 21 Oct 1998 10:49:09 -0700 From: Mike Smith Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > I've been having a problem with rintf() not rounding properly, and I don't > understand the code in /usr/src/libm/common_source/floor.c well enough to > figure out where it is going wrong. Here is the problem I'm having though: We actually use the Sun-supplied math library, so you should be looking at src/lib/msun/src/s_rintf.c > rintf(3.5) returns 4.0 > rintf(3910.5) returns 3910.0 (should return 3911.0) Unfortunately, I don't understand what these functions are doing either, but it's worth noting that rint() suffers the same fate. (Tested under 3.0). -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message