Talk about implied decimal places in FORTRAN style for DATA LIST
[pspp-builds.git] / src / expr-evl.c
index 2ddefec79cb46ac85b3418defd24db750044f92a..d3e02ea1dcbcf6d78270c15ca2fface7a15511ea 100644 (file)
 #include "expr.h"
 #include "exprP.h"
 #include "error.h"
+#include <gsl/gsl_randist.h>
 #include <math.h>
 #include <errno.h>
 #include <stdio.h>
 #include "case.h"
 #include "data-in.h"
+#include "dictionary.h"
 #include "error.h"
 #include "julcal/julcal.h"
 #include "magic.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"
@@ -732,7 +734,7 @@ expr_evaluate (const struct expression *e, const struct ccase *c, int case_idx,
          break;
        case OP_XDATE_JDAY:
          if (sp->f != SYSMIS)
-           sp->f = 86400. * julian_to_jday (sp->f / 86400.);
+           sp->f = julian_to_jday (sp->f / 86400.);
          break;
        case OP_XDATE_MDAY:
          if (sp->f != SYSMIS)
@@ -1121,11 +1123,11 @@ expr_evaluate (const struct expression *e, const struct ccase *c, int case_idx,
          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)
-           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);