Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
General Discussion
»
Other Discussions
»
Math and Science
»
Random Number question
« previous
next »
Print
Pages:
1
[
2
]
Go Down
Author
Topic: Random Number question (Read 8403 times)
0 Members and 1 Guest are viewing this topic.
AngelFish
Is this my custom title?
Administrator
LV12
Extreme Poster (Next: 5000)
Posts: 3242
Rating: +270/-27
I'm a Fishbot
Re: Random Number question
«
Reply #15 on:
March 17, 2011, 04:19:49 am »
Well, actually N provides the upper bound for the random number because everything is (mod N)
Logged
∂²Ψ -(2m(V(x)-E)Ψ
--- = -------------
∂x² ℏ²Ψ
Xeda112358
they/them
Moderator
LV12
Extreme Poster (Next: 5000)
Posts: 4704
Rating: +719/-6
Calc-u-lator, do doo doo do do do.
Re: Random Number question
«
Reply #16 on:
March 17, 2011, 04:23:18 am »
Yeah, sorry
Actually, I just realised I typed up the wrong equation...
What I meant to say is that I multiply rand by floor(rand/N
2
) and then take mod N of that result.
I don't know why I said N
2
provided an upper bound ...
Logged
My pastebin
|
Pokémon Amber
|
Grammer Programming Language
|
BatLib Library
|
Jade Simulator
|
Zeda's Hex Opcodes
|
FileSyst Library
|
CopyProg
|
TPROG
|
GroupRead
|
Lbl Read/Write
|
Z80 Floating Point Routines
(
z80float on GitHub
)|
Z80 Optimized Routines Repository
AngelFish
Is this my custom title?
Administrator
LV12
Extreme Poster (Next: 5000)
Posts: 3242
Rating: +270/-27
I'm a Fishbot
Re: Random Number question
«
Reply #17 on:
March 17, 2011, 04:27:15 am »
I think you should change it to be n^2. That way your users can scratch their heads trying to figure out how to get Rand mod 2 with integers...
Logged
∂²Ψ -(2m(V(x)-E)Ψ
--- = -------------
∂x² ℏ²Ψ
Print
Pages:
1
[
2
]
Go Up
« previous
next »
Omnimaga
»
Forum
»
General Discussion
»
Other Discussions
»
Math and Science
»
Random Number question