math.h revision c58f1213e628a545081c70e26c6b67a841cff880
f808c858fa61e7769218966759510a8b1190dfcfraf * IPRT / No-CRT - math.h.
f808c858fa61e7769218966759510a8b1190dfcfraf * Copyright (C) 2006-2010 Oracle Corporation
f808c858fa61e7769218966759510a8b1190dfcfraf * This file is part of VirtualBox Open Source Edition (OSE), as
f808c858fa61e7769218966759510a8b1190dfcfraf * available from http://www.virtualbox.org. This file is free software;
f808c858fa61e7769218966759510a8b1190dfcfraf * you can redistribute it and/or modify it under the terms of the GNU
f808c858fa61e7769218966759510a8b1190dfcfraf * General Public License (GPL) as published by the Free Software
f808c858fa61e7769218966759510a8b1190dfcfraf * Foundation, in version 2 as it comes in the "COPYING" file of the
f808c858fa61e7769218966759510a8b1190dfcfraf * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
f808c858fa61e7769218966759510a8b1190dfcfraf * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
f808c858fa61e7769218966759510a8b1190dfcfraf * The contents of this file may alternatively be used under the terms
f808c858fa61e7769218966759510a8b1190dfcfraf * of the Common Development and Distribution License Version 1.0
f808c858fa61e7769218966759510a8b1190dfcfraf * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
f808c858fa61e7769218966759510a8b1190dfcfraf * VirtualBox OSE distribution, in which case the provisions of the
f808c858fa61e7769218966759510a8b1190dfcfraf * CDDL are applicable instead of those of the GPL.
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami * You may elect to license modified versions of this file under the
f808c858fa61e7769218966759510a8b1190dfcfraf * terms and conditions of either the GPL or the CDDL or both.
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami * --------------------------------------------------------------------
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami * This code is based on:
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami * from: @(#)fdlibm.h 5.1 93/09/24
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami * $FreeBSD: src/lib/msun/src/math.h,v 1.61 2005/04/16 21:12:47 das Exp $
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami * FreeBSD HEAD 2005-06-xx
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami * ====================================================
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami * Developed at SunPro, a Sun Microsystems, Inc. business.
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami * Permission to use, copy, modify, and distribute this
f808c858fa61e7769218966759510a8b1190dfcfraf * software is freely granted, provided that this notice
f808c858fa61e7769218966759510a8b1190dfcfraf * is preserved.
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami * ====================================================
f808c858fa61e7769218966759510a8b1190dfcfraf#if !defined(__GNUC__) /* && !defined(__YOUR_COMPILER__) */
f808c858fa61e7769218966759510a8b1190dfcfraf/*#include <machine/_limits.h>*/
f808c858fa61e7769218966759510a8b1190dfcfraf (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))
f808c858fa61e7769218966759510a8b1190dfcfrafextern const union __infinity_un {
f808c858fa61e7769218966759510a8b1190dfcfrafextern const union __nan_un {
f808c858fa61e7769218966759510a8b1190dfcfraf unsigned char __uc[sizeof(float)];
f808c858fa61e7769218966759510a8b1190dfcfraf#if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
#ifdef __MATH_BUILTIN_CONSTANTS
#define FP_FAST_FMA
#ifdef __ia64__
#define FP_FAST_FMAL
#define FP_FAST_FMAF
#define fpclassify(x) \
#define isfinite(x) \
#define isinf(x) \
: (sizeof (x) == sizeof (double)) ? isinf(x) \
#define isnan(x) \
((sizeof (x) == sizeof (float)) ? isnanf(x) \
: (sizeof (x) == sizeof (double)) ? isnan(x) \
#define isnormal(x) \
#ifdef __MATH_BUILTIN_RELOPS
#define signbit(x) \
typedef double double_t;
typedef float float_t;
/* Old value from 4.4BSD-Lite math.h; this is probably better. */
/* sed -e "/#/d" -e "/RT_NOCRT/!d" -e "s/^.*RT_NOCRT(\([a-z0-9_]*\)).*$/# define \1 RT_NOCRT(\1)/" */
#ifdef RT_ARCH_AMD64