diff options
author | Andy Wingo <wingo@pobox.com> | 2010-07-22 20:56:55 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-07-26 15:00:49 +0200 |
commit | 4ca48269976e17b2530728cce7df63843a6ce2b0 (patch) | |
tree | 2f72584484bf9f40062dafa4123a962fe17e4eb7 /libguile/random.c | |
parent | 77b139121d0344d8a89f4d8b85739a3447bac196 (diff) | |
download | guile-4ca48269976e17b2530728cce7df63843a6ce2b0.tar.gz |
remove SCM_HAVE_T_INT64, SCM_HAVE_T_UINT64
* libguile/__scm.h:
* libguile/numbers.h:
* libguile/random.c:
* libguile/srfi-4.c:
* libguile/srfi-4.h:
* libguile/numbers.c:
* test-suite/standalone/test-conversion.c:
* libguile/gen-scmconfig.c: As we require 64-bit integers in
configure.ac, remove conditional definition of 64-bit types.
Diffstat (limited to 'libguile/random.c')
-rw-r--r-- | libguile/random.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/libguile/random.c b/libguile/random.c index f028272f6..1350e763a 100644 --- a/libguile/random.c +++ b/libguile/random.c @@ -77,8 +77,6 @@ scm_t_rng scm_the_rng; #define M_PI 3.14159265359 #endif -#if SCM_HAVE_T_UINT64 - unsigned long scm_i_uniform32 (scm_t_i_rstate *state) { @@ -89,38 +87,6 @@ scm_i_uniform32 (scm_t_i_rstate *state) return w; } -#else - -/* ww This is a portable version of the same RNG without 64 bit - * * aa arithmetic. - * ---- - * xx It is only intended to provide identical behaviour on - * xx platforms without 8 byte longs or long longs until - * xx someone has implemented the routine in assembler code. - * xxcc - * ---- - * ccww - */ - -#define L(x) ((x) & 0xffff) -#define H(x) ((x) >> 16) - -unsigned long -scm_i_uniform32 (scm_t_i_rstate *state) -{ - scm_t_uint32 x1 = L (A) * L (state->w); - scm_t_uint32 x2 = L (A) * H (state->w); - scm_t_uint32 x3 = H (A) * L (state->w); - scm_t_uint32 w = L (x1) + L (state->c); - scm_t_uint32 m = H (x1) + L (x2) + L (x3) + H (state->c) + H (w); - scm_t_uint32 x4 = H (A) * H (state->w); - state->w = w = (L (m) << 16) + L (w); - state->c = H (x2) + H (x3) + x4 + H (m); - return w; -} - -#endif - void scm_i_init_rstate (scm_t_i_rstate *state, const char *seed, int n) { |