Index: complex.h =================================================================== RCS file: /cvsroot/src/include/complex.h,v retrieving revision 1.2 diff -u -r1.2 complex.h --- complex.h 22 Jul 2009 15:09:57 -0000 1.2 +++ complex.h 22 Mar 2010 23:02:26 -0000 @@ -19,14 +19,19 @@ float crealf(float complex); float cimagf(float complex); float complex conjf(float complex); +long double creall(long double complex); +long double cimagl(long double complex); +long double complex conjl(long double complex); #ifndef __LIBM0_SOURCE__ /* avoid conflict with historical cabs(struct complex) */ double cabs(double complex) __RENAME(__c99_cabs); float cabsf(float complex) __RENAME(__c99_cabsf); +long double cabsl(long double complex) __RENAME(__c99_cabsl); #endif double carg(double complex); float cargf(float complex); +long double cargl(long double complex); double complex csqrt(double complex); double complex cexp(double complex); @@ -47,6 +52,34 @@ double complex cacosh(double complex); double complex catanh(double complex); +#ifdef __HAVE_LONG_DOUBLE +long double creall(long double complex); +long double cimagl(long double complex); +long double complex conjl(long double complex); + +long double cabsl(long double complex); +long double cargl(long double complex); + +long double complex csqrtl(long double complex); +long double complex cexpl(long double complex); +long double complex clogl(long double complex); +long double complex cpowl(long double complex, long double complex); + +long double complex csinl(long double complex); +long double complex ccosl(long double complex); +long double complex ctanl(long double complex); +long double complex csinhl(long double complex); +long double complex ccoshl(long double complex); +long double complex ctanhl(long double complex); + +long double complex casinl(long double complex); +long double complex cacosl(long double complex); +long double complex catanl(long double complex); +long double complex casinhl(long double complex); +long double complex cacoshl(long double complex); +long double complex catanhl(long double complex); +#endif /* __HAVE_LONG_DOUBLE */ + float complex csqrtf(float complex); float complex cexpf(float complex); float complex clogf(float complex); @@ -66,4 +99,23 @@ float complex cacoshf(float complex); float complex catanhf(float complex); +long double complex csqrtl(long double complex); +long double complex cexpl(long double complex); +long double complex clogl(long double complex); +long double complex cpowl(long double complex, long double complex); + +long double complex csinl(long double complex); +long double complex ccosl(long double complex); +long double complex ctanl(long double complex); +long double complex csinhl(long double complex); +long double complex ccoshl(long double complex); +long double complex ctanhl(long double complex); + +long double complex casinl(long double complex); +long double complex cacosl(long double complex); +long double complex catanl(long double complex); +long double complex casinhl(long double complex); +long double complex cacoshl(long double complex); +long double complex catanhl(long double complex); + __END_DECLS Index: fenv.h =================================================================== RCS file: fenv.h diff -N fenv.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ fenv.h 22 Mar 2010 23:02:26 -0000 @@ -0,0 +1,59 @@ +/* $NetBSD$ */ +/*- + * Copyright (c) 2008 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _FENV_H_ +#define _FENV_H_ + +/* + * Import the machine-dependent FE_* definitions. + */ +#ifdef __vax__ +#include +#else +#include +#endif + +__BEGIN_DECLS +int feclearexcept(int); +int fegetexceptflag(fexcep_t *, int); +int feraiseexcept(int); +int fesetexceptflag(const fexcep_t *, int); +int fetestexcept(int); + +int fegetround(void); +int fesetround(int); + +int fegetenv(fent_t *); +int feholdexcept(const fent_t *); +int fesetenv(const fent_t *); +int feupdateenv(const fent_t *); +__END_DECLS + +#endif /* !_FENV_H_ */ Index: math.h =================================================================== RCS file: /cvsroot/src/include/math.h,v retrieving revision 1.51 diff -u -r1.51 math.h --- math.h 23 Feb 2010 00:03:09 -0000 1.51 +++ math.h 22 Mar 2010 23:02:26 -0000 @@ -282,6 +282,24 @@ float sinf(float); float tanf(float); +double acos(double); +double asin(double); +double atan(double); +double atan2(double, double); +double cos(double); +double sin(double); +double tan(double); + +#ifdef __HAVE_LONG_DOUBLE +long double acosl(long double); +long double asinl(long double); +long double atanl(long double); +long double atan2l(long double, long double); +long double cosl(long double); +long double sinl(long double); +long double tanl(long double); +#endif + /* 7.12.5 hyperbolic */ float acoshf(float); @@ -291,6 +309,22 @@ float sinhf(float); float tanhf(float); +double acosh(double); +double asinh(double); +double atanh(double); +double cosh(double); +double sinh(double); +double tanh(double); + +#ifdef __HAVE_LONG_DOUBLE +long double acoshl(long double); +long double asinhl(long double); +long double atanhl(long double); +long double coshl(long double); +long double sinhl(long double); +long double tanhl(long double); +#endif + /* 7.12.6 exp / log */ float expf(float); @@ -307,6 +341,34 @@ float modff(float, float *); float scalbnf(float, int); +double exp(double); +double expm1(double); +double frexp(double, int *); +int ilogb(double); +double ldexp(double, int); +double log(double); +double log2(double); +double log10(double); +double log1p(double); +double logb(double); +double modf(double, double *); +double scalbn(double, int); + +#ifdef __HAVE_LONG_DOUBLE +long double expl(long double); +long double expm1l(long double); +long double frexpl(long double, int *); +int ilogbl(long double); +long double ldexpl(long double, int); +long double logl(long double); +long double log2l(long double); +long double log10l(long double); +long double log1pl(long double); +long double logbl(long double); +long double modfl(long double, long double *); +long double scalbnl(long double, int); +#endif + /* 7.12.7 power / absolute */ float cbrtf(float); @@ -315,46 +377,104 @@ float powf(float, float); float sqrtf(float); +double cbrt(double); +double fabs(double); +double hypot(double, double); +double pow(double, double); +double sqrt(double); + +#ifdef __HAVE_LONG_DOUBLE +long double cbrtl(long double); +long double fabsl(long double); +long double hypotl(long double, long double); +long double powl(long double, long double); +long double sqrtl(long double); +#endif + /* 7.12.8 error / gamma */ float erff(float); float erfcf(float); float lgammaf(float); +float tgammaf(float); + +double erf(double); +double erfc(double); +double lgamma(double); +double tgamma(double); + +#ifdef __HAVE_LONG_DOUBLE +long double erfl(long double); +long double erfcl(long double); +long double lgammal(long double); +long double tgammal(long double); +#endif /* 7.12.9 nearest integer */ float ceilf(float); float floorf(float); float rintf(float); -double round(double); float roundf(float); -double trunc(double); float truncf(float); -long int lrint(double); long int lrintf(float); /* LONGLONG */ -long long int llrint(double); -/* LONGLONG */ long long int llrintf(float); -long int lround(double); long int lroundf(float); /* LONGLONG */ +long long int llroundf(float); + +double ceil(double); +double floor(double); +double rint(double); +double round(double); +double trunc(double); +long int lrint(double); +/* LONGLONG */ +long long int llrint(double); +long int lround(double); +/* LONGLONG */ long long int llround(double); + +#ifdef __HAVE_LONG_DOUBLE +long double ceill(long double); +long double floorl(long double); +long double rintl(long double); +long double roundl(long double); +long double truncl(long double); +long int lrintl(long double); /* LONGLONG */ -long long int llroundf(float); +long long int llrintl(long double); +long int lroundl(long double); +/* LONGLONG */ +long long int llroundl(long double); +#endif /* 7.12.10 remainder */ float fmodf(float, float); float remainderf(float, float); +#ifdef __HAVE_LONG_DOUBLE +long double fmodl(long double, long double); +long double remainderl(long double, long double); +#endif + /* 7.12.11 manipulation */ -float copysignf(float, float); -double nan(const char *); -float nanf(const char *); +float copysignf(float, float); +float nanf(const char *); +float nextafterf(float, float); + +double copysign(double, double); +double nan(const char *); +double nextafter(double, double); + +#ifdef __HAVE_LONG_DOUBLE +long double copysignl(long double, long double); long double nanl(const char *); -float nextafterf(float, float); +long double nextafterl(long double, long double); +#endif /* 7.12.14 comparision */ @@ -383,18 +503,10 @@ ((_POSIX_C_SOURCE - 0) >= 200112L) || \ defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE) /* 7.12.3.3 int isinf(real-floating x) */ -#ifdef __isinf -#define isinf(__x) __isinf(__x) -#else #define isinf(__x) __fpmacro_unary_floating(isinf, __x) -#endif /* 7.12.3.4 int isnan(real-floating x) */ -#ifdef __isnan -#define isnan(__x) __isnan(__x) -#else #define isnan(__x) __fpmacro_unary_floating(isnan, __x) -#endif #endif /* !_ANSI_SOURCE && ... */ #if defined(_NETBSD_SOURCE) @@ -472,14 +584,15 @@ * Library implementation */ int __fpclassifyf(float); -int __fpclassifyd(double); int __isfinitef(float); -int __isfinited(double); int __isinff(float); -int __isinfd(double); int __isnanf(float); -int __isnand(double); int __signbitf(float); + +int __fpclassifyd(double); +int __isfinited(double); +int __isinfd(double); +int __isnand(double); int __signbitd(double); #ifdef __HAVE_LONG_DOUBLE