xref: /freebsd/lib/libc/gen/rand48.h (revision 4b4b7d05560c76c84cd8ca0de6730c9d26008c0d)
14b4b7d05SGarrett Wollman /*
24b4b7d05SGarrett Wollman  * Copyright (c) 1993 Martin Birgmeier
34b4b7d05SGarrett Wollman  * All rights reserved.
44b4b7d05SGarrett Wollman  *
54b4b7d05SGarrett Wollman  * You may redistribute unmodified or modified versions of this source
64b4b7d05SGarrett Wollman  * code provided that the above copyright notice and this and the
74b4b7d05SGarrett Wollman  * following conditions are retained.
84b4b7d05SGarrett Wollman  *
94b4b7d05SGarrett Wollman  * This software is provided ``as is'', and comes with no warranties
104b4b7d05SGarrett Wollman  * of any kind. I shall in no event be liable for anything that happens
114b4b7d05SGarrett Wollman  * to anyone/anything when using this software.
124b4b7d05SGarrett Wollman  */
134b4b7d05SGarrett Wollman 
144b4b7d05SGarrett Wollman #ifndef _RAND48_H_
154b4b7d05SGarrett Wollman #define _RAND48_H_
164b4b7d05SGarrett Wollman 
174b4b7d05SGarrett Wollman #include <math.h>
184b4b7d05SGarrett Wollman #include <stdlib.h>
194b4b7d05SGarrett Wollman 
204b4b7d05SGarrett Wollman void		_dorand48 __P((unsigned short[3]));
214b4b7d05SGarrett Wollman 
224b4b7d05SGarrett Wollman #define	RAND48_SEED_0	(0x330e)
234b4b7d05SGarrett Wollman #define	RAND48_SEED_1	(0xabcd)
244b4b7d05SGarrett Wollman #define	RAND48_SEED_2	(0x1234)
254b4b7d05SGarrett Wollman #define	RAND48_MULT_0	(0xe66d)
264b4b7d05SGarrett Wollman #define	RAND48_MULT_1	(0xdeec)
274b4b7d05SGarrett Wollman #define	RAND48_MULT_2	(0x0005)
284b4b7d05SGarrett Wollman #define	RAND48_ADD	(0x000b)
294b4b7d05SGarrett Wollman 
304b4b7d05SGarrett Wollman #endif /* _RAND48_H_ */
31