projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed a bug which crept into the npplot function
[pspp]
/
src
/
expr-evl.c
diff --git
a/src/expr-evl.c
b/src/expr-evl.c
index 8628cfd3c3b5c776aca4146b8c4497045df8c5c0..d3e02ea1dcbcf6d78270c15ca2fface7a15511ea 100644
(file)
--- a/
src/expr-evl.c
+++ b/
src/expr-evl.c
@@
-34,6
+34,7
@@
#include "expr.h"
#include "exprP.h"
#include "error.h"
#include "expr.h"
#include "exprP.h"
#include "error.h"
+#include <gsl/gsl_randist.h>
#include <math.h>
#include <errno.h>
#include <stdio.h>
#include <math.h>
#include <errno.h>
#include <stdio.h>
@@
-46,7
+47,7
@@
#include "misc.h"
#include "moments.h"
#include "pool.h"
#include "misc.h"
#include "moments.h"
#include "pool.h"
-#include "
random
.h"
+#include "
settings
.h"
#include "str.h"
#include "var.h"
#include "vfm.h"
#include "str.h"
#include "var.h"
#include "vfm.h"
@@
-1122,11
+1123,11
@@
expr_evaluate (const struct expression *e, const struct ccase *c, int case_idx,
break;
case OP_NORMAL:
if (sp->f != SYSMIS)
break;
case OP_NORMAL:
if (sp->f != SYSMIS)
- sp->f
*= rng_get_double_normal (pspp_rng ()
);
+ sp->f
= gsl_ran_gaussian (get_rng (), sp->f
);
break;
case OP_UNIFORM:
if (sp->f != SYSMIS)
break;
case OP_UNIFORM:
if (sp->f != SYSMIS)
- sp->f *=
rng_get_double (pspp
_rng ());
+ sp->f *=
gsl_rng_uniform (get
_rng ());
break;
case OP_SYSMIS:
sp->f = sp->f == SYSMIS || !finite (sp->f);
break;
case OP_SYSMIS:
sp->f = sp->f == SYSMIS || !finite (sp->f);