head	1.3;
access
	monica
	thoth
	fjsoria
	ljr;
symbols;
locks; strict;
comment	@// @;


1.3
date	94.12.15.22.58.17;	author ljr;	state Exp;
branches;
next	1.2;

1.2
date	94.12.15.21.52.34;	author ljr;	state Exp;
branches;
next	1.1;

1.1
date	94.12.01.17.31.14;	author fjsoria;	state Exp;
branches;
next	;


desc
@for compatability issues for the random functions
used in pointtest for each of the ports
@


1.3
log
@Added log.
@
text
@// -*- C++ -*-

// $Log$
// Revision 1.2	 1994/12/15  21:52:34  ljr
// added drand48 and lrand48 hacks for BC++
//
// Revision 1.1  1994/12/01  17:31:14  fjsoria
// Initial revision

#ifndef IA_RAND48_H
#define IA_RAND48_H

#ifdef __GNUC__

// external references for random functions for G++
extern "C" {
  double drand48(void);
  long lrand48(void);
}
#endif // __GNUC__

#ifdef __BCPLUSPLUS__

#include <stdlib.h>
#include <values.h>

// drand48 and lrand48 hacks for BC++
// note that random(n) returns [0, n-1]
extern "C" {
double drand48(void)
{
   return ((double)random(MAXINT)) / ((double)(MAXINT));
}

long lrand48(void)
{
   return (long)(((double)MAXLONG) * drand48());
}

} // extern "C"

#endif // __BCPLUSPLUS__

#endif // IA_RAND48_H
@


1.2
log
@added drand48 and lrand48 hacks for BC++
@
text
@d3 7
@


1.1
log
@Initial revision
@
text
@a1 1
// external references for random functions
d3 2
d7 2
d10 2
a11 2
  double drand48();
  long lrand48();
d13 6
a18 1
#endif
d20 7
d28 4
d33 1
d35 1
d37 1
@
