From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA11225 for caml-red; Mon, 30 Oct 2000 08:21:07 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id HAA27007 for ; Sun, 29 Oct 2000 07:17:06 +0100 (MET) Received: from whiz.mfi.com (whiz.mfi.com [198.71.19.34]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id e9T6H4P22291 for ; Sun, 29 Oct 2000 07:17:05 +0100 (MET) Received: from checkerlap.d6.com ([10.0.40.162]) by whiz.mfi.com (8.8.8+Sun/8.8.8) with ESMTP id XAA15579; Sat, 28 Oct 2000 23:16:07 -0700 (PDT) Message-Id: <4.3.2.7.2.20001028231318.02df0d30@shell16.ba.best.com> X-Sender: def6@shell16.ba.best.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Sat, 28 Oct 2000 23:18:23 -0700 To: ortmann@us.ibm.com From: Chris Hecker Subject: Re: single-precision floats, etc. Cc: caml-list@inria.fr In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: weis@pauillac.inria.fr >Just curious ... would single-precision floats have been accurate enough >for the ICFP programming contest? Most numerical analysis texts point out that you rarely need double precision floating point numbers for accuracy or precision if your algorithm is properly constructed. Range is a different matter, but I doubt the raytracer world was the size of the solar system. For any reasonably ranged problem, singles are fine. Of course, this is like saying 16 bit ints are fine because you can do most algorithms with them if you're careful. Eventually doubles will replace singles because hey, more range and precision is better, and computers are fast and ram is cheap. Still, we don't store strings as arrays of 32 bit numbers because a) we don't need to, and b) it's wasteful. So, I'd assume singles will be around for a long time to come. Do you really need better than 10e-6 accuracy (that's about unit roundoff for a single). >And how fast might they have been? I can't answer that (assuming you were asking me about this in the first place). Multiplies and adds are the same speed on most CPUs, so cache effects would have been the governing variable here. Chris