function [u,x] = rand_num(s)

% Simple random number generator

% s = seed

%mbrealscalar(s);

out = zeros(1,2) ;

a = 16807;

m = 2147483647;

xx = a*s  ;

x = xx - (floor(xx/m)*m) ;

u = x/m ;


