Commit Graph

65 Commits

Author SHA1 Message Date
Jozef Lawrynowicz b14a879d85 Remove matherr, and SVID and X/Open math library configurations
Default math library configuration is now IEEE
2019-01-23 10:46:24 +01:00
Yaakov Selkowitz eea249da3b ansification: remove _PARAMS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:13 -06:00
Jeff Johnston 4c90db7bc8 Remove legacy unions which are no longer used
- remove __fmath, __dmath, and __ldmath unions
2017-04-17 19:22:19 -04:00
Yaakov Selkowitz 52d940e263 math.h: fix guards on basic M_ constants
MAXFLOAT, M_PI, and friends date back to at least XPG4v2, so this guard
was incorrect even prior to the feature test macros overhaul.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-07-15 09:06:53 -05:00
Corinna Vinschen 357da5bc32 math.h: Replace usage of INT_MAX with __INT_MAX__
Using INT_MAX requires to include limits.h on most targets.
Math.h must not rely on that.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-05-31 16:30:46 +02:00
Yaakov Selkowitz cd84d1c2d0 math: update isinf/isnan function comments after move to math.h
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-04-05 08:49:44 -05:00
Yaakov Selkowitz 722e363c4d math: guard BSD finite/isinf/isnan functions properly in math.h
Now that we have properly functioning feature test macros, the BSD
floating-point classification functions can go into math.h instead of
the non-standard ieeefp.h, and not under the C99 guard:

http://man7.org/linux/man-pages/man3/finite.3.html

The isnan function was in earlier versions of SUS but removed starting with
POSIX.1-2001, compare:

http://pubs.opengroup.org/onlinepubs/007908799/xsh/math.h.html
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/math.h.html

Note that the isinf and isnan functions (but not the variants) conflict
with functions by the same name in C++11, hence they (and only they)
need to be hidden:

https://sourceware.org/git/?p=glibc.git;a=commit;h=d9b965fa56350d6eea9f7f438a0714c7ffbb183f
https://sourceware.org/git/?p=glibc.git;a=commit;h=3c47c83a9730c20e602694505b9278c25637b0d0

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-04-04 14:13:21 -05:00
Corinna Vinschen 792e51b721 Add missing long double functions to Cygwin
This patch adds the long double functions missing in newlib to Cygwin.
Apart from some self-written additions (exp10l, finite{f,l}, isinf{f,l},
isnan{f,l}, pow10l) the files are taken from the Mingw-w64 math lib.
Minor changes were required, e.g. substitue _WIN64 with __x86_64__ and
fixing __FLT_RPT_DOMAIN/__FLT_RPT_ERANGE for Cygwin.

Cygwin:
	* math: New subdir with math functions.
	* Makefile.in (VPATH): Add math subdir.
	(MATH_OFILES): List of object files collected from building files in
	math subdir.
	(DLL_OFILES): Add $(MATH_OFILES).
	${CURDIR}/libm.a: Add $(MATH_OFILES) to build.
	* common.din: Add new functions from math subdir.
	* i686.din: Align to new math subdir.  Remove functions now commonly
	available.
	* x86_64.din: Ditto.
	* math.h: math.h wrapper to define mingw structs used in some files in
	math subdir.
	* include/cygwin/version.h: Bump API minor version.

newlib:
	* libc/include/complex.h: Add prototypes for complex long double
	functions.  Only define for Cygwin.
	* libc/include/math.h: Additionally enable prototypes of long double
	functions for Cygwin.  Add Cygwin-only prototypes for dreml, sincosl,
	exp10l and pow10l.  Explain why we don't add them to newlib.
	* libc/include/tgmath.h: Enable long double handling on Cygwin.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-29 14:43:55 +02:00
Corinna Vinschen 799fdda4d2 math.h: Use GCC builtins for C99 macros where available
GCCs builtin functions are mostly type agnostic and architecture
indepedent.  Prefer to use them if available.

	* libc/include/math.h (fpclassify, isfinite, isinf, isnan,
	isnormal): Use matching GCC builtin functions if built with
	GCC 4.4 or later.
	(signbit): Use matching GCC builtin functions if built with
	GCC 4.0 or later.
	(isgreater, isgreaterequal, isless, islessequal, islessgreater,
	isunordered): Use matching GCC builtin functions if built with
	GCC 2.97 or later.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-26 20:33:46 +01:00
Yaakov Selkowitz 4e8291b8b0 Feature test macros overhaul: math.h
Simplify the C99 conditionals.  Mark the drem and gamma functions as
BSD|SVID, the Bessel double functions also XSI and the floats also SUSv3.
signgam is BSD|SVID|XSI, and matherr is SVID.  Finally, use the internal
macros to control the symbolic constants.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-03-17 21:08:59 -05:00
Nick Clifton b9e7cd9a84 * libc/include/complex.h (cabsl): Add prototype.
(cimagl): Add prototype.
	(creall): Add prototype.
	* libc/include/ieeefp.h: Include float.h.
	(EXT_EXPBITS, EXT_FRACHBITS, EXT_FRACLBITS)
	(EXT_EXP_INFNAN. EXT_EXP_BIAS, EXT_FRACBITS): Define.
	(struct ieee_ext, union ieee_ext_u): New types for long double
	support.
	* libc/include/math.h (finitel): Add prototype.
	(hypotl): Add prototype.
	(sqrtl): Add prototype.
	* libm/common/Makefile.am (lsrc): Add sl_finite.c.
	* libm/common/Makefile.in: Regenerate.
	* libm/common/fdlibm.h (__ieee754_hypotl): Add prototype.
	* libm/common/hypotl.c (hypotl): Add implementation for when long
	double is larger than double.
	* libm/common/sqrtl.c (sqrtl): Likewise.
	* libm/common/sl_finite.c: New file.  Adds implementation of the
	finitel function.
	* libm/complex/Makefile.am (lsrc): Define.
	(libcomplex_la_SOURCES): Add lsrc.
	(lib_a_SOURCES): Add lsrc.
	* libm/complex/Makefile.in: Regenerate.
	* libm/complex/cabs.c: Add documentation of cabsl function.
	* libm/complex/cimag.c: Add documentation of cimagl function.
	* libm/complex/creall.c: Add documentation of creall function.
	* libm/complex/cabsl.c: New file.  Adds implementation of the
	cabsl function.
	* libm/complex/cimagl.c: New file.  Adds implementation of the
	cimagl function.
	* libm/complex/creall.c: New file.  Adds implementation of the
	creall function.
	* libm/math/Makefile.am (lsrc): Define.
	(libmath_la_SOURCES): Add lsrc.
	(lib_a_SOURCES): Add lsrc.
	* libm/math/Makefile.in: Regenerate.
	* libm/math/el_hypot.c: New file.  Adds implementation of the
	__ieee754_hypotl function.
2015-02-06 16:14:04 +00:00
Jeff Johnston 705cda717e 2014-12-15 Jonathan Roelofs <jonathan@codesourcery.com>
* libc/include/math.h: Add log2l,logbl,nexttowardf,
        * nexttoward,nexttowardl
        * libm/common/Makefile.am: Reference new files
        * libm/common/Makefile.in: Reference new files
        * libm/common/log2l.c: New File
        * libm/common/logbl.c: Likewise
        * libm/common/nexttowardf.c: Likewise
        * libm/common/nexttoward.c: Likewise
        * libm/common/nexttowardl.c: Likewise
2014-12-15 20:50:23 +00:00
Corinna Vinschen 7a84e9c4bc * libc/include/_ansi.h: _LONG_LONG_TYPE definition removed.
* libc/include/math.h: _LONG_LONG_TYPE replaced by "long long".
	Guards for C99 and C++11 functions fixed.
	* libc/include/stdlib.h: Guards for C99 and C++11 functions fixed.
2014-10-10 14:43:19 +00:00
DJ Delorie dd48219ba9 * libc/include/math.h (frexpl): Remove parameter name. 2014-08-27 19:27:03 +00:00
Jon TURNEY a4a96eb436 * libc/include/math.h: Also define M_PI etc. if _XOPEN_SOURCE is
defined appropriately.
2014-08-04 21:32:37 +00:00
Jeff Johnston 17ecab12a8 2012-12-18 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h: Remove the log2f macro.
2012-12-18 22:41:53 +00:00
Jeff Johnston b060af2264 2012-12-18 Craig Howland <howland@LGSInnovations.com>
* libc/include/math.h: Add recognition of values 1 and 2 for
        FLT_EVAL_METHOD.
2012-12-18 21:20:51 +00:00
Corinna Vinschen 5eceb3958e * libc/include/sys/features.h (__GNUC_PREREQ): Define. Use
throughout in place of explicit GNUC version checks.
	* libc/include/_ansi.h (_NOINLINE): Define.
	(_NOINLINE_STATIC): Define.
	* libc/stdio/vfprintf.c (__sbprintf): Define _NOINLINE_STATIC.
2012-10-16 18:45:24 +00:00
Corinna Vinschen fd4515030c * libc/include/math.h: Missing from previous checkin. 2010-12-03 16:08:48 +00:00
Jeff Johnston 9f2ecfff1c 2010-10-14 Craig Howland <howland@LGSInnovations.com>
* libc/include/math.h:  Delete cabs() and cabs() prototypes
        (c.f. 2010-10-08 change by Corinna).
2010-10-14 20:14:33 +00:00
Jeff Johnston d8a439359a 2010-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* libc/include/math.h (log2, log2f): Disable macro versions for C++,
        as they are incompatible with OpenMP/C++ headers.

2
2010-01-11 22:55:47 +00:00
Jeff Johnston 46471257e9 2009-11-17 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* libm/common/fdlibm.h (logb, logbf): Move decls from here...
        * libc/include/math.h (logb, logbf): ...to here.
2009-11-17 22:35:46 +00:00
Jeff Johnston 664f00763b 2009-07-09 Craig Howland <howland@LGSInnovations.com>
* libm/math/ef_scalb.c:  Replace isnanf() (pre-C99 function call) with
        isnan() (C99 macro).
        * libm/math/wf_log.c:  Ditto.
        * libm/math/wf_j0.c:  Ditto.
        * libm/math/wf_sqrt.c:  Ditto.
        * libm/math/wf_pow.c:  Ditto.
        * libm/math/wf_fmod.c:  Ditto.
        * libm/math/wf_remainder.c:  Ditto.
        * libm/math/wf_scalb.c:  Ditto.
        * libm/math/wf_atanh.c:  Ditto.
        * libm/math/wf_cosh.c:  Ditto.
        * libm/math/wf_acos.c:  Ditto.
        * libm/math/wf_acosh.c:  Ditto.
        * libm/math/wf_jn.c:  Ditto.
        * libm/math/wf_log10.c:  Ditto.
        * libm/math/wf_asin.c:  Ditto.
        * libm/math/wf_j1.c:  Ditto.
        * libm/common/sf_isnan.c:  Add #include <ieeefp.h>, fix comment.
        * libm/common/sf_isinf.c:  Add #include <ieeefp.h>, adjust comment to
        match that from s_isinf.c.
        * libc/include/machine/ieeefp.h:  Simplify isinf and isnan macros to
        remove un-necessary extension use (in a similar manner to as was
        recently done in math.h).
        * libc/include/math.h:  Remove isnanf and isinff prototypes (are in
        ieeefp.h).
        * libm/machine/spu/sf_isinf.c:  Fix comment (remove <math.h>).
2009-07-09 17:04:56 +00:00
Jeff Johnston aa201fc9df 2009-06-16 Craig Howland <howland@LGSInnovations.com>
* libc/include/math.h:  Simplify fpclassify, isinf, isnan, and signbit
        macros to remove un-necessary extension use.  isinf and isnan also
        changed to use fpclassify.  isfinite macro modified to run faster by
        only calling fpclassify once instead of possibly twice.
2009-06-16 15:55:06 +00:00
Jeff Johnston de8a5b7810 2009-05-15 Craig Howland <howland@LGSInnovations.com>
* configure.in:  Add configuration test for long double type existing
        and set flag _HAVE_LONG_DOUBLE if true.  Fix INIT_ARRAY (.init_array)
        and _LDBL_EQ_DBL tests to not link so that will work with
        cross-compilers.
        * configure: Regenerated.
        * Makefile.in: Ditto.
        * newlib.hin: Add _HAVE_LONG_DOUBLE flag.
        * libc/include/math.h:  Change non-builtin defines for HUGE_VAL,
        HUGE_VALF, and HUGE_VALL to be constant expressions.  Add definitions
        for the non-builtin case for INFINITY and NAN.  Gate HUGE_VALL and
        union __ldmath definitions with (new) _HAVE_LONG_DOUBLE.
        *libm/common/s_infconst.c:  Change definitions to use values from
        float.h instead of non-so-portable integer forms.  Mark as being
        deprecated (because now removed from math.h, are not used anywhere
        in Newlib, itself).
2009-05-15 16:15:57 +00:00
Jeff Johnston 35f31b6a98 2009-04-24 Jeff johnston <jjohnstn@redhat.com>
* configure.in: Add configuration test for long double equals dbl
        and set flag _LDBL_EQ_DBL if true.
        * configure: Regenerated.
        * newlib.hin: Add _LDBL_EQ_DBL flag.
        * libc/include/math.h: Use _LDBL_EQ_DBL flag instead of
        _HAVE_LDBL_MATH.
        * libc/include/stdlib.h: Use _LDBL_EQ_DBL flag instead of
        _HAVE_LDBL_STDLIB.
        * libc/common/local.h: Remove _LDBL_EQ_DBL flag setting.
        * libc/stdlib/local.h: Ditto.
2009-04-24 22:49:55 +00:00
Jeff Johnston bd5f034706 2009-04-20 Jeff johnston <jjohnstn@redhat.com>
* libc/include/math.h: Change _LDBL_EQ_DBL flag usage to
        be _HAVE_LDBL_MATH.
        * libc/include/stdlib.h: Change _LDBL_EQ_DBL flag usage to
        be _HAVE_LDBL_STDLIB.
2009-04-20 18:06:14 +00:00
Jeff Johnston ad9bb48fbe 2009-04-17 Ken Werner <ken.werner@de.ibm.com>
* libc/include/machine/ieeefp.h: _LDBL_EQ_DBL check fixed.
        * libc/include/math.h (llrintl): Declare.
        * libm/common/llrintl.c: New File.
        * libm/common/Makefile.am: New File added.
        * libm/common/Makefile.in: Regenerate.
2009-04-17 20:54:19 +00:00
Jeff Johnston 65f414dc16 2009-04-16 Ken Werner <ken.werner@de.ibm.com>
* libm/libm.texinfo: Add long double function support chapter.
        * libc/include/machine/ieeefp.h: Add _LDBL_EQ_DBL define.
        * libc/include/stdlib.h: Include <machine/ieeefp.h>.
        (strtold, wcstold): Declare.
        * libc/stdlib/strtold.c: New File.
        * libc/stdlib/wcstold.c: Likewise.
        * libc/configure.in: Add long double check.
        * libc/configure: Regenerate.
        * libc/stdlib/Makefile.am: Add strtold.c and wcstold.c.
        * libc/stdlib/Makefile.in: Regenerate.
        * libc/include/math.h (atanl, cosl, sinl, tanl, tanhl): Declare.
        (frexpl, modfl, ceill, fabsl, floorl, log1pl, expm1l, acosl): Ditto.
        (asinl, atan2l, coshl, sinhl, expl, ldexpl, logl, log10l, powl): Ditto.
        (sqrtl, fmodl, hypotl, copysignl, nanl, ilogbl, asinhl, cbrt): Ditto.
        (nextafterl, rintl, scalbnl, exp2l, scalblnl, tgammal): Ditto.
        (nearbyintl, lrintl, llrintl, roundl, lroundl, llround): Ditto.
        (llroundl, truncl, remquol, fdiml, fmaxl, fminl, fmal, acoshl): Ditto.
        (atanhl, remainderl, lgammal, erfl, erfcl): Ditto.
        * libm/common/atanl.c: New File.
        * libm/common/cosl.c: Likewise.
        * libm/common/sinl.c: Likewise.
        * libm/common/modfl.c: Likewise.
        * libm/common/frexpl.c: Likewise.
        * libm/common/tanhl.c: Likewise.
        * libm/common/tanl.c: Likewise.
        * libm/common/expm1l.c: Likewise.
        * libm/common/log1pl.c: Likewise.
        * libm/common/ceill.c: Likewise.
        * libm/common/fabsl.c: Likewise.
        * libm/common/floorl.c: Likewise.
        * libm/common/acosl.c: Likewise.
        * libm/common/asinl.c: Likewise.
        * libm/common/atan2l.c: Likewise.
        * libm/common/coshl.c: Likewise.
        * libm/common/expl.c: Likewise.
        * libm/common/fmodl.c: Likewise.
        * libm/common/hypotl.c: Likewise.
        * libm/common/ldexpl.c: Likewise.
        * libm/common/log10l.c: Likewise.
        * libm/common/logl.c: Likewise.
        * libm/common/powl.c: Likewise.
        * libm/common/sqrtl.c: Likewise.
        * libm/common/copysignl.c: Likewise.
        * libm/common/ilogbl.c: Likewise.
        * libm/common/nanl.c: Likewise.
        * libm/common/cbrtl.c: Likewise.
        * libm/common/asinhl.c: Likewise.
        * libm/common/nextafterl.c: Likewise.
        * libm/common/rintl.c: Likewise.
        * libm/common/scalbnl.c: Likewise.
        * libm/common/exp2l.c: Likewise.
        * libm/common/fdiml.c: Likewise.
        * libm/common/fmal.c: Likewise.
        * libm/common/fmaxl.c: Likewise.
        * libm/common/fminl.c: Likewise.
        * libm/common/lrintl.c: Likewise.
        * libm/common/lroundl.c: Likewise.
        * libm/common/nearbyintl.c: Likewise.
        * libm/common/remquol.c: Likewise.
        * libm/common/roundl.c: Likewise.
        * libm/common/scalblnl.c: Likewise.
        * libm/common/truncl.c: Likewise.
        * libm/common/acoshl.c: Likewise.
        * libm/common/atanhl.c: Likewise.
        * libm/common/erfcl.c: Likewise.
        * libm/common/erfl.c: Likewise.
        * libm/common/lgammal.c: Likewise.
        * libm/common/remainderl.c: Likewise.
        * libm/common/tgammal.c: Likewise.
        * libm/common/sinhl.c: Likewise.
        * libm/common/llroundl.c: Likewise.
        * libm/configure.in: Add long double check.
        * libm/configure: Regenerate.
        * libm/common/Makefile.am: Add new files.
        * libm/common/Makefile.in: Regenerate.
2009-04-16 18:24:35 +00:00
Jeff Johnston 823f6f6655 2009-04-03 Ken Werner <ken.werner@de.ibm.com>
* libc/include/math.h: Remove duplicate copysign prototype.
        Fix __math_68881 define typo.  Guard functions of the rint family.
2009-04-03 17:42:27 +00:00
Jeff Johnston 139f923bb4 2009-03-25 Craig Howland <howland@LGSInnovations.com>
* libc/include/math.h:  (llround, llroundf): Declare.
	* libm/common/s_llround.c: New file, implementing llround().
	* libm/common/sf_llround.c: New file, implementing llroundf().
	* libm/common/sf_lround.c: Remove spurious cast in _DOUBLE_IS_32BITS
	version of function.
	* libm/common/sf_lrint.c: Ditto.
	* libm/common/sf_logb.c:  Corrected return for subnormal argument
	by replacing existing function with a version created from sf_ilogb.c.
	* libm/common/s_logb.c: Ditto, except starting point s_ilogb.c.  Also
	added documentation for logb() and logbf().
	* libm/common/s_signbit.c:  Add signbit() documentation.
	* libm/common/s_log2.c: Update return values to match what w_log2.c has,
	since log2 uses log(); add note about being derived instead of direct.
	* libm/common/sf_fma.c: Add casts to attempt to get correct results,
	as well as comments pointing out problems with the implementation.
	* libm/common/s_fma.c: Add fma() and fmaf() documentation.
	* libm/common/sf_remquo.c: Incorrect quotient returns for large values
	corrected by discarding existing function and replacing with Sun
	verion, with some enhancements.
	* libm/common/s_remquo.c: Ditto.  Add remquo() and remquof()
	documentation.
	* libm/common/s_fmax.c: Add fmax() and fmaxf() documentation.
	* libm/common/s_fmin.c: Add fmin() and fminf() documentation.
	* libm/common/s_fdim.c: Return NAN for NAN arg, add fdim() and fdimf()
	documentation.
	* libm/common/sf_fdim.c: Return NAN for NAN arg, HUGE_VALF for inf arg.
	* libm/common/s_trunc.c: Add trunc() and truncf() documentation.
	* libm/common/s_rint.c: Add rint() and rintf() documentation.
	* libm/common/s_round.c: Add round() and roundf() documentation.
	* libm/common/s_scalbn.c: Add scalbln() and scalblnf() documentation.
	* libm/common/s_infinity.c: Add infinity() and infinityf()
	documentation.
	* libm/common/s_lround.c: Add lround(), lroundf(), llround(), and
	llroundf() documentation.
	* libm/common/s_lrint.c: Add lrint(), lrintf(), llrint(), and llrintf()
	documentation.
	* libm/common/isgreater.c: New file for documenting math.h function-like
	macros isgreater(), isgreaterequal(), isless(), islessequal(),
	islessgreater(), and isunordered().
	* libm/common/s_isnan.c: Add documentation for function-like macros
	fpclassify(), isfinite(), isinf(), isnan(), and isnormal().
	* libm/common/s_nearbyint.c: Add nearbyint() and nearbyintf()
	documentation.
	* libm/common/Makefile.am: Add s_llround.c (src); sf_llround.c (fsrc);
	s_fdim.def, s_fma.def, s_fmax.def, s_fmin.def,
	s_logb.def, s_lrint.def, s_lround.def, s_nearbyint.def, s_remquo.def,
        s_rint.def, s_round.def, s_signbit.def, s_trunc.def, and
        isgreater.def (chobj);
	re-name all existing chew files (chobj) to match source file base
	names (put in underscores), delete all special targets for chew files
	(leaving all to be generated by rule).
	* libm/common/Makefile.in: regenerate.
	* libm/math/w_exp2.c: Add "base 2" to documentation description (and
	delete TRAD_SYNOPSIS).
	* libm/math/w_gamma.c: Add tgamma() and tgammaf() documentation, along
	with some history behind the function names.
	* libm/math/math.tex: Add includes for newly-added documentation (see
	.def additions to common/Makefile.am and math/Makefile.am in this
	ChangeLog list), adjusted existing .def file names to match source file
	base names (added underscores); add mention of HUGE_VALF; rename
	"Version of library" section to "Error Handling" and add some text
	about floating-point exception; added section "Standards Compliance And
	Portability".
	* libm/math/Makefile.am: Add w_exp2.def (chobj);
	re-name all existing chew files (chobj) to match source file base
	names, delete all special targets for chew files (leaving all to be
	generated by rule).
	* libm/math/Makefile.in: regenerated
	* doc/makedoc.c: Change silent ignoring of commands < 5 characters
	to a failure when reading macro file for commands < 4 characters;
	add -v (verbose) option for printing some debugging information;
	get rid of spurious translation of "@*" to "*" (no source files used @*,
	so no existing doc pages were affected); clean up some compiler
	warnings.
	* doc/doc.str: add BUGS and SEEALSO sections (to match texi2pod.pl
	which has them); Remove ITEM command (redundant with makedoc built-in
	"o", not used in any present source file so nothing is lost, anyway).
	* HOWTO: New file to hold information for maintainers regarding how
	to do things.  Initial sections on documentation and ELIX levels.
2009-03-25 19:13:24 +00:00
Jeff Johnston d57ff5a8ac 2009-03-18 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* libm/common/s_log2.c: New file.
        * libm/common/sf_log2.c: Ditto.
        * libm/common/Makefile.am: Add s_log2.c and sf_log2.c.
        * libm/common/Makefile.in: Regenerated.
        * libc/include/math.h: Add log2 and log2f function prototypes.
2009-03-18 18:11:18 +00:00
Jeff Johnston e2af45bfd1 2008-04-23 Ken Werner <ken.werner@de.ibm.com>
* libc/include/_ansi.h: _LONG_LONG renamed to _LONG_LONG_TYPE.
        * libc/include/math.h: Likewise.
2008-04-23 23:10:54 +00:00
Jeff Johnston 3cc8a378d1 2007-12-19 Dave Korn <dave.korn@artimi.com>
Jeff Johnston  <jjohnstn@redhhat.com>

        * libc/include/_ansi.h: Add _LONG_LONG definition.
        * libc/include/math.h (llrint, llrintf, rintl, lrintl, llrintl): Add
        prototypes.
        * libc/machine/i386/machine/fastmath.h: Add support for new i386
        fast math versions of rint, lrint, and llrint family functions.
        * libm/machine/i386/Makefile.am: Add new files.
        * libm/machine/i386/Makefile.in: Regenerated.
        * libm/machine/i386/f_llrint.c, libm/machine/i386/f_lrint.c,
        libm/machine/i386/f_rint.c, libm/machine/i386/f_llrintf.c,
        libm/machine/i386/f_lrintf.c, libm/machine/i386/f_rintf.c,
        libm/machine/i386/f_llrintl.c, libm/machine/i386/f_lrintl.c,
        libm/machine/i386/f_rintl.c:  New files with fast math implementations.
2007-12-19 22:20:25 +00:00
Jeff Johnston 78e66fb978 2007-09-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (_M_LOG2E): Replace with..
        (_M_LOG2_E): New macro.
        (log2, log2f, M_LOG2_E): Use _M_LOG2_E.
2007-09-07 15:30:59 +00:00
Jeff Johnston e65aa07ac6 Fix typo in ChangeLog and math.h. 2007-09-06 19:55:34 +00:00
Jeff Johnston 6494ee837c 2007-09-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (_M_LOG2E): New log2 of e macro.
        (log2): Use _M_LOG2E instead of M_LOG2E.
        (log2f): Ditto.
        (M_LOG2E): Define to be _M_LOG2E.
2007-09-06 19:51:46 +00:00
Jeff Johnston c4ccbcce6c 2007-07-11 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h: Fix so C99 functions/macros are accessible
        when -std=c99 is used when compiling and not when using C89.
2007-07-11 18:09:08 +00:00
Jeff Johnston e0500490bc 2007-05-17 Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
* libm/common/Makefile.am: Add support for exp10, exp10f,
        pow10, and pow10f functions.
        * libm/common/Makefile.in: Regenerated.
        * libm/common/s_pow10.c: New file.
        * libm/common/sf_pow10.c: Ditto.
        * libm/common/s_exp10.c: Ditto.
        * libm/common/sf_exp10.c: Ditto.
        * libc/include/math.h [!pow10]: New pow10 prototype.
        [!pow10f]: New pow10f prototype.
        [!exp10]: New exp10 prototype.
        [!exp10f]: New exp10f prototype.
2007-05-17 18:50:57 +00:00
Eric Blake 895d76fed6 * libc/include/math.h (INFINITY, NAN, FP_ILOGB0, FP_ILOGBNAN)
(MATH_ERRNO, MATH_ERREXCEPT, math_errhandling): Add macros
	required by POSIX.
	* libc/stdlib/ldtoa.c (USE_INFINITY): Rename from INFINITY, to
	avoid clash with <math.h>.
2007-05-16 19:59:40 +00:00
Jeff Johnston 976e9d281b 2007-04-26 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/ieeefp.h: use prefixed __ieeefp_ macros that can be
        overridden via machine/ieeefp.h.
        * libc/include/machine/ieeefp.h: Add SPU specific C99 and ieeefp
        macros for isnan and related macros.
        * libc/include/math.h: Allow C99 isfinite, isinf, and isnan to be
        overridden via machine/ieeefp.h.
        * libm/machine/spu/Makefile.am: Add new files.
        * libm/machine/spu/Makefile.in: Autogenerate with new files.
        * libm/machine/spu/sf_fpclassify.c: Add SPU specific __fpclassifyf.
        * libm/machine/spu/sf_finite.c: Add SPU specific finitef.
        * libm/machine/spu/sf_isinf.c: Add SPU specific isinff.
        * libm/machine/spu/sf_isinff.c: Add SPU specific __isinff.
        * libm/machine/spu/sf_isnan.c: Add SPU specific isnanf.
        * libm/machine/spu/sf_isnanf.c: Add SPU specific __isnanf.
        * libm/machine/spu/sf_nan.c: Add SPU specific nanf.
2007-04-26 19:23:37 +00:00
Jeff Johnston 75190a8fa2 2006-11-30 Lev Bishop <lev.bishop@gmail.com>
* libc/include/math.h: Allow C99 functions/macros to be
        defined for C++ even when __STRICT_ANSI__.
2006-11-30 23:40:12 +00:00
Jeff Johnston 884dc68fe0 2006-10-25 Vladimir Prus <vladimir@codesourcery.com>
* libc/include/math.h: (exception): Add a comment
        telling fixincludes that we handle C vs. C++ issue.
2006-10-25 18:46:40 +00:00
Jeff Johnston ba1bb1b368 2006-09-13 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/math.h: Remove _CONST from _LIB_VERSION, as it is
        supposed to be writable.
        * libm/common/s_lib_ver.c: Ditto.
2006-09-13 22:06:43 +00:00
Jeff Johnston e48682cff5 2006-02-27 Jeff Johnston <jjohnstn@redhat.com>
* Makefile.am (MATHOBJS_IN_LIBC): Add s_isinfd, sf_isinff,
        s_isnand, and sf_isnanf object files.
        * Makefile.in: Regenerated.
        * libc/include/ieeefp.h: Undef isnan and isinf to avoid
        conflict if <math.h> has previously been included.
        * libc/include/math.h
        * libm/common/Makefile.am: Add new s_isinfd, s_isnand, sf_isinff,
        and sf_isnanf files.  Also support s_isnan, sf_isnan, s_isinf, and
        sf_isinf files which have been moved from math/mathfp directories.
        * libm/common/Makefile.in: Regenerated.
        * libm/common/s_isinfd.c: New file.
        * libm/common/s_isnand.c: Ditto.
        * libm/common/sf_isinff.c: Ditto.
        * libm/common/sf_isnanf.c: Ditto.
        * libm/common/s_isinf.c: Moved from libm/math directory.
        * libm/common/s_isnan.c: Ditto.
        * libm/common/sf_isinf.c: Ditto.
        * libm/common/sf_isnan.c: Ditto.
        * libm/math/Makefile.am: Remove isinf and isnan family functions
        which have been moved into common directory.
        * libm/mathfp/Makefile.am: Ditto.
        * libm/math/Makefile.in: Regenerated.
        * libm/mathfp/Makefile.in: Ditto.
        * libm/math/s_isinf.c: Removed.
        * libm/math/s_isnan.c: Ditto.
        * libm/math/sf_isinf.c: Ditto.
        * libm/math/sf_isnan.c: Ditto.
        * libm/mathfp/s_isinf.c: Ditto.
        * libm/mathfp/s_isnan.c: Ditto.
        * libm/mathfp/sf_isinf.c: Ditto.
        * libm/mathfp/sf_isnan.c: Ditto.
2006-02-27 23:51:28 +00:00
Jeff Johnston 09968b6d27 2005-10-20 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (HUGE_VAL, HUGE_VALF, HUGE_VALL): When
        gcc is 3.3 or greater, use special gcc builtins.
2005-10-20 21:42:33 +00:00
Jeff Johnston d2c2c1328b 2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (HUGE_VALF, HUGE_VALL): New.
        * libm/common/Makefile.am: Add s_infconst.c support.
        * libm/common/Makefile.in: Regenerated.
        * libm/common/s_infconst.c: New file with float and
        long double infinity support added.
        * libm/math/Makefile.am: Remove s_infconst.c support.
        * libm/math/Makefile.in: Regenerated.
        * libm/math/s_infconst.c: Moved to common directory.
        * libm/mathfp/Makefile.am: Remove s_infconst.c support.
        * libm/mathfp/Makefile.in: Regenerated.
        * libm/mathfp/s_infconst.c: Moved to common directory.
2005-10-14 21:11:39 +00:00
Jeff Johnston b59cab1e2e 2005-02-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (isfinite, isnormal, isunordered): Change
        input variable names to avoid mixups with nesting macros.
2005-02-07 21:04:22 +00:00
Jeff Johnston 6efbdc7da5 2003-08-13 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h: Add prototypes for __signbitf and
        __signbitd.
2003-08-13 17:36:10 +00:00
Alexandre Oliva 03d65dd99b * libc/include/math.h (nan, nanf): Update prototype to C99.
* libm/common/s_nan.c (nan): Likewise.
* libm/common/s_nanf.c (nanf, nan): Likewise.
* libc/sys/linux/cmath/math_private.h (nan, nanf): Likewise.
2003-07-09 17:52:31 +00:00