QueryCAT Logo
Search 5,000,000+ questions and answers.

Frequently Asked Questions

Is there a function in verilog to generate random numbers?

EE271/272 Verilog FAQ
Yes. It is $random(seed). The seed is optional. The random number sequence for a given seed (or no seed) will always be the same. This means that in hooking together your verilog modules you did something wrong. On one of your connections, the number of bits that your module expects on a certain port does not match the number of bits of the thing that you hooked it up to.

How To Generate Random Numbers with the RAND() Function?

SQL Server DBA FAQs and Tips - 400 Questions/Tutorials &laqu...
A collection of 14 FAQs on Transact-SQL language character string and binary string operations. Clear answers are provided with tutorial exercises on concatenating character/binary strings; converting Unicode character strings; converting binary strings; inserting new line characters; locating and taking substrings; bitwise operations.

How do I generate random numbers in Python?

Python Library and Extension FAQ
The standard module random implements a random number generator. Usage is simple: import random random.random()

How can I generate random numbers?

A common mistake is to just plug the time of day into a simple PRNG. Those random number generators are fine for doing numerical simulations, but not for cryptography. You need to use a hardware RNG, or use unpredictable data like mouse movements, or use suitable system calls such as to a /dev/random driver, or something similar. For more discussion, see: http://www.cs.berkeley.edu/~daw/rnd/

How can I generate random numbers with a normal or Gaussian distribution?

Frequently Asked Questions: C Language (abridged)
Some semistandard functions have been renamed or replaced over the years; see the full list for details. I'm still getting errors due to library functions being undefined, even though I'm requesting the right libraries.

Does Magsbot have a way to generate random numbers?

Magsbot Help
Yes, there is a random number operator, #, that you can use in numeric expressions. The operator works like a die roll, with the first number being the number of dice and the second number being the type of die. So example, a random number similar to a roll of 3 six-sided dice (or "3d6" in role-playing game terminology) would be expressed as 3#6. More simply, a random number from 1 to 100 would be 1#100. A number from 3 to 7 would be 1#5+2.

How is it possible for a computer to generate non-deterministic or True random numbers?

ComScire - The Random Number Generator Company.
The PCQNG uses a noise component or jitter produced by Phased Locked Loop circuits in the PC which can be precisely determined. This jitter is the source of true entropy which is extracted to produce a sequence of true random numbers. See Design Principles and Testing of the PCQNG 2.0 Device for a detailed technical explanation.

How to generate values from a normally distributed random variable?

FAQ 5
There are several ways in which to do this. You may use the spreadsheet formulas to fill a variable with random values from a normal distribution with a given mean and standard deviation. This is accomplished by using the inverse function for the normal distribution (vnormal(x)).

How do I get random numbers?

Java Programmer's FAQ
The notation "[0,1)" is common math notation for "zero to .9999999 etc" The Sun documents say this returns 0.0 to 1.0, but inspection of the source shows they are wrong. However, due to the inherent inaccuracies of floating point arithmetic, multiplying N by 0.999999 etc can result in an answer of N, not N * .999999 . So watch out when N is big.

How can I generate a random number?

Allegro FAQ
Call srand(time(NULL)) at the beginning of your program, and then use rand()%limit to obtain a pseudo-random number between 0 and limit-1.

Why would I generate a random graph?

Frequently Asked Questions
This is a quick way for a visitor to get a live sample of what the web site has to offer. When a visitor clicks the generate a random graph button, WebGraphing.com returns a complete graph of a randomly generated polynomial function up to degree 3 along with descriptive answers in The Analyzer that explain the mathematics needed to produce the graph by hand.

Can I use Verilog-Mode to do 'generate' like code?

Verilog-Mode FAQ
There's no general way to do this with Verilog-Mode. Obviously you can use AUTOINST to simplify the code, then ifdef, but that isn't very clean. When I've needed to do a true generate, I often read signals with Verilog-Perl, then write the text with printf's or the Perl Text::Template module. I then pass the output of this through Emacs Verilog-Mode --batch, and walla.

How can I use verilog to generate IRSIM test vectors?

EE271/272 Verilog FAQ
By using special verilog system tasks, you can generate an IRSIM .cmd file from a verilog run. Please take a look at the document on snooper modules that is here. When I run my verilog with the snooper module, I get a really ugly looking error. It looks something like: Error! acc_handle_tfarg() [PLI-NOACCARGBSEL] You probably ran verilog without the -x option. The snooper module needs verilog to be called with the -x option. This is the same as using rsimverilog.

How can I convert numbers to strings (the opposite of atoi)? Is there an itoa function?

Infrequently Asked Questions in comp.lang.c
There's frequently an itoa function. Better yet, write your own; it'll be good practice. On some implementations, (char *) x; will convert x to a string.

Why Do The Telephone Numbers Have To Be Random?

FAQ: How We Conduct CBS News Polls, Frequently Asked Questio...
We go to great lengths to make sure that the numbers are picked as randomly as possible. Why is that important? It assures that we get old and young people, rich and poor people, conservative and liberal people ? and everybody in between. Let's say the computer is about to pick a telephone number from your area code and telephone exchange. There are 10,000 possible telephone numbers.

There is a hidden field in the source html with random characters and numbers. Is that normal?

Children's Television Online Filing System FAQ
Yes, this is normal and expected. The current system stores some information in a hidden field which is serialized and zipped. The field appears as a very long stream of random characters. Do not delete or modify this field or the form will become unusable.

How can repeated Quick Pick numbers be random?

Frequently Asked Questions
There is no built-in memory in a random system. Once the numbers are picked in the first board the process starts over again for the next board. The boards are completely unrelated and have no influence on the boards that follow. You have a memory of what happens. The Quick Pick has no memory of what happens. Therefore, a player could have the same set of Quick Pick numbers on the same ticket. Only one individual can claim a lottery ticket.

Can I search for numbers with the find function?

DreamConnect FAQ
Yes, the Smart Find function allows customisable searches of any field and is available in the current upgrade.

Explore Other Topics

How do I obtain a valid fingerprint clearance card?
When is the best time of year to visit Kenya?
Q. How do I burn PS2 games?
Do bears hibernate?
Question #4: What is a temperature rise door?
How long does it take to get a birth or death record?
How can I determine the version number of Microsoft¨ Windows¨ Installer?
What if my permanent residency is in another state?
What are the signs of Cocaine or "Crack" use?
Q-Can I attach my resume? How?
What should I do if I find a stray dog or cat?
What Does YOUR Hip Bone Look Like?
More Questions >>

© Copyright 2007-2009 QueryCAT
About • Webmasters • Contact