summaryrefslogtreecommitdiff
path: root/include/math.h
AgeCommit message (Collapse)Author
2010-02-23PR 36988: ISO C99 mandates that HUGE_VAL, HUGE_VALF, HUGE_VALL andjoerg
INFINITY are constant expressions. Use the GCC builtins if possible to implement them.
2010-01-11Add exp2 and exp2mchristos
2009-10-04oops forgot to commit that one--- Add f{dim,min,max}{,l,f}christos
2009-02-22Make NAN a compile time constant (with help from the compiler). Suggestedmartin
by krister. Fixes PR 40695. Make references to the old construct (which we can't remove for binary compatibility reasons) emit a linker warning.
2008-04-25make name const.christos
2007-02-22-get cabs() and cabsf() out of public view - these are historical anddrochner
conflict with C99 functions which are builtins in newer gcc (actually, the old cabs() is ABI compatible with the new _complex one on i386, but this is purely accidental) remove public prototypes and manpages, move the code into a compat subdirectory as libc does so that binary compatibility is kept -add a manpage for the isgreater() etc macros, borrowed from FreeBSD
2007-02-06add the isgreater() at al. comparision macros defined in C99 and SUSv3;drochner
use just the primitive macros for now (identical to FreeBSD/DragonFly) which don't use gcc internals, the rest can go in after some testing; addresses PR standards/25520
2006-03-25Add trunc() and truncf() C99 functions, from FreeBSD.xtraeme
2006-03-23Add nan(3), nanf(3), and nanl(3); welcome libm.so.0.4.kleink
2005-12-24Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.perry
2005-07-21Add log2fchristos
2005-02-03de-__P -- the hack is long since useless. Discussed with christos,perry
matt, kleink, others. Approved by christos.
2004-07-12Move round() to the C99 section.kleink
2004-07-10lib/24252: Add C99 functions round(3) and roundf(3).junyoung
libm minor unchanged; ride a recent bump. From FreeBSD.
2004-07-01being here, add the (l)lround(f) functions to libmdrochner
(almost the same like lrint)
2004-06-30shut up lint's "long long" warningsdrochner
2004-06-30Add (l)lrint(f).drochner
Being here, move some C99 function declarations into the appropriate section (as discussed with kleink).
2004-03-04* Turn isinf(3) and isnan(3) into C99-style macros.kleink
* Make it possible for ports to override these (i.e., VAX). * Remove isnanl(), which was internal to libc only.
2004-03-04Make lint happy for __fpmacro_unary_floating() users.kleink
2004-01-20Move FP_ROP and FP_DIRTYZERO from <math.h> to <vax/math.h> (where theykleink
would have ended up if I hadn't missed the latter file in the commit).
2004-01-20Add FP_ROP and FP_DIRTYZERO to MD range for VAX.matt
2004-01-17Close the comment after #endif.uwe
2004-01-15Add C99 fpclassify(), isfinite(), isnormal(), and signbit() macros.kleink
2003-10-26C99 7.12#4: provide INFINITY, which defaults to HUGE_VALF.kleink
If infinities are not available, the machine-dependent header must define __INFINITY as a positive constant of type float that overflows.
2003-10-25C99: provide HUGE_VALF and HUGE_VALL.kleink
2003-05-17Add long double support.thorpej
2003-04-28Add a new feature-test macro, _NETBSD_SOURCE. If this is definedbjh21
by the application, all NetBSD interfaces are made visible, even if some other feature-test macro (like _POSIX_C_SOURCE) is defined. <sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE, _POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve existing behaviour. This has two major advantages: + Programs that require non-POSIX facilities but define _POSIX_C_SOURCE can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS. + It makes most of the #ifs simpler, in that they're all now ORs of the various macros, rather than having checks for (!defined(_ANSI_SOURCE) || !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place. I've tried not to change the semantics of the headers in any case where _NETBSD_SOURCE wasn't defined, but there were some places where the current semantics were clearly mad, and retaining them was harder than correcting them. In particular, I've mostly normalised things so that _ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE, _XOPEN_SOURCE and _NETBSD_SOURCE in that order. Tested by building for vax, encouraged by thorpej, and uncontested in tech-userlevel for a week.
2002-02-19Clean up some rampant code duplication wrt ieee number handling:simonb
- Add alignment-safe double and float unions. - Use the above for the __infinity and __nan constants on all architectures that use the standard ieee754 representation of those constants. - Add a single copy of various ieee754 math functions (frexp, isinf, isnan, ldexp and modf) that had numerous duplicates among the arch-specific directories. - Use the above functions on all architectures where the generic C versions where used. Architectures that had local assembly routines are untouched (for those functions only).
2001-01-05protect the incomplete cabs declarations with #ifndef __MATH_PRIVATE__ so thatchristos
the code that defines the functions can declare them properly.
2000-06-13Remove 'extern' from function declarations.simonb
2000-01-04const -> __const and include <sys/cdefs.h> earlier; fixes PR lib/9052kleink
by Takahiro Kambe.
1999-12-23C99: Define a NAN macro in <math.h> which evaulates to a constant expression ofkleink
a single-precision quiet NaN; only to be defined on platforms that do support this value.
1999-08-16Add missing isinff() declaration.kleink
1999-01-31This file has still missing prototypes: cabs and cabsf... At least commentchristos
what the arguments should be.
1998-11-15s/void/const void/christos
1998-11-15cast to void * first to avoid lint warning.christos
1998-09-07Oops, isinf() was never included in any X/Open interface specification.kleink
1998-07-26const poisoning.mycroft
1998-05-11Fix comment typo in previous.kleink
1998-05-07Reorganize name space protection.kleink
1998-04-08C++ has a very different concept of "exception." Delimit struct exceptiontv
and matherr() with #ifndef __cplusplus.
1994-10-26new RCS ID format.cgd
1994-08-10Added prototypes for float versions of math functions.jtc
Removed prototypes for internal functions.
1994-03-01Add cabs() and drem(), for BSD libm compatibility.jtc
1994-02-14Add missing _. reported by several folks.cgd
1994-02-11New math.h, based on fdlibm's fdlibm.h.jtc
1993-10-11Moved definition of M_FOO constants into !_ANSI_SOURCE && !_POSIX_SOURCEjtc
conditional.
1993-08-04Use __pure qualifier.jtc
1993-07-09update for better FP routines, from AT&T & elsewherecgd
1993-03-21after 0.2.2 "stable" patches appliedcgd