Fix a few places in examples where C reference implementaion had a double-precision

fp constant undesirably causing computation to be done in double precision.

Makes C scalar versions of the options pricing models, rt, and aobench 3-5% faster.
Makes scalar version of noise about 15% faster.
Others are unchanged.
This commit is contained in:
Matt Pharr
2011-09-01 16:31:22 -07:00
parent eb7913f1dd
commit 99221f7d17
6 changed files with 24 additions and 24 deletions

View File

@@ -36,7 +36,7 @@ static int mandel(float c_re, float c_im, int count) {
float z_re = c_re, z_im = c_im;
int i;
for (i = 0; i < count; ++i) {
if (z_re * z_re + z_im * z_im > 4.)
if (z_re * z_re + z_im * z_im > 4.f)
break;
float new_re = z_re*z_re - z_im*z_im;