lkml.org 
[lkml]   [2002]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: floating point exception
On Wed, Jan 16, 2002 at 05:05:55PM -0500, Richard B. Johnson wrote:

> for(;;)
> {
> srand(seed);
> z = x;
> for(i = 0; i < MAX_FLOAT; i++)
> *z++ = cos((double) rand());
> srand(seed);
> z = y;
> for(i = 0; i < MAX_FLOAT; i++)
> *z++ = cos((double) rand());
> if(memcmp(x, y, MAX_FLOAT * sizeof(double)))
> break;
> seed = rand();

Um, maybe I'm not reading this properly.. why are you randing, doing 1 set and
then using different random values for the other set ?

--

Mark Zealey
mark@zealos.org
mark@itsolve.co.uk

UL++++>$ G!>(GCM/GCS/GS/GM) dpu? s:-@ a16! C++++>$ P++++>+++++$ L+++>+++++$
!E---? W+++>$ N- !o? !w--- O? !M? !V? !PS !PE--@ PGP+? r++ !t---?@ !X---?
!R- b+ !tv b+ DI+ D+? G+++ e>+++++ !h++* r!-- y--

(www.geekcode.com)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:23    [W:0.050 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site