Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751362AbXB0AGZ (ORCPT ); Mon, 26 Feb 2007 19:06:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752475AbXB0AGZ (ORCPT ); Mon, 26 Feb 2007 19:06:25 -0500 Received: from tmailer.gwdg.de ([134.76.10.23]:33267 "EHLO tmailer.gwdg.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751356AbXB0AGY (ORCPT ); Mon, 26 Feb 2007 19:06:24 -0500 Date: Tue, 27 Feb 2007 01:05:26 +0100 (MET) From: Jan Engelhardt To: Stephen Hemminger cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [RFC] div64_64 support In-Reply-To: <20070226154413.4ead571a@freekitty> Message-ID: References: <20070223170527.4ca695b2@freekitty> <20070226143127.5c74bec9@freekitty> <20070226154413.4ead571a@freekitty> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Report: Content analysis: 0.0 points, 6.0 required _SUMMARY_ Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 752 Lines: 22 On Feb 26 2007 15:44, Stephen Hemminger wrote: >> >- x = (2 * x + (uint32_t) div64_64(a, x*x)) / 3; >> >+ x = (2 * x + (u32) (a / x*x)) / 3; >> >> Previously there was div64_64(a, x*x) which is equivalent to >> (a)/(x*x), or just: a/(x^2). But now you do a/x*x, which is >> equivalent to a*x/x (in the domain of real numbers). Furthermore, >> a/x*x is a-(a%x), which does not even remotely match a/(x^2). >> >Been there, done that, don't want to repeat it... I am sorry I don't quite follow. Jan -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/