Solved

Posted on 1999-11-23
Medium Priority
225 Views
Hi ozo,

what is the numger, 4294967296.0 in "genrand()/4294967296.0"?

Cheers.
0
Question by:learn

LVL 2

Expert Comment

ID: 2230215
This is 2 ** 32. Highest value of
an unsigned 4 byte integer.
0

LVL 85

Accepted Solution

ozo earned 240 total points
ID: 2230228
genrand() in
http://www.math.keio.ac.jp/~nisimura/random/int/mt19937int.c
returns an integer uniformly distributed among 0 to 2^32-1
so genrand()/4294967295.0 would be distributed between 0 and 1
0

Author Comment

ID: 2234610
Hi basant,

Thank you......but this Q is for ozo only :-)

You might like to check my another Q, Q.10236192, to see why I ask such question and why special for ozo.
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
Suggested Courses
Course of the Month6 days, 2 hours left to enroll