drand48_r - Online Linux Manual PageSection : 3
Updated : 2023-02-05
Source : Linux man-pages 6.03

NAMEdrand48_r, erand48_r, lrand48_r, nrand48_r, mrand48_r, jrand48_r, srand48_r, seed48_r, lcong48_r − generate uniformly distributed pseudo-random numbers reentrantly

LIBRARYStandard C library (libc, −lc)

SYNOPSIS#include <stdlib.h>int drand48_r(struct drand48_data *restrict buffer, double *restrict result); int erand48_r(unsigned short xsubi[3], struct drand48_data *restrict buffer, double *restrict result);int lrand48_r(struct drand48_data *restrict buffer, long *restrict result); int nrand48_r(unsigned short xsubi[3], struct drand48_data *restrict buffer, long *restrict result);int mrand48_r(struct drand48_data *restrict buffer, long *restrict result); int jrand48_r(unsigned short xsubi[3], struct drand48_data *restrict buffer, long *restrict result);int srand48_r(long int seedval, struct drand48_data *buffer); int seed48_r(unsigned short seed16v[3], struct drand48_data *buffer); int lcong48_r(unsigned short param[7], struct drand48_data *buffer);Feature Test Macro Requirements for glibc (see feature_test_macros(7)): All functions shown above: /* glibc >= 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTIONThese functions are the reentrant analogs of the functions described in drand48(3). Instead of modifying the global random generator state, they use the supplied data buffer. Before the first use, this struct must be initialized, for example, by filling it with zeros, or by calling one of the functions srand48_r(), seed48_r(), or lcong48_r().

RETURN VALUEThe return value is 0.

ATTRIBUTESFor an explanation of the terms used in this section, see attributes(7). InterfaceAttributeValue drand48_r(), erand48_r(), lrand48_r(), nrand48_r(), mrand48_r(), jrand48_r(), srand48_r(), seed48_r(), lcong48_r() Thread safetyMT-Safe race:buffer

STANDARDSThese functions are GNU extensions and are not portable.

SEE ALSOdrand48(3), rand(3), random(3)
0
Johanes Gumabo
Data Size   :   10,721 byte
man-lrand48_r.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 182,241
Visitor ID   :     :  
Visitor IP   :   3.137.175.83   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.