Posted by
Kakhkhor Abdijalilov on
URL: http://quantlib.414.s1.nabble.com/Ziggurat-algorithm-for-normal-deviates-tp13305.html
Did anyone implement Ziggurat algorithm already?
I converted one from GSL into C++. In my tests I paired Mersenne
Twister with Acklam's approximation, boost's inverse CDF and Ziggurat
to generate standard normal distribution. Ziggurat method was 3 times
faster than Acklam's approximation and 7 times faster than using
boost's inverse CDF. GSL is licensed under GPL v3, but I adopted only
"matematical formula", the implementation follows the original
Ziggurat paper. My implementation is hardwired to use Mersenne Twister
directly and doesn't rely on GSL. GSL version uses smaller look up
table and exponential distribution for the tails. I might create my
own lookup table, but it would be exactly the same. The math formula
is from the published paper, not from GSL. Given that the only thing I
took from GSL is precomputed look up table, is my implementation
covered by GPL? What do you say?
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev