|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: @ T v
Length: 4118 (0x1016)
Types: TextFile
Notes: @(#)values.h 13.1 (RC International) 91/02/01 */
Names: »values.h«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./usr/include/values.h«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦c6f24efe5⟧ »0007«
└─⟦this⟧ »comp3.0/bsd/usr/include/values.h«
/* @(#)values.h 13.1 (RC International) 91/02/01 */ /* --------------------------------------------------- */ /* | Copyright (c) 1986 MIPS Computer Systems, Inc. | */ /* | All Rights Reserved. | */ /* --------------------------------------------------- */ /* $Header: values.h,v 2000.10 89/05/08 18:18:28 bettina Exp $ */ /* Copyright (c) 1984 AT&T */ /* All Rights Reserved */ /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */ /* The copyright notice above does not evidence any */ /* actual or intended publication of such source code. */ #ifndef _VALUES_H #define _VALUES_H /* These values work with any binary representation of integers * where the high-order bit contains the sign. */ /* A number used normally for size of a shift */ #define BITSPERBYTE 8 #define BITS(type) (BITSPERBYTE * (int)sizeof(type)) /* Short, regular and long ints with only the high-order bit turned on */ #define HIBITS ((short)(1 << BITS(short) - 1)) #define HIBITI (1 << BITS(int) - 1) #define HIBITL (1L << BITS(long) - 1) /* Largest short, regular and long int */ #define MAXSHORT ((short)~HIBITS) #define MAXINT (~HIBITI) #define MAXLONG (~HIBITL) /* Various values that describe the binary floating-point representation * _EXPBASE - the exponent base * DMAXEXP - the maximum exponent of a double (as returned by frexp()) * FMAXEXP - the maximum exponent of a float (as returned by frexp()) * DMINEXP - the minimum exponent of a double (as returned by frexp()) * FMINEXP - the minimum exponent of a float (as returned by frexp()) * MAXDOUBLE - the largest double ((_EXPBASE ** DMAXEXP) * (1 - (_EXPBASE ** -DSIGNIF))) * MAXFLOAT - the largest float ((_EXPBASE ** FMAXEXP) * (1 - (_EXPBASE ** -FSIGNIF))) * MINDOUBLE - the smallest double (_EXPBASE ** (DMINEXP - 1)) * MINFLOAT - the smallest float (_EXPBASE ** (FMINEXP - 1)) * DSIGNIF - the number of significant bits in a double * FSIGNIF - the number of significant bits in a float * DMAXPOWTWO - the largest power of two exactly representable as a double * FMAXPOWTWO - the largest power of two exactly representable as a float * _IEEE - 1 if IEEE standard representation is used * _DEXPLEN - the number of bits for the exponent of a double * _FEXPLEN - the number of bits for the exponent of a float * _HIDDENBIT - 1 if high-significance bit of mantissa is implicit * LN_MAXDOUBLE - the natural log of the largest double -- log(MAXDOUBLE) * LN_MINDOUBLE - the natural log of the smallest double -- log(MINDOUBLE) */ /* The following M_ constants are also defined in math.h */ #ifndef M_LN2 #define M_LN2 0.69314718055994530942 #define M_PI 3.14159265358979323846 #define M_SQRT2 1.41421356237309504880 #endif /* M_LN2 */ #include <limits.h> /* The following 4 MAX/MIN-values are also defined in math.h */ #define MAXDOUBLE DBL_MAX /* From limits.h */ #define MAXFLOAT FLT_MAX /* From limits.h */ #define MINDOUBLE DBL_MIN /* From limits.h */ #define MINFLOAT FLT_MIN /* From limits.h */ #define _IEEE 1 #define _DEXPLEN 11 #define _FEXPLEN 8 #define _HIDDENBIT 1 #define _LENBASE 1 #define _EXPBASE (1 << _LENBASE) #define DSIGNIF (BITS(double) - _DEXPLEN + _HIDDENBIT - 1) #define FSIGNIF (BITS(float) - _FEXPLEN + _HIDDENBIT - 1) #define DMAXEXP ((1 << _DEXPLEN - 1) - 1 + _IEEE) #define FMAXEXP ((1 << _FEXPLEN - 1) - 1 + _IEEE) #define DMINEXP (-(DMAXEXP + DSIGNIF - _HIDDENBIT - 3)) #define FMINEXP (-(FMAXEXP + FSIGNIF - _HIDDENBIT - 3)) #define DMAXPOWTWO ((double)(1L << BITS(long) - 2) * \ (1L << DSIGNIF - BITS(long) + 1)) #define FMAXPOWTWO ((float)(1L << FSIGNIF - 1)) #define H_PREC (DSIGNIF % 2 ? (1L << DSIGNIF/2) * M_SQRT2 : 1L << DSIGNIF/2) #define X_EPS (1.0/H_PREC) #define X_PLOSS ((double)(long)(M_PI * H_PREC)) #define X_TLOSS (M_PI * DMAXPOWTWO) #define MAXBEXP DMAXEXP /* for backward compatibility */ #define MINBEXP DMINEXP /* for backward compatibility */ #define MAXPOWTWO DMAXPOWTWO /* for backward compatibility */ #define LN_MAXDOUBLE (M_LN2 * DMAXEXP) #define LN_MINDOUBLE (M_LN2 * (DMINEXP - 1)) #endif /* _VALUES_H */