File:  [CSRG BSD Unix] / 43BSDTahoe / usr.lib / libF77 / range.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:58 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43tahoe
BSD 4.3tahoe

/*
 * Copyright (c) 1980 Regents of the University of California.
 * All rights reserved.  The Berkeley software License Agreement
 * specifies the terms and conditions for redistribution.
 *
 *	@(#)range.c	5.3	10/30/86
 *
 * routines to return extreme values
 * VERY MACHINE DEPENDENT
 */

union fi
{	float	f;
	long	i;
} ;

union dj
{	double	d;
	long	j[2];
} ;

float
flmax_()
{
	union fi n;
#if	pdp11
	n.i = 0x7fffffffL;
#else	pdp11
#if	vax
	n.i = 0xffff7fff;
#else	vax
#if	tahoe
	n.i = 0x7fffffffL;
#else	tahoe
	UNKNOWN MACHINE!
#endif	tahoe
#endif	vax
#endif	pdp11
	return(n.f);
}

double
dflmax_()
{
	union dj n;
#if	pdp11
	n.j[0] = 0x7fffffffL;
	n.j[1] = 0xffffffffL;
#else	pdp11
#if	vax
	n.j[0] = 0xffff7fff;
	n.j[1] = 0xffffffff;
#else	vax
#if	tahoe
	n.j[0] = 0x7fffffffL;
	n.j[1] = 0xffffffffL;
#else	tahoe
	UNKNOWN MACHINE!
#endif	tahoe
#endif	vax
#endif	pdp11
	return(n.d);
}

float
flmin_()
{
	union fi n;
#if	pdp11
	n.i = 0x00800000L;
#else	pdp11
#if	vax
	n.i = 0x00000080;
#else	vax
#if	tahoe
	n.i = 0x00800000L;
#else	tahoe
	UNKNOWN MACHINE!
#endif	tahoe
#endif	vax
#endif	pdp11
	return(n.f);
}

double
dflmin_()
{
	union dj n;
#if	pdp11
	n.j[0] = 0x00800000L;
	n.j[1] = 0;
#else	pdp11
#if	vax
	n.j[0] = 0x00000080;
	n.j[1] = 0;
#else	vax
#if	tahoe
	n.j[0] = 0x00800000L;
	n.j[1] = 0;
#else	tahoe
	UNKNOWN MACHINE!
#endif	tahoe
#endif	vax
#endif	pdp11
	return(n.d);
}

long int
inmax_()
{
	return(0x7fffffffL);
}


float
ffrac_()
{
	union fi n;
#if	pdp11
	n.i = 0x35000000L;
#else	pdp11
#if	vax
	n.i = 0x00003500;
#else	vax
#if	tahoe
	n.i = 0x35000000L;
#else	tahoe
	UNKNOWN MACHINE!
#endif	tahoe
#endif	vax
#endif	pdp11
	return(n.f);
}

double
dffrac_()
{
	union dj n;
#if	pdp11
	n.j[0] = 0x25000000L;
	n.j[1] = 0;
#else	pdp11
#if	vax
	n.j[0] = 0x00002500;
	n.j[1] = 0;
#else	vax
#if	tahoe
	n.j[0] = 0x25000000L;
	n.j[1] = 0;
#else	tahoe
	UNKNOWN MACHINE!
#endif	tahoe
#endif	vax
#endif	pdp11
	return(n.d);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.