caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Chris Hecker <checker@d6.com>
To: ortmann@us.ibm.com
Cc: caml-list@inria.fr
Subject: Re: single-precision floats, etc.
Date: Sat, 28 Oct 2000 23:18:23 -0700	[thread overview]
Message-ID: <4.3.2.7.2.20001028231318.02df0d30@shell16.ba.best.com> (raw)
In-Reply-To: <OF320DEF29.56B837F4-ON86256985.0076CC69@RCHLAND.IBM.COM>


>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



  reply	other threads:[~2000-10-30  7:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-27 21:39 ortmann
2000-10-29  6:18 ` Chris Hecker [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-10-19 23:50 David Gurr
2000-10-20 13:02 ` jean-marc alliot
2000-10-18  1:17 David Gurr
2000-10-18  9:56 ` Chris Hecker
2000-10-17 16:10 Damien Doligez
2000-10-18  8:39 ` Remi VANICAT
2000-10-18  8:41 ` Fermin Reig
2000-10-18  9:51 ` Chris Hecker
     [not found] <Chris Hecker's message of "Mon, 16 Oct 2000 11:20:59 -0700">
2000-10-16 18:20 ` Chris Hecker
2000-10-18 13:53   ` Pierre.Boulet
2000-10-18 15:20     ` Chris Hecker
2000-10-19 11:28       ` Stephan Houben
2000-10-19 11:37       ` Xavier Leroy
2000-10-20  2:18         ` Chris Hecker
2000-10-19  9:11   ` Xavier Leroy
2000-10-23 13:28     ` Charles Martin
2000-10-25  3:22       ` Chris Hecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.3.2.7.2.20001028231318.02df0d30@shell16.ba.best.com \
    --to=checker@d6.com \
    --cc=caml-list@inria.fr \
    --cc=ortmann@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).