Newsgroups: | comp.parallel,comp.arch,comp.compilers |
From: | koppel@omega.ee.lsu.edu (David M. Koppelman) |
In-Reply-To: | zxu@monalisa.usc.edu's message of Wed, 23 Nov 1994 00:38:40 GMT |
Status: | R |
Originator: | rmuise@dragon.acadiau.ca |
Organization: | Louisiana State University ECE Dept. |
References: | <3aqv5k$e27@monalisa.usc.edu> |
Date: | Wed, 23 Nov 1994 22:03:45 GMT |
In article <3aqv5k$e27@monalisa.usc.edu> zxu@monalisa.usc.edu (Zhiwei Xu) writes:
> Can any one explain why a C program using single precision (float) is slower
> that the same code using double precision (double)? Please try the following
> code for computing pi. I have tried it on IBM RS6000/250, IBM SP2, Sun4, and
> Sun SS20, and got the same strange timing.
In the RS/6000 all floating point is double precision. When you specify
single-precision operations the double precision result is rounded,
this takes more time. Also, C (at least some implementations) does
computation in double-precision by default.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.