/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2011 Nexenta Systems, Inc. All rights reserved.
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _MATH_H
#define _MATH_H
#include <iso/math_iso.h>
#include <iso/math_c99.h>
#if __cplusplus >= 199711L
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if defined(__cplusplus)
#endif
#ifndef __P
#ifdef __STDC__
#define __P(p) p
#else
#define __P(p) ()
#endif
#endif /* !defined(__P) */
#if defined(__EXTENSIONS__) || defined(_XOPEN_SOURCE) || \
!defined(_STRICT_STDC) && !defined(_POSIX_C_SOURCE)
/*
*/
extern int signgam;
#if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE)
/*
* SVID
*/
#ifdef __STDC__
extern const enum version _lib_version;
#else
extern enum version _lib_version;
#endif
struct exception {
int type;
char *name;
double arg1;
double arg2;
double retval;
};
#define _ABS(x) ((x) < 0 ? -(x) : (x))
#endif /* defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) */
/*
*/
/* BEGIN adopted by C99 */
#if defined(__MATHERR_ERRNO_DONTCARE)
#endif
#pragma does_not_read_global_data(isnan)
#pragma does_not_write_global_data(isnan)
#pragma no_side_effect(isnan)
#endif
/* END adopted by C99 */
#endif
#if defined(__MATHERR_ERRNO_DONTCARE)
#endif
#if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) || \
_XOPEN_SOURCE - 0 >= 500 || \
/*
* SVID & XPG 4.2/5
*/
#if defined(__MATHERR_ERRNO_DONTCARE)
#pragma does_not_read_global_data(scalb)
#pragma does_not_write_global_data(scalb)
#pragma no_side_effect(scalb)
#endif
/* BEGIN adopted by C99 */
/*
* XPG 4.2/5
*/
#if defined(__MATHERR_ERRNO_DONTCARE)
#endif
/* END adopted by C99 */
#endif /* defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) || ... */
#if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE)
/*
* SVID
*/
/*
* IEEE Test Vector
*/
extern double significand __P((double));
#if defined(__MATHERR_ERRNO_DONTCARE)
#pragma does_not_read_global_data(significand)
#pragma does_not_write_global_data(significand)
#pragma no_side_effect(significand)
#endif
extern int signgamf; /* deprecated; use signgam */
extern int signgaml; /* deprecated; use signgam */
extern float significandf __P((float));
extern long double significandl __P((long double));
#if defined(__MATHERR_ERRNO_DONTCARE)
#endif
/*
* for sin+cos->sincos transformation
*/
#if defined(__MATHERR_ERRNO_DONTCARE)
#endif
/* BEGIN adopted by C99 */
/*
* Functions callable from C, intended to support IEEE arithmetic.
*/
#if defined(__MATHERR_ERRNO_DONTCARE)
#endif
/* END adopted by C99 */
/*
* Reentrant version of gamma & lgamma; passes signgam back by reference
* as the second argument; user must allocate space for signgam.
*/
#if defined(__MATHERR_ERRNO_DONTCARE)
#endif
/* BEGIN adopted by C99 */
#if defined(__MATHERR_ERRNO_DONTCARE)
#pragma does_not_read_global_data(modff)
#endif
/* END adopted by C99 */
#if defined(__EXTENSIONS__) || !defined(__cplusplus)
#include <floatingpoint.h>
#endif
#endif /* defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) */
#endif /* defined(__EXTENSIONS__) || defined(_XOPEN_SOURCE) || ... */
#if defined(__cplusplus) && defined(__GNUC__)
#endif
#ifdef __cplusplus
}
#endif
#endif /* _MATH_H */