aboutsummaryrefslogtreecommitdiff
path: root/newlib/libm
AgeCommit message (Collapse)AuthorFilesLines
2017-06-29Importing ctanl.c from NetBSD.Aditya Upadhyay2-1/+57
2017-06-29Importing ctanhl.c from NetBSD.Aditya Upadhyay2-1/+48
2017-06-29Importing cpowl.c from NetBSD.Aditya Upadhyay2-1/+57
2017-06-29Importing conjl.c from NetBSD.Aditya Upadhyay2-1/+47
2017-06-29Importing catanhl.c from NetBSD.Aditya Upadhyay2-1/+43
2017-06-29Importing casinl.c from NetBSD.Aditya Upadhyay2-1/+121
2017-06-29Importing ccosl.c from NetBSD.Aditya Upadhyay2-1/+46
2017-06-29Importing cacosl.c from NetBSD.Aditya Upadhyay2-1/+46
2017-06-29Adding cephes_subrl.h and cephes_subrl.c from NetBSD.Aditya Upadhyay3-2/+140
2017-06-29Importing cexpl.c from NetBSD.Aditya Upadhyay2-1/+47
2017-06-29Importing cprojl.c from NetBSD.Aditya Upadhyay2-1/+65
2017-06-29Importing cargl.c from NetBSD.Aditya Upadhyay2-1/+19
2017-06-29Importing csqrtl.c from NetBSD.Aditya Upadhyay2-1/+113
2017-06-29Importing clogl.c from NetBSD.Aditya Upadhyay2-0/+47
2017-06-29Importing cacoshl.c from NetBSD.Aditya Upadhyay2-1/+46
2017-06-14ccoshl: Align formatting to upstreamAditya Upadhyay1-6/+6
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-13Importing ccoshl.c from netbsd.Aditya Upadhyay3-4/+55
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-04-18newlib: remove __infinity{f,ld} constantsCorinna Vinschen3-31/+4
previous commit 4c90db7bc89e7fa1077025fefdd58269dc71a6ac introduced a compile time error because libm/common/s_infconst.c used the remove __fmath, __dmath, and __ldmath union types. Since this is very old, and unused for a very long time, just drop the file and thus the __infinity constants entirely. Exception: Cygwin exports __infinity from the beginning. There's a very, VERY low probability that any existing executable or lib still uses this constant, but we just keep it in for backward compat, nevertheless. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-03-22ARM: Fix IEEE-754 sqrt implementationSebastian Huber2-2/+2
Older GCC (e.g. 4.9.3) seem to define __ARM_FP even in case soft-float is used.
2017-03-21ARM: Optimize IEEE-754 sqrt implementationSebastian Huber4-1/+108
Use the vsqrt.f64 and vsqrt.f32 instructions if available.
2017-01-09Fix versions in documentation (manually for now)Corinna Vinschen1-2/+2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-12-22Bump release to 2.5.0 for yearly snapshot.newlib-2_5_0Jeff Johnston8-72/+73
2016-10-25Fix pdf build failure with texinfo 6.1.0Thomas Preudhomme1-1/+0
Hi, make pdf on Ubuntu 16.04 fail with: newlib/libc/libc.texinfo:9: Missing @endcsname inserted. After a lot of fiddling the reason appears to be the combination of concept and function index despite a lack of concept index entries. Arguably texinfo should not error in that case but here we are, newlib will fail to build its documentation on some systems because of this. Since libc.texinfo only contains function index entries this patch simply removes the combination of indices. It does the same for libm.texinfo which has concept index entries but no function index entries. Tested by running make pdf, make dvi, make info and make html successfully. libc.pdf appears to have only one index as expected. == Proposed commit message == Fix pdf build failure with texinfo 6.1.0 as provided in Ubuntu 16.04. Index combination in libc.texinfo and libm.texinfo fails because both file have only one type of index entries. Removing index combination is thus harmless and solves the problem. Is this ok for master? Best regards, Thomas
2016-07-04Regenerate newlib MakefilesJon Turney11-30/+164
2016-07-04Make newlib manpages (v3)Jon Turney3-1/+34
Add makedocbook, a tool to process makedoc markup and output DocBook XML refentries. Process all the source files which are processed with makedoc with makedocbook as well Add chapter-texi2docbook, a tool to automatically generate DocBook XML chapter files from the chapter .texi files. For generating man pages all we care about is the content of the refentries, so all this needs to do is convert the @include of the makedoc generated .def files to xi:include of the makedocbook generated .xml files. Add skeleton Docbook XML book files, lib[cm].in.xml which include these generated chapters, which in turn include the generated files containing refentries, which is processed with xsltproc to generate the lib[cm].xml Add new make targets to generate and install man pages from lib[cm].xml
2016-06-25Revert "Make newlib manpages via DocBook XML (v3)"Jon Turney3-34/+1
This reverts commit 041ea4106881a3434e63ca95a38c911515793f09.
2016-06-25Make newlib manpages via DocBook XML (v3)Jon Turney3-1/+34
Add makedocbook, a tool to process makedoc markup and output DocBook XML refentries. Process all the source files which are processed with makedoc with makedocbook as well Add chapter-texi2docbook, a tool to automatically generate DocBook XML chapter files from the chapter .texi files. For generating man pages all we care about is the content of the refentries, so all this needs to do is convert the @include of the makedoc generated .def files to xi:include of the makedocbook generated .xml files. Add skeleton Docbook XML book files, lib[cm].in.xml which include these generated chapters, which in turn include the generated files containing refentries, which is processed with xsltproc to generate the lib[cm].xml Add new make targets to generate and install man pages from lib[cm].xml
2016-04-07math: fix isinf/isnan on SPU after move to math.hYaakov Selkowitz2-0/+4
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-04-05math: update isinf/isnan function comments after move to math.hYaakov Selkowitz6-18/+18
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-03-29Bump up newlib version to 2.4.0 due to feature test refactoringnewlib-2_4_0Jeff Johnston7-79/+79
2016-03-26finitel: Use correct GCC builtinCorinna Vinschen1-1/+1
__builtin_isinf_sign doesn't reflect the correct return value for NaN to emulate finite function. Use __builtin_isfinite instead whichg is available since GCC 4.4 just as __builtin_isinf_sign. * libm/common/sl_finite.c (finitel): Use __builtin_isfinite. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-02-26Enable HW interrupt setup on x86/x86_64 systems by defaultnewlib-snapshot-20160226Corinna Vinschen1-1/+1
* configure.host: Define _I386MACH_DISABLE_HW_INTERRUPTS on rdos. Remove setting _I386MACH_ALLOW_HW_INTERRUPTS anywhere else. * libc/machine/i386/i386mach.h: Replace test for _I386MACH_ALLOW_HW_INTERRUPTS with test for !_I386MACH_DISABLE_HW_INTERRUPTS. * libc/machine/x86_64/x86_64mach.h: Ditto. * libc/sys/linux/machine/i386/i386mach.h: Ditto. * libm/machine/i386/i386mach.h: Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-02-22libm/complex: add clog10, clog10fYaakov Selkowitz5-24/+100
newlib/ * libc/include/complex.h (clog10, clog10f): Declare. * libm/complex/Makefile.am (src): Add clog10.c. (fsrc): Add clog10f.c. (CHEWOUT_FILES): Add clog10.def. * libm/complex/Makefile.in: Regenerate. * libm/complex/clog10.c: New file. * libm/complex/clog10f.c: New file. * libm/complex/complex.tex: Add references to clog10 docs. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-02-17Also fix libm/machine generated files.Jeff Johnston2-19/+12139
2016-02-17Fix libm regenerated files again.Jeff Johnston2-134/+2920
2016-02-17Fix regeneration of libm autotool files.Jeff Johnston2-7/+9337
2016-02-17Define the newlib version macros in one place: _newlib_version.h.Pieter du Preez4-24273/+37
Currently, the newlib version information needs to be updated in two places: - newlib/acinclude.m4 - newlib/libc/include/sys/features.h The goal of this patch is to: - supply a single location for defining the newlib version information: newlib/acinclude.m4 - define __NEWLIB__, __NEWLIB_MINOR__ and __NEWLIB_PATCHLEVEL__ This is in line with what gcc does for its version macros. See: https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html This patch moves the definition of the _NEWLIB_VERSION, __NEWLIB__ and __NEWLIB_MINOR__ macros from newlib/libc/include/sys/features.h, to the newly generated newlib/_newlib_version.h file. Additionally, the __NEWLIB_PATCHLEVEL__ macro was created, for completeness. In order to stay backwards compatible, newlib/_newlib_version.h gets included by newlib/newlib.h and newlib/libc/include/sys/features.h. Note: This patch does _not_ include the modifications to the following files, as these should all be generated any way. *Makefile.in, *aclocal.m4, *configure stamp-* files Signed-off-by: Pieter du Preez <pdupreez@gmail.com>
2016-01-04Fix up errors in regenerated files for 2.3.0 release.newlib-snapshot-20160104Jeff Johnston1-10/+10
2015-12-21Regenerate files for newlib 2.3.0.newlib-2_3_0Jeff Johnston7-89/+122
2015-12-09Check for 64 FP instructions availability in libm before using themThomas Preud'homme6-6/+6
Currently, double precision math functions in newlib/libm/machine/arm detect whether neon instructions can be used for double precision computation by checking the architecture version (>= 8) and the availability of floating-point instructions. However, these instructions would not be available if targeting fpv5-sp-d16 as the FPU, which by definition does not have 64bit float instructions. This patch adds a check that __ARM_FP advertises 64bit float instructions. * libm/machine/arm/s_ceil.c: Also check that 64bit FP instructions are available in the guard. * libm/machine/arm/s_floor.c: Likewise. * libm/machine/arm/s_nearbyint.c: Likewise. * libm/machine/arm/s_rint.c: Likewise. * libm/machine/arm/s_round.c: Likewise. * libm/machine/arm/s_trunc.c: Likewise.
2015-11-12doc: Fix some inconsistent QUICKREF linesJon Turney5-5/+10
makedoc defines a command as 'all upper case, and alone on a line'. A few QUICKREF lines currently violate this by having some additional text after the QUICKREF. So, currently, these lines are treated as an unknown command. This is benign as QUICKREF currently does nothing but produce some ignored output on stderr. I'm not sure what the intent of QUICKREF is. 2015-11-06 Jon Turney <jon.turney@dronecode.org.uk> * libm/mathfp/s_acos.c: Fix QUICKREF. * libm/mathfp/e_acosh.c: Ditto. * libm/math/w_asin.c: Ditto. * libm/mathfp/e_acosh.c: Ditto. * libm/mathfp/s_acos.c: Ditto. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2015-11-02Move duplicated documentation rules to Makefile.sharedJeff Johnston12-208/+193
- Also, harmonize libm to use CHEWOUT_FILES like libc, rather than chobj. Update documentation appropriately. * HOWTO: Update. * Makefile.shared: Move documentation rules to here... * libc/argz/Makefile.am: ... from here ... * libc/ctype/Makefile.am: ... and here. * libc/errno/Makefile.am: Ditto. * libc/iconv/Makefile.am: Ditto. * libc/iconv/ccs/Makefile.am : Ditto. * libc/iconv/ces/Makefile.am: Ditto. * libc/iconv/lib/Makefile.am: Ditto. * libc/locale/Makefile.am: Ditto. * libc/misc/Makefile.am: Ditto. * libc/posix/Makefile.am: Ditto. * libc/reent/Makefile.am: Ditto. * libc/search/Makefile.am: Ditto. * libc/stdio/Makefile.am: Ditto. * libc/stdio64/Makefile.am: Ditto. * libc/stdlib/Makefile.am : Ditto. * libc/string/Makefile.am: Ditto. * libc/syscalls/Makefile.am: Ditto. * libc/time/Makefile.am : Ditto. * libc/unix/Makefile.am: Ditto. * libc/xdr/Makefile.am: Ditto. * libm/common/Makefile.am: Ditto. * libm/complex/Makefile.am: Ditto. * libm/math/Makefile.am: Ditto. * libm/mathfp/Makefile.am: Ditto.
2015-11-02Consistently use an em-dash in math functions.Jeff Johnston20-20/+20
- also move previous ChangeLog entry to newlib instead of top-level * libc/time/wcsftime.c: Consistently use an em-dash in FUNCTION summary. * libm/common/isgreater.c: Ditto. * libm/common/s_fdim.c: Ditto. * libm/common/s_fma.c: Ditto. * libm/common/s_fmax.c: Ditto. * libm/common/s_fmin.c: Ditto. * libm/common/s_infinity.c: Ditto. * libm/common/s_isnan.c: Ditto. * libm/common/s_log2.c: Ditto. * libm/common/s_logb.c: Ditto. * libm/common/s_lrint.c: Ditto. * libm/common/s_lround.c: Ditto. * libm/common/s_nearbyint.c: Ditto. * libm/common/s_remquo.c: Ditto. * libm/common/s_rint.c: Ditto. * libm/common/s_round.c: Ditto. * libm/common/s_scalbn.c: Ditto. * libm/common/s_signbit.c: Ditto. * libm/common/s_trunc.c: Ditto. * libm/math/w_exp2.c: Ditto. * libm/math/w_gamma.c: Ditto.
2015-11-02Add missing semicolons to prototypes.Jeff Johnston4-14/+14
* libc/stdio/fseek.c: Add missing semicolons to prototypes in SYNOPSIS. * libc/stdio/fwide.c: Ditto. * libc/stdio64/fseeko64.c: Ditto. * libc/string/strtok.c: Ditto. * libc/string/wcstok.c: Ditto. * libm/math/w_cosh.c: Ditto. * libm/math/w_fmod.c: Ditto. * libm/mathfp/s_cosh.c: Ditto. * libm/mathfp/s_fmod.c: Ditto.
2015-07-24Remove workaround for texinfo bug with underscores in filenames from ↵newlib-snapshot-20150723Jon TURNEY1-116/+28
mothballed mathfp/ This got removed everywhere else in commit 139f923b, so I'm assuming whatever ancient bug this was has been fixed long since. There are plenty of other uses of texinfo with a filename containing an underscore now. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-06-24Use makedoc output files which are generated but aren't includedJon TURNEY3-2/+8
I think these are accidental omissions, as these source files are listed to be chewed by makedoc, but the result is not included by any texinfo source file. Future work: Nothing in libc/reent/ which is processed by makedoc is included by reent.tex 2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/stdlib/stdlib.tex: Include itoa and utoa, and add to menu. * libc/string/strings.tex: Include memrchr and rawmemchr, and add to menu. * libm/math/math.tex: Include exp10 and pow10, and add to menu. * libm/common/s_exp10.c: Improve one-line description. * libm/common/s_exp10.c: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-06-23Fix SYNOPSIS prototypes without marked up parameter namesJon TURNEY1-2/+2
2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/stdlib/llabs.c: Mark up parameter name in ANSI_SYNOPSIS. * libc/time/tzset.c: Add and mark up parameter in SYNOPSIS. * libm/common/s_nan.c: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-06-01aarch64: fabs and sqrt implementation with inline asmSzabolcs Nagy6-7/+181
* libm/machine/aarch64/e_sqrt.c: New file. * libm/machine/aarch64/ef_sqrt.c: New file. * libm/machine/aarch64/s_fabs.c: New file. * libm/machine/aarch64/sf_fabs.c: New file. * libm/machine/aarch64/Makefile.in: Add new source files. * libm/machine/aarch64/Makefile.am: Regenerate. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-05-27Avoid unneeded truncation to "int"newlib-snapshot-20150526DJ Delorie1-1/+1
* libm/math/e_sqrt.c (__ieee754_sqrt): Don't truncate constant to "int".
2015-05-27Update signbit functions to work on targets where integers are only 16-bits.Nick Clifton1-4/+4
* libm/common/s_signbit.c (__signbitf): Fix for 16-bit targets. (__signbitd): Likewise.