mirror of
https://git.musl-libc.org/git/musl
synced 2025-02-25 06:34:31 +03:00
add and use internal header for *rand48 lcg
This commit is contained in:
parent
01294da7f7
commit
f9db9eca40
@ -1,4 +1,5 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include "rand48.h"
|
||||||
|
|
||||||
uint64_t __rand48_step(unsigned short *xi, unsigned short *lc)
|
uint64_t __rand48_step(unsigned short *xi, unsigned short *lc)
|
||||||
{
|
{
|
||||||
|
@ -1 +1,3 @@
|
|||||||
|
#include "rand48.h"
|
||||||
|
|
||||||
unsigned short __seed48[7] = { 0, 0, 0, 0xe66d, 0xdeec, 0x5, 0xb };
|
unsigned short __seed48[7] = { 0, 0, 0, 0xe66d, 0xdeec, 0x5, 0xb };
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
#include "rand48.h"
|
||||||
uint64_t __rand48_step(unsigned short *xi, unsigned short *lc);
|
|
||||||
extern unsigned short __seed48[7];
|
|
||||||
|
|
||||||
double erand48(unsigned short s[3])
|
double erand48(unsigned short s[3])
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "rand48.h"
|
||||||
extern unsigned short __seed48[7];
|
|
||||||
|
|
||||||
void lcong48(unsigned short p[7])
|
void lcong48(unsigned short p[7])
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
#include "rand48.h"
|
||||||
uint64_t __rand48_step(unsigned short *xi, unsigned short *lc);
|
|
||||||
extern unsigned short __seed48[7];
|
|
||||||
|
|
||||||
long nrand48(unsigned short s[3])
|
long nrand48(unsigned short s[3])
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
#include "rand48.h"
|
||||||
uint64_t __rand48_step(unsigned short *xi, unsigned short *lc);
|
|
||||||
extern unsigned short __seed48[7];
|
|
||||||
|
|
||||||
long jrand48(unsigned short s[3])
|
long jrand48(unsigned short s[3])
|
||||||
{
|
{
|
||||||
|
4
src/prng/rand48.h
Normal file
4
src/prng/rand48.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
uint64_t __rand48_step(unsigned short *xi, unsigned short *lc);
|
||||||
|
extern unsigned short __seed48[7];
|
@ -1,7 +1,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "rand48.h"
|
||||||
extern unsigned short __seed48[7];
|
|
||||||
|
|
||||||
unsigned short *seed48(unsigned short *s)
|
unsigned short *seed48(unsigned short *s)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user