Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

zignor.cc File Reference


Detailed Description

========================================================================== This code is Copyright (C) 2005, Jurgen A. Doornik. Permission to use this code for non-commercial purposes is hereby given, provided proper reference is made to: Doornik, J.A. (2005), "An Improved Ziggurat Method to Generate Normal Random Samples", mimeo, Nuffield College, University of Oxford, and www.doornik.com/research. or the published version when available. This reference is still required when using modified versions of the code. This notice should be maintained in modified versions of the code. No warranty is given regarding the correctness of this code. ==========================================================================

Author:
Jurgen A. Doornik (Creator)
Author
ejt
Name
Revision
1.1
State
Exp
Date
2007/01/25 20:54:13

Definition in file zignor.cc.

#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zigrandom.h"
#include "zignor.h"

Include dependency graph for zignor.cc:

Go to the source code of this file.

Defines

#define ZIGNOR_C   128
#define ZIGNOR_R   3.442619855899
#define ZIGNOR_V   9.91256303526217e-3
#define ZIGNOR_STORE   64 * 4
#define ZIGNOR_INVM   M_RAN_INVM32
#define ZIGNOR32_STORE   64 * 4

Functions

static double DRanNormalTail (double dMin, int iNegative)
static void zigNorInit (int iC, double dR, double dV)
double DRanNormalZig (void)
double DRanNormalZigVec (void)
void RanNormalSetSeedZig (int *piSeed, int cSeed)
void RanNormalSetSeedZigVec (int *piSeed, int cSeed)
static void zig32NorInit (int iC, double dR, double dV)
double DRanNormalZig32 (void)
double DRanNormalZig32Vec (void)
void RanNormalSetSeedZig32 (int *piSeed, int cSeed)
void RanNormalSetSeedZig32Vec (int *piSeed, int cSeed)
double DRanQuanNormalZig (void)
double DRanQuanNormalZigVec (void)
double DRanQuanNormalZig32 (void)
double DRanQuanNormalZig32Vec (void)

Variables

static double s_adZigX [ZIGNOR_C+1]
static double s_adZigR [ZIGNOR_C]
static unsigned int s_auiZigTmp [ZIGNOR_STORE/4]
static unsigned int s_auiZigBox [ZIGNOR_STORE]
static double s_adZigRan [ZIGNOR_STORE+ZIGNOR_STORE/4]
static int s_cZigStored = 0
static unsigned int s_aiZigRm [ZIGNOR_C]
static double s_adZigXm [ZIGNOR_C+1]
static unsigned int s_auiZig32Ran [ZIGNOR32_STORE]
static unsigned int s_auiZig32Box [ZIGNOR32_STORE]
static int s_cZig32Stored = 0


Tekkotsu v3.0
Generated Fri May 11 20:07:40 2007 by Doxygen 1.4.7