[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: krita random_generator failure
From:       Matthew Woehlke <mw_triad () users ! sourceforge ! net>
Date:       2009-04-01 21:23:47
Message-ID: gr0m13$23h$1 () ger ! gmane ! org
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic