From owner-freebsd-questions Wed Feb 12 16:13:20 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17B2537B401 for ; Wed, 12 Feb 2003 16:13:19 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7345243F3F for ; Wed, 12 Feb 2003 16:13:18 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.6/8.12.6) id h1D0DGNu099566; Wed, 12 Feb 2003 18:13:16 -0600 (CST) (envelope-from dan) Date: Wed, 12 Feb 2003 18:13:16 -0600 From: Dan Nelson To: Parveen Patel Cc: freebsd-questions@FreeBSD.ORG Subject: Re: floating point in the kernel Message-ID: <20030213001316.GD1980@dan.emsphone.com> References: <20030212124123.M11977-100000@bas.flux.utah.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030212124123.M11977-100000@bas.flux.utah.edu> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.3i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Feb 12), Parveen Patel said: > Can I use floating point operations inside the FreeBSD kernel version > 4.7-stable? It used to be a policy not to use it for obvious > performance probelms. You're not supposed to. I think this was the last time it was brought up: http://groups.google.com/groups?threadm=746alr%24d44%241%40FreeBSD.csie.NCTU.edu.tw > Are there any known work arounds? Like some standard efficient > techniques to convert floating point operations to fixed point > operations without losing too much precision. Multiply your numbers by 10^9, store everything in long longs, and write your own printf_fake_fp function that shifts the decimal point? -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message