Commit Graph

248 Commits

Author SHA1 Message Date
Yaakov Selkowitz 9087163804 ansification: remove _DEFUN
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:26 -06:00
Yaakov Selkowitz fff27f8429 ansification: remove _DEFUN_VOID
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:19 -06:00
Yaakov Selkowitz 0bda30e1ff ansification: remove _CONST
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:08 -06:00
Yaakov Selkowitz 6783860a2e ansification: remove _AND
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:05 -06:00
Jim Wilson c874f1145f newlib: Don't do double divide in powf.
* Use 0.0f instead of 0.0 in divide.
2017-12-13 11:33:19 +01:00
Jim Wilson c338bc2255 Don't call double rint from float powf.
Updated patch to use 0.0f in addition to calling rintf.

Tested same way as before, with a testcase that triggers the code and
make check.

OK?

	newlib/
	* libm/math/wf_pow.c (powf): Call rintf instead of rint.  Use 0.0f
	for compare.
2017-12-13 11:03:10 +01:00
Jon Turney c006fd459f makedoc: make errors visible
Discard QUICKREF sections, rather than writing them to stderr
Discard MATHREF sections, rather than discarding as an error
Pass NOTES sections through to texinfo, rather than discarding as an error
Don't redirect makedoc stderr to .ref file
Remove makedoc output on error
Remove .ref files from CLEANFILES
Regenerate Makefile.ins

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-12-07 11:54:11 +00:00
Yaakov Selkowitz 9f369d3c8d mathfp: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:54 -06:00
Yaakov Selkowitz ec4c079f4b math: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:53 -06:00
Yaakov Selkowitz 59822e777f libm/machine: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:53 -06:00
Yaakov Selkowitz ac8b60bdd1 complex: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:53 -06:00
Yaakov Selkowitz 3312f960a7 libm/common: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:53 -06:00
Szabolcs Nagy 56e494c074 fix internal __ieee754_expf and __ieee754_logf calls
The recently added new math code inlines error handling instead of using
error handling wrappers around __ieee754* internal symbols, and thus the
__ieee754* symbols are no longer provided.

However __ieee754_expf and __ieee754_logf are used in the implementation
of a number of other math functions.  These symbols are safe to redirect
to the external expf and logf symbols, because those names are always
reserved when single precision math functions are reserved and the
additional error handling code is either not reached or there will be
an error in the final result that will override an internal spurious
errno setting.

For consistency all of __ieee754_expf, __ieee754_logf and __ieee754_powf
are redirected using a macro.
2017-10-20 11:19:02 +02:00
Szabolcs Nagy c156098271 New expf, exp2f, logf, log2f and powf implementations
Based on code from https://github.com/ARM-software/optimized-routines/

This patch adds a highly optimized generic implementation of expf,
exp2f, logf, log2f and powf.  The new functions are not only
faster (6x for powf!), but are also smaller and more accurate.
In order to achieve this, the algorithm uses double precision
arithmetic for accuracy, avoids divisions and uses small table
lookups to minimize the polynomials.  Special cases are handled
inline to avoid the unnecessary overhead of wrapper functions and
set errno to POSIX requirements.

The new functions are added under newlib/libm/common, but the old
implementations are kept (in newlib/libm/math) for non-IEEE or
pre-C99 systems.  Targets can enable the new math code by defining
__OBSOLETE_MATH_DEFAULT to 0 in newlib/libc/include/machine/ieeefp.h,
users can override the default by defining __OBSOLETE_MATH.
Currently the new code is enabled for AArch64 and AArch32 with VFP.
Targets with a single precision FPU may still prefer the old
implementation.

libm.a size changes:
arm: -1692
arm/thumb/v7-a/nofp: -878
arm/thumb/v7-a+fp/hard: -864
arm/thumb/v7-a+fp/softfp: -908
aarch64: -1476
2017-10-13 10:58:00 +02:00
Brian Inglis f9b24fad7c newlib/libm/complex/cargl.c change imag() real() to cimagl() creall() 2017-09-19 15:36:12 -05:00
Kito Cheng 7040b2de08 Add RISC-V port for libm
Contributor list:
    - Michael Neilly  <mneilly@yahoo.com>
    - Kito Cheng  <kito.cheng@gmail.com>
2017-08-17 12:54:56 -04:00
Aditya Upadhyay 0e0900cb40 Importing catanl long double complex method from NetBSD. 2017-07-28 20:36:09 +02:00
Aditya Upadhyay 124ccc500e Fixing HUGE_VALF to HUGE_VALL. 2017-07-28 20:30:30 +02:00
Corinna Vinschen 181d8393ae newlib: fix file mode of newly added complex sources
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-29 15:30:35 +02:00
Corinna Vinschen 074ca98595 newlib: libm/complex/Makefile.in: regenerate 2017-06-29 13:55:10 +02:00
Aditya Upadhyay 45ae81fc91 Adding csinl.c in Makefile.am
Signed-off-by: Aditya Upadhyay <aadit0402@gmail.com>
2017-06-29 13:54:34 +02:00
Aditya Upadhyay 5bc320d3b5 Importing csinl.c from NetBSD. 2017-06-29 13:54:31 +02:00
Aditya Upadhyay 72b051888e Importing csinhl.c from NetBSD. 2017-06-29 13:44:32 +02:00
Aditya Upadhyay 0d924f0e02 Importing casinhl.c from NetBSD. 2017-06-29 13:44:32 +02:00
Aditya Upadhyay f834c77e7d Importing ctanl.c from NetBSD. 2017-06-29 13:44:32 +02:00
Aditya Upadhyay 67b376ad3f Importing ctanhl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay c907007fb0 Importing cpowl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay 716d7107e4 Importing conjl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay fdf82d6f1b Importing catanhl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay a168d244c6 Importing casinl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay ed09969078 Importing ccosl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay 28daf6d48b Importing cacosl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay eee8294c42 Adding cephes_subrl.h and cephes_subrl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay b1b12e1e00 Importing cexpl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay 4c2556e935 Importing cprojl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay 3f1f3a2299 Importing cargl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay 436bf2929c Importing csqrtl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay 79c8462d86 Importing clogl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay 934145f311 Importing cacoshl.c from NetBSD. 2017-06-29 13:44:31 +02:00
Aditya Upadhyay 35cd6863fb ccoshl: Align formatting to upstream
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-14 10:36:38 +02:00
Aditya Upadhyay ed82849b8f Importing ccoshl.c from netbsd.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-13 10:41:06 +02:00
Corinna Vinschen bdb017b30c newlib: remove __infinity{f,ld} constants
previous commit 4c90db7bc8 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-04-18 12:17:26 +02:00
Sebastian Huber ffbfb332d6 ARM: Fix IEEE-754 sqrt implementation
Older GCC (e.g. 4.9.3) seem to define __ARM_FP even in case soft-float
is used.
2017-03-22 10:01:50 +01:00
Sebastian Huber baf32fb85f ARM: Optimize IEEE-754 sqrt implementation
Use the vsqrt.f64 and vsqrt.f32 instructions if available.
2017-03-21 14:42:26 +01:00
Corinna Vinschen 5367b96a4b Fix versions in documentation (manually for now)
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-01-09 16:22:02 +01:00
Jeff Johnston 61f181d6b8 Bump release to 2.5.0 for yearly snapshot. 2016-12-22 21:33:54 -05:00
Thomas Preudhomme cf6e411f17 Fix pdf build failure with texinfo 6.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-10-25 17:45:11 +02:00
Jon Turney d7e47a557e Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
Jon Turney 0b4cbd2fb8 Make newlib manpages (v3)
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-07-04 14:17:10 +01:00
Jon Turney f145c2e261 Revert "Make newlib manpages via DocBook XML (v3)"
This reverts commit 041ea41068.
2016-06-25 17:07:43 +01:00