help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Re: Reg :: My Gaussian Random Number Code


From: Sumit Adhikari
Subject: [Help-gsl] Re: Reg :: My Gaussian Random Number Code
Date: Wed, 23 Jun 2010 19:38:33 +0200

Thanks, actually I am calling this class in another class where I am
finding the output is quite insensitive, which it should not be. I
gave a second look but not able to bog down the issue! Thanks for the
comment.
Regards,
Sumit

On 6/23/10, John D Lamb <address@hidden> wrote:
> On Tue, 2010-06-22 at 13:04 +0200, Sumit Adhikari wrote:
>
>> P gauss_rand = sigma*y*sqrt(-2.0*log(rad)/rad) ;
>>       return (gauss_rand);
>
> The code looks correct. If you want a quick, simple test generate a few
> hundred pairs of variates and produce a scatter plot.
>
> The code is, however, not particularly efficient. The gsl_ran_gaussian
> code should run faster and the gsl_ran_gaussian_ziggurat code faster
> still. Even a simple Box–Müller generator should be quicker because you
> can get two Gaussian variates from two random numbers.
>
> --
> JDL
>
>
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>

-- 
Sent from my mobile device

Sumit Adhikari,
Institute of Computer Technology,
Faculty of Electrical Engineering,
Vienna University of Technology,
Gußhausstraße 27-29,1040 Vienna



reply via email to

[Prev in Thread] Current Thread [Next in Thread]