Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeder.erje.net!news.stack.nl!.POSTED!not-for-mail From: Willem Newsgroups: comp.programming Subject: Re: 64 bit code Date: Sat, 13 Oct 2012 12:34:57 +0000 (UTC) Organization: Stack Usenet News Service Lines: 32 Message-ID: References: <507595db$0$6898$e4fe514c@news2.news.xs4all.nl> <162dnU-Rw5IpVOrNnZ2dnUVZ8qCdnZ2d@bt.com> NNTP-Posting-Host: turtle.stack.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: mud.stack.nl 1350131697 14912 2001:610:1108:5010::132 (13 Oct 2012 12:34:57 GMT) X-Complaints-To: abuse@stack.nl NNTP-Posting-Date: Sat, 13 Oct 2012 12:34:57 +0000 (UTC) User-Agent: slrn/0.9.9p1 (FreeBSD) Xref: csiph.com comp.programming:2339 BartC wrote: ) If the hardware can directly deal with 64-bit floats, then there is little ) performance loss (compared with attempting 64-bit arithmetic on 32-bit ) hardware, or in software). ) ) The only issue might be memory bandwidth when dealing with large numbers of ) floating point values, although if they are accessed mainly for calculation, ) then it's possible the calculation will dominate the timings. Most CPU's nowadays can do parallel computations on 4 32-bit floats at the same time, thus effectively quadrupling the speed. ) Anyway, I remember using 32-bit floats in an application (originally using ) software emulation), and they weren't of sufficient accuracy for some types ) of problems (mapping for example). They only have 1 in 8 million precision ) after all. Switching to 64-bits solved that problem. ) ) Sometimes there are ways to get around such problems, and continue using ) 32-bits, but sometimes also it's simpler to just use 64! The point is that sometimes, using 32-bit floats is the best option. Showing cases where 64-bit is the best option is irrelevant to that position. SaSW, Willem -- Disclaimer: I am in no way responsible for any of the statements made in the above text. For all I know I might be drugged or something.. No I'm not paranoid. You all think I'm paranoid, don't you ! #EOT