lkml.org 
[lkml]   [2002]   [Jan]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 16 Jan 2002 22:12:47 +0000
FromMark Zealey <>
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 12:23    [W:0.182 / U:0.070 seconds]
©2003-2008 Jasper Spaans