Re: floating point exception

Mark Zealey (mark@zealos.org)
Wed, 16 Jan 2002 22:12:47 +0000


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/