/*
* 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 (c) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _VALUES_H
#define _VALUES_H
#include <sys/isa_defs.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* 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 */
/* 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 -- log(MAXFLOAT)
* LN_MINFLOAT - the natural log of the smallest float -- log(MINFLOAT)
*/
/*
* Currently, only IEEE-754 format is supported.
*/
#if defined(_IEEE_754)
#else
/* #error is strictly ansi-C, but works as well as anything for K&R systems. */
#error "ISA not supported"
#endif
#define FH_PREC \
#ifdef __cplusplus
}
#endif
#endif /* _VALUES_H */