From owner-freebsd-chat Wed Oct 21 10:58:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA17342 for freebsd-chat-outgoing; Wed, 21 Oct 1998 10:58:30 -0700 (PDT) (envelope-from owner-freebsd-chat@FreeBSD.ORG) Received: from Loki.orland.u91.k12.me.us (Loki.orland.u91.k12.me.us [169.244.111.67]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA17325 for ; Wed, 21 Oct 1998 10:58:21 -0700 (PDT) (envelope-from netmonger@genesis.ispace.com) Received: from Celeris (56k-port4001.ime.net [209.90.195.11]) by Loki.orland.u91.k12.me.us (8.9.1/8.8.8-Loki) with SMTP id NAA02401; Wed, 21 Oct 1998 13:57:08 -0400 (EDT) (envelope-from netmonger@genesis.ispace.com) X-Server-ID: Loki.orland.u91.k12.me.us, OCSNet - Orland Maine USA X-Coord-Name: Drew "Droobie" Baxter, OneNetwork Exchange X-Coord-Addr: Droobie@Openlink.orland.me.us X-Coord-Pager: USA: 207-471-2719, http://pagedroo.orland.me.us Message-Id: <4.1.0.67.19981021135512.00a60230@genesis.ispace.com> X-Sender: netmonger@genesis.ispace.com X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1.0.67 (Beta) Date: Wed, 21 Oct 1998 13:55:57 -0400 To: EddieB , Mike Smith From: Drew Baxter Subject: Re: Bug in rintf()?... Cc: freebsd-chat@FreeBSD.ORG In-Reply-To: References: <199810211749.KAA00881@dingo.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hmm in a CompSci course I'm taking they just move it from a double to an int to cause 'truncation'. Course 4.5 would end up being 4 even, and 4.999999 would be 4 even too.. Truncation and rounding are two totally different commodities. But that's just my two-cents :) At 12:52 PM 10/21/98 -0500, EddieB wrote: > >> >> > rintf(3.5) returns 4.0 >> > rintf(3910.5) returns 3910.0 (should return 3911.0) >> > >I haven't really the slightest clue about coding (Yea I'll admit it) but I >do remember from physics / chemistry classes that .5 #'s are rounded >different. IE: 3.5 rounds to 4.0 and 4.5 also rounds to 4.0. If the # >preceeding the .5 is even it just drops the .5, if the # preceeding the .5 >is odd, it rounds up (you always get an even # as an answer) > >Probably not what is happening with that but I was bored and decided to >write an email :) > >Jon > >EddieB/IRC >IRCop : irc.dragondata.com > NewNet HUB Server > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-chat" in the body of the message --- Drew "Droobie" Baxter Network Admin/Professional Computer Nerd(TM) OneEX: The OneNetwork Exchange 207-942-0275 http://www.droo.orland.me.us My Latest Kernel: FreeBSD 3.0-CURRENT (ONEEX) #14: Mon Oct 19 22:36:58 EDT 1998 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message