English
Forum

Rnd() of greater value as Long

 
- Page 1 -



Jörg
Sellmeyer
gives it a Possibility a Zufallszahl a area ulterior the Longgrenze To detect.

If I
Var n! = 4^16
Print Rnd(n!)
use, comes only 0 out. Gibts there what by Api or so?
Greeting
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
12/08/07  
 



 
- Page 1 -



RGH
Pardon:
an better (korrekte) distribution the Zufallszahlen get one naturally with:
CompileMarkSeparation
Zufall! = 4^(rnd(8)+1) * rnd(4^8)
>

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
12/11/07  
 




RGH
... and ex the next XProfan-Version there too whom Sonderfall Rnd(), the bislang you don't say so was. the Result is then one Flloatwert >= 0 and < 1. Dann löst Du Dein Problem einfach mit:
CompileMarkSeparation
zufall! = rnd() * 4^16
>

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
12/11/07  
 




Jörg
Sellmeyer
Very beautiful! any combined values are namely somehow gemauschelt and correspond to not the tatsächlichen probability.
leaves itself here very slight understand:
CompileMarkSeparation
 $H Windows.ph
Set(Decimals,0)
Window 300,10 - 800,1010
Cls
SetDialogFont ~GetStockobject($11)
Declare z!,l&,l1&,l2&,z$,i%,i1%,i2%
l&= Create(ListBox,%hwnd,1,10,10,180,Height(%hwnd)-20)
l1&= Create(ListBox,%hwnd,1,212,10,180,Height(%hwnd)-20)
l2&= Create(ListBox,%hwnd,1,414,10,180,Height(%hwnd)-20)

WhileLoop 20670

    Randomize
    z$=Format$(0000000000,Rnd($7fffffff) + Rnd($7fffffff))

    If Left$(z$,2)= 00

        Inc i%

    EndIf

    Case SelectString(l&,-1,z$) = -1:AddString(l&, z$)
    z$=Format$(00000,Rnd(256^2))

    If Left$(z$,2)= 00

        Inc i1%

    EndIf

    Case SelectString(l1&,-1,z$) = -1:AddString(l1&, z$) +   + Format$(0000000000,Rnd(256^2))
    z$=Format$(00000,(Rnd(256)+1) * Rnd(256))

    If Left$(z$,2)= 00

        Inc i2%

    EndIf

    Case SelectString(l2&,-1,z$) = -1:AddString(l2&, z$) +   + Format$(0000000000,Rnd(256^2))
    WindowTitle Str$(i%) +   + Str$(i1%) +   + Str$(i2%) +   + Str$(&Loop)

Wend

waitkey
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
12/11/07  
 



RGH
... and ex the next XProfan-Version there too whom Sonderfall Rnd(), the bislang you don't say so was. the Result is then one Flloatwert >= 0 and < 1. Dann löst Du Dein Problem einfach mit:
CompileMarkSeparation
zufall! = rnd() * 4^16
>

Greeting
Roland


Jau this is super!

@Jörg: You greifst so on a vergänglichen BeitragsCache To, Frank having its Posting deleted.
 
12/11/07  
 




Jörg
Sellmeyer
These new Possibility is in the Help none erwähnt!
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/07/08  
 



 
- Page 2 -



Manfred
Barei
Hello Jörg,

can still too none, Roland has still written ex the next XProfan-Version.

Grus
Manfred
 
Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 |
08/07/08  
 




Jac
de
Lad
i think time, so was XProfan 11 meant.
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
08/07/08  
 




RGH
Jörg Sellmeyer
These new Possibility is in the Help none erwähnt!


ought to I what forget having? I look today evening time to.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
08/07/08  
 




Jörg
Sellmeyer
Manfred Barei
Hello Jörg,

can still too none, Roland has still written ex the next XProfan-Version.

Grus
Manfred


very! And if You you The Datümer the Posts ansiehst...

P.s.
jolly - now again Grus?
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/07/08  
 




RGH
RGH

Jörg Sellmeyer
These new Possibility is in the Help none erwähnt!


ought to I what forget having? I look today evening time to.

Greeting
Roland


Ha! in the actually Help (latest Version of 4. august) is it erwähnt!

so, and now create I a couple master-CDs. nothing goes More!

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
08/07/08  
 




Jörg
Sellmeyer
OK, have I saponaceous overlooking.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/07/08  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.811 Views

Untitledvor 0 min.
RudiB.05/17/20
Pauli04/15/13
Jörg Sellmeyer11/13/11

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie