random numbers

Alan J Rosenthal flaps at dgp.toronto.edu
Wed Aug 23 03:02:42 AEST 1989


mburkey at gara.une.oz (Marty) writes:
>  There are two random functions that have been written for C. ...
[ rand() and random() ]
>  If they happen to be in your libraries then they will most likely happen to
>  be in math.h - but if they ain't there then they ain't anywhere.

Hormph!  math.h is for floating-point routines only, despite its name.  I've
never seen one contain a rand() or random() declaration, and I never hope to
see one.  (But I can tell you anyhow, I'd rather see than be one! %)

(However, in the version of QNX we have at my other job, math.h declares atol()
and ftell()!  The authors apparently thought that math.h should declare all
functions whose declarations were absolutely necessary in that they returned
non-two-byte types.  Disgusting.  (stdio.h doesn't declare ftell() on that
system.))

ajr

% probably copyright, as it is half of the work in question.  Three-quarters,
actually, including the last bit of the previous sentence.



More information about the Comp.lang.c mailing list