values.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1989 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
#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 */
#if gcos
#define BITSPERBYTE 9
#else
#define BITSPERBYTE 8
#endif
/* short, regular and long ints with only the high-order bit turned on */
/* largest short, regular and long int */
/* 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)
* LN_MAXFLOAT - the natural log of the largest float
* LN_MINFLOAT - the natural log of the smallest float
*/
#define MAXDOUBLE 1.797693134862315708e+308
#define MAXFLOAT ((float)3.40282346638528860e+38)
#define MINDOUBLE 4.94065645841246544e-324
#define MINFLOAT ((float)1.40129846432481707e-45)
#define _IEEE 1
#define _DEXPLEN 11
#define _HIDDENBIT 1
#define LN_MAXFLOAT 8.8722839052068e+01
#define LN_MINFLOAT -1.03278929903432e+02
#endif
#define MAXDOUBLE 1.701411834604692293e+38
#define MAXFLOAT ((float)1.701411733192644299e+38)
/* The following is kludged because the PDP-11 compilers botch the simple form.
The kludge causes the constant to be computed at run-time on the PDP-11,
even though it is still "folded" at compile-time on the VAX. */
#define _IEEE 0
#define _DEXPLEN 8
#define _HIDDENBIT 1
#endif
#if gcos
#define MAXDOUBLE 1.7014118346046923171e+38
#define MAXFLOAT ((float)1.7014118219281863150e+38)
#define MINDOUBLE 2.9387358770557187699e-39
#define _IEEE 0
#define _DEXPLEN 8
#define _HIDDENBIT 0
#endif
#if u370
#define _LENBASE 4
#else
#define _LENBASE 1
#endif
#define _FEXPLEN 8
#define M_LN2 0.69314718055994530942
#define M_PI 3.14159265358979323846
#define M_SQRT2 1.41421356237309504880
#endif /*!_values_h*/