Post Reply 
Which formula does randNorm use?
10-30-2017, 09:11 PM
Post: #2
RE: Which formula does randNorm use?
The CAS code for randNorm is
Code:

    double u=giac_rand(contextptr)/(rand_max2+1.0);
    double d=giac_rand(contextptr)/(rand_max2+1.0);
    return std::sqrt(-2*std::log(u))*std::cos(2*M_PI*d);
Frankly speaking I used the formula without taking care of why it works, it's not really CAS...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Which formula does randNorm use? - parisse - 10-30-2017 09:11 PM



User(s) browsing this thread: 1 Guest(s)