math.h (131851) | math.h (131852) |
---|---|
1/* 2 * ==================================================== 3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 4 * 5 * Developed at SunPro, a Sun Microsystems, Inc. business. 6 * Permission to use, copy, modify, and distribute this 7 * software is freely granted, provided that this notice 8 * is preserved. 9 * ==================================================== 10 */ 11 12/* 13 * from: @(#)fdlibm.h 5.1 93/09/24 | 1/* 2 * ==================================================== 3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 4 * 5 * Developed at SunPro, a Sun Microsystems, Inc. business. 6 * Permission to use, copy, modify, and distribute this 7 * software is freely granted, provided that this notice 8 * is preserved. 9 * ==================================================== 10 */ 11 12/* 13 * from: @(#)fdlibm.h 5.1 93/09/24 |
14 * $FreeBSD: head/lib/msun/src/math.h 131851 2004-07-09 03:31:09Z das $ | 14 * $FreeBSD: head/lib/msun/src/math.h 131852 2004-07-09 03:32:40Z das $ |
15 */ 16 17#ifndef _MATH_H_ 18#define _MATH_H_ 19 20#include <sys/cdefs.h> 21#include <sys/_types.h> 22#include <machine/_limits.h> --- 51 unchanged lines hidden (view full) --- 74#define FP_NORMAL 0x04 75#define FP_SUBNORMAL 0x08 76#define FP_ZERO 0x10 77#define fpclassify(x) \ 78 ((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) \ 79 : (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) \ 80 : __fpclassifyl(x)) 81 | 15 */ 16 17#ifndef _MATH_H_ 18#define _MATH_H_ 19 20#include <sys/cdefs.h> 21#include <sys/_types.h> 22#include <machine/_limits.h> --- 51 unchanged lines hidden (view full) --- 74#define FP_NORMAL 0x04 75#define FP_SUBNORMAL 0x08 76#define FP_ZERO 0x10 77#define fpclassify(x) \ 78 ((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) \ 79 : (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) \ 80 : __fpclassifyl(x)) 81 |
82#define isfinite(x) ((fpclassify(x) & (FP_INFINITE|FP_NAN)) == 0) 83#define isinf(x) (fpclassify(x) == FP_INFINITE) 84#define isnan(x) (fpclassify(x) == FP_NAN) 85#define isnormal(x) (fpclassify(x) == FP_NORMAL) | 82#define isfinite(x) \ 83 ((sizeof (x) == sizeof (float)) ? __isfinitef(x) \ 84 : (sizeof (x) == sizeof (double)) ? __isfinite(x) \ 85 : __isfinitel(x)) 86#define isinf(x) \ 87 ((sizeof (x) == sizeof (float)) ? __isinff(x) \ 88 : (sizeof (x) == sizeof (double)) ? isinf(x) \ 89 : __isinfl(x)) 90#define isnan(x) \ 91 ((sizeof (x) == sizeof (float)) ? isnanf(x) \ 92 : (sizeof (x) == sizeof (double)) ? isnan(x) \ 93 : __isnanl(x)) 94#define isnormal(x) \ 95 ((sizeof (x) == sizeof (float)) ? __isnormalf(x) \ 96 : (sizeof (x) == sizeof (double)) ? __isnormal(x) \ 97 : __isnormall(x)) |
86 87#ifdef __MATH_BUILTIN_RELOPS 88#define isgreater(x, y) __builtin_isgreater((x), (y)) 89#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y)) 90#define isless(x, y) __builtin_isless((x), (y)) 91#define islessequal(x, y) __builtin_islessequal((x), (y)) 92#define islessgreater(x, y) __builtin_islessgreater((x), (y)) 93#define isunordered(x, y) __builtin_isunordered((x), (y)) --- 62 unchanged lines hidden (view full) --- 156 int type; 157 char *name; 158 double arg1; 159 double arg2; 160 double retval; 161}; 162#endif 163 | 98 99#ifdef __MATH_BUILTIN_RELOPS 100#define isgreater(x, y) __builtin_isgreater((x), (y)) 101#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y)) 102#define isless(x, y) __builtin_isless((x), (y)) 103#define islessequal(x, y) __builtin_islessequal((x), (y)) 104#define islessgreater(x, y) __builtin_islessgreater((x), (y)) 105#define isunordered(x, y) __builtin_isunordered((x), (y)) --- 62 unchanged lines hidden (view full) --- 168 int type; 169 char *name; 170 double arg1; 171 double arg2; 172 double retval; 173}; 174#endif 175 |
164#define isnanf(x) isnan(x) 165 | |
166#if 0 167/* Old value from 4.4BSD-Lite math.h; this is probably better. */ 168#define HUGE HUGE_VAL 169#else 170#define HUGE MAXFLOAT 171#endif 172 173#define X_TLOSS 1.41484755040568800000e+16 /* pi*2**52 */ --- 16 unchanged lines hidden (view full) --- 190 */ 191__BEGIN_DECLS 192/* 193 * ANSI/POSIX 194 */ 195int __fpclassifyd(double) __pure2; 196int __fpclassifyf(float) __pure2; 197int __fpclassifyl(long double) __pure2; | 176#if 0 177/* Old value from 4.4BSD-Lite math.h; this is probably better. */ 178#define HUGE HUGE_VAL 179#else 180#define HUGE MAXFLOAT 181#endif 182 183#define X_TLOSS 1.41484755040568800000e+16 /* pi*2**52 */ --- 16 unchanged lines hidden (view full) --- 200 */ 201__BEGIN_DECLS 202/* 203 * ANSI/POSIX 204 */ 205int __fpclassifyd(double) __pure2; 206int __fpclassifyf(float) __pure2; 207int __fpclassifyl(long double) __pure2; |
208int __isfinitef(float) __pure2; 209int __isfinite(double) __pure2; 210int __isfinitel(long double) __pure2; 211int __isinff(float) __pure2; 212int __isinfl(long double) __pure2; 213int __isnanl(long double) __pure2; 214int __isnormalf(float) __pure2; 215int __isnormal(double) __pure2; 216int __isnormall(long double) __pure2; |
|
198int __signbit(double) __pure2; 199 200double acos(double); 201double asin(double); 202double atan(double); 203double atan2(double, double); 204double cos(double); 205double sin(double); --- 30 unchanged lines hidden (view full) --- 236double erf(double); 237double erfc(double) __pure2; 238double expm1(double) __pure2; 239double fdim(double, double); 240double fmax(double, double) __pure2; 241double fmin(double, double) __pure2; 242double hypot(double, double); 243int ilogb(double); | 217int __signbit(double) __pure2; 218 219double acos(double); 220double asin(double); 221double atan(double); 222double atan2(double, double); 223double cos(double); 224double sin(double); --- 30 unchanged lines hidden (view full) --- 255double erf(double); 256double erfc(double) __pure2; 257double expm1(double) __pure2; 258double fdim(double, double); 259double fmax(double, double) __pure2; 260double fmin(double, double) __pure2; 261double hypot(double, double); 262int ilogb(double); |
263int (isinf)(double) __pure2; 264int (isnan)(double) __pure2; |
|
244double lgamma(double); 245double log1p(double) __pure2; 246double logb(double) __pure2; 247double nearbyint(double) __pure2; 248double nextafter(double, double); 249double remainder(double, double); 250double rint(double) __pure2; 251double round(double); --- 22 unchanged lines hidden (view full) --- 274#endif 275 276/* 277 * BSD math library entry points 278 */ 279#if __BSD_VISIBLE 280double drem(double, double); 281int finite(double) __pure2; | 265double lgamma(double); 266double log1p(double) __pure2; 267double logb(double) __pure2; 268double nearbyint(double) __pure2; 269double nextafter(double, double); 270double remainder(double, double); 271double rint(double) __pure2; 272double round(double); --- 22 unchanged lines hidden (view full) --- 295#endif 296 297/* 298 * BSD math library entry points 299 */ 300#if __BSD_VISIBLE 301double drem(double, double); 302int finite(double) __pure2; |
303int isnanf(float) __pure2; |
|
282 283/* 284 * Reentrant version of gamma & lgamma; passes signgam back by reference 285 * as the second argument; user must allocate space for signgam. 286 */ 287double gamma_r(double, int *); 288double lgamma_r(double, int *); 289 --- 172 unchanged lines hidden --- | 304 305/* 306 * Reentrant version of gamma & lgamma; passes signgam back by reference 307 * as the second argument; user must allocate space for signgam. 308 */ 309double gamma_r(double, int *); 310double lgamma_r(double, int *); 311 --- 172 unchanged lines hidden --- |