From kde-kimageshop Wed Apr 01 21:23:47 2009 From: Matthew Woehlke Date: Wed, 01 Apr 2009 21:23:47 +0000 To: kde-kimageshop Subject: Re: krita random_generator failure Message-Id: X-MARC-Message: https://marc.info/?l=kde-kimageshop&m=123862134706018 Matthew Woehlke wrote: > Cyrille Berger wrote: >> On Tue, Mar 31, 2009, Matthew Woehlke wrote: >>> Since producing the same number twice in a row is no less random than >>> any other number, >> True, the test can be made to check it doesn't happen much. If it only >> happen once or twice out of a million, then it should be ok. > > Yes, that's probably better. Oddly enough it seems to happen on every > seed I've tried (not many, admittedly) :-(, but not in the same place. > > With seed==10000 I see 7 occurrences (with both current svn and your > previous variation; I think in the same spots, even, so it seems my > latest change didn't have an effect either way on this). Actually... there's something seriously wrong with the test (or the build thereof). My best guess it it's pulling the installed library and not the built one. I can change randomAt() to explicitly return 0, and I get the same test results! (On a related note, it's much slower than it needs to be, the "neighborhood" iteration should be over [0,3), not [-2,3); otherwise you end up testing most pairs twice.) -- Matthew Please do not quote my e-mail address unobfuscated in message bodies. -- "Lost a planet, Obi Wan has? How embarrassing..." -- Yoda (Star Wars II: Attack of the Clones) _______________________________________________ kimageshop mailing list kimageshop@kde.org https://mail.kde.org/mailman/listinfo/kimageshop