Re: RND contest - rnd.exe (0/1)
- From: "¬a\\/b" <al@xxx>
- Date: Thu, 23 Feb 2006 16:32:35 +0100
On 23 Feb 2006 09:25:02 GMT, Betov <betov@xxxxxxx> wrote:
"¬a\\/b" <al@xxx> écrivait news:6bmqv1hlpi9mmdpmh1kfi6all7sb8ctacg@
4ax.com:
if i push the button "Gauss" on menu of rosasm Rnddemo
it *seems* to me that in the picture there are as rectangles
of points (if especially increase the number of point or change the
windows in a rectangle distant from a square)
Probably. The last version of:
< http://betov.free.fr/RndCompare.exe >
in your test if the colour is green and there are 160000 dots
i see lines in your rand routine i use + for increment dimension
my routine seems have no problem until now
if someone wants to try the function to call is "_RND_uv" this should
be the rosasm code
[base: D$ 02B7E6D5D, 0B29DDD, 07AFDB2D, 04A21531, 0461, 0AF3FD,
045DDA1
0C056D, 06FC5D, 01E669, 0BB4F5, 045DDA1, 077B62D,
04A649D
018269, 044055D]
[seed: D$ 0302D, 01151, 0DE, 02C, 01CBE, 0B2A9, 0D05, 01EC6, 0C0410
026A0, 017E13, 013277, 0114BC, 0BE8A6, 011C0, 01EC5,
084D227]
[seed0: D$ 07B, 011E2, 0AAE1, 01331, 03129, 0AD18, 01EC2, 060C, 03DAD
016D8, 01EA4, 08706, 0BF9C9, 06F9A1, 0BF6FB, 01EA8,
01354E
0B039, 0, 0]
[index: d$ 0, 0]
[index1: d$ 0, 0]
[basea: d$ 31415821]
[seeda: d$ 123]
[dieci: d$ 10, 0]
[cento: d$ 100, 0]
; uint _RND_lineare_m()
; dd, .base=31415821, .seed=123;
_RND_lineare_m:
push edx
mov eax, D$basea
mul D$seeda
inc eax
mov D$seeda, eax
pop edx
ret
; 0 r, 4 c, 8 Ra, 12 @Min, 16 @Max
_RND_RangeLineare_m:
push ecx
push edx
call _RND_lineare_m
mov ecx, D$esp+16
sub ecx, D$esp+12
cmp ecx, 0
jne c0>
inc ecx
c0:
mov edx, 0
div ecx
mov eax, edx
add eax, D$esp+12
pop edx
pop ecx
ret 8
; uint RND_MultiL(base, seed, seed0)
; 0 b, 4 r, 8 c, 12 Ra, 16@Base, 20@Seed, 24@Seed0
RND_MultiL:
push ecx
push edx
push ebx
mov edx, D$esp+16
mov ecx, D$esp+20
mov ebx, D$edx
mov eax, D$ecx
mul ebx
inc eax
mov edx, D$esp+24
mov edx, D$edx
mov D$ecx, eax
cmp eax, edx
jne c0>
call _RND_lineare_m
xor eax, ebx
test eax, 1
jnz l0>
inc eax
l0: ; cambia base ma dispari
mov edx, D$esp+16
mov D$edx, eax
call _RND_lineare_m ; cambia seed0
mov edx, D$esp+24
xor D$edx, eax
mov eax, D$esp+20 ; cambia seed=seed0 e lo ritorna
mov edx, D$edx
mov D$eax, edx
mov eax, edx
c0:
pop ebx
pop edx
pop ecx
ret 12
; eax:uint RND_Multilinear(void);
; risultato in eax numero pseudocasuale tra 0 e 0x7FFFFFFF
_RND_Multilinear_m:
push ebx
push ecx
push edx
; int 3
mov eax, D$index1
lea ebx, D$base+eax*4
lea ecx, D$seed+eax*4
lea edx, D$seed0+eax*4
push edx
push ecx
push ebx
call RND_MultiL
shr eax, 1
mov bl, ah
and ebx, 0Fh
mov D$index1, ebx
bswap eax ; 0..7<->24..31, 8..15<->16..23
test eax, 080000000h
jz c0>
or ax, 080h
and eax, 07FFFFFFFh
c0:
pop edx
pop ecx
pop ebx
ret
; eax:uint _RND_RangeMLineare_m(uint min, uint max)
; risultato in eax numero pseudocasuale tra min e max
; 0 r, 4 c, 8 Ra, 12 @Min, 16 @Max
_RND_RangeMLineare_m:
push ecx
push edx
call _RND_Multilinear_m
mov ecx, D$esp+16
sub ecx, D$esp+12
cmp ecx, 0
jne c0>
inc ecx
c0:
mov edx, 0
div ecx
mov eax, edx
add eax, D$esp+12
pop edx
pop ecx
ret 8
; s= 0ra, 4max
_RND_uv:
mov eax, D$esp+4
push eax | push 0 | call _RND_RangeMLineare_m
ret 4
_______________________________________________________________________________________
Show that the first Routine has a deffects,.
when you make use of the Window Size moving
(with [+] or [-]).
Betov.
< http://rosasm.org >
- Follow-Ups:
- Re: RND contest - rnd.exe (0/1)
- From: Spam Killer
- Re: RND contest - rnd.exe (0/1)
- References:
- Re: RND contest
- From: Betov
- Re: RND contest
- From: Alex McDonald
- Re: RND contest
- From: Betov
- Re: RND contest
- From: Dragontamer
- Re: RND contest
- From: Betov
- Re: RND contest
- From: Dragontamer
- Re: RND contest
- From: Betov
- Re: RND contest - rnd.exe (0/1)
- From: ¬a\\/b
- Re: RND contest - rnd.exe (0/1)
- From: Betov
- Re: RND contest
- Prev by Date: Re: hex 0x0000 to 0000:0000 format
- Next by Date: Re: Ideal computer language from scratch?
- Previous by thread: Re: RND contest - rnd.exe (0/1)
- Next by thread: Re: RND contest - rnd.exe (0/1)
- Index(es):