newlib-cygwin/newlib/libm/mathfp
Mike Frysinger ac9f8c46b1 newlib: libm: merge build up a directory
Convert all the libm/ subdir makes into the top-level Makefile.  This
allows us to build all of libm from the top Makefile without using any
recursive make calls.  This is faster and avoids the funky lib.a logic
where we unpack subdir archives to repack into a single libm.a.  The
machine override logic is maintained though by way of Makefile include
ordering, and source file accumulation in libm_a_SOURCES.

One thing to note is that this will require GNU Make because of:
	libm_a_CFLAGS = ... $(libm_a_CFLAGS_$(subst /,_,$(@D)))
This was the only way I could find to supporting per-dir compiler
settings, and I couldn't find a POSIX compatible way of transforming
the variable content.  I don't think this is a big deal as other
Makefiles in the tree are using GNU Make-specific syntax, but I call
this out as it's the only one so far in the new automake code that
I've been writing.

Automake doesn't provide precise control over the output object names
(by design).  This is fine by default as we get consistent names in all
the subdirs: libm_a-<source>.o.  But this relies on using the same set
of compiler flags for all objects.  We currently compile libm/common/
with different optimizations than the rest.

If we want to compile objects differently, we can create an intermediate
archive with the subset of objects with unique flags, and then add those
objects to the main archive.  But Automake will use a different prefix
for the objects, and thus we can't rely on ordering to override.

But if we leverage $@, we can turn Automake's CFLAGS into a multiplex
on a per-dir (and even per-file if we wanted) basis.  Unfortunately,
since $@ contains /, Automake complains it's an invalid name.  While
GNU Make supports this, it's a POSIX extension, so Automake flags it.
Using $(subst) avoids the Automake warning to get a POSIX compliant
name, albeit with a GNU Make extension.
2022-02-17 20:56:32 -05:00
..
Makefile.inc newlib: libm: merge build up a directory 2022-02-17 20:56:32 -05:00
README 2012-10-24 Jeff Johnston <jjohnstn@redhat.com> 2012-10-24 21:01:39 +00:00
e_acosh.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
e_atanh.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
e_hypot.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
e_j0.c
e_j1.c
e_remainder.c mathfp: remove TRAD_SYNOPSIS 2017-12-01 03:41:54 -06:00
e_scalb.c
ef_acosh.c
ef_atanh.c
ef_hypot.c
ef_j0.c
ef_j1.c
ef_remainder.c
ef_scalb.c
er_gamma.c
er_lgamma.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
erf_gamma.c
erf_lgamma.c
mathfp.tex 2006-03-02 Jeff Johnston <jjohnstn@redhat.com> 2006-03-02 16:46:12 +00:00
s_acos.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
s_asin.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_asine.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_asinh.c mathfp: remove TRAD_SYNOPSIS 2017-12-01 03:41:54 -06:00
s_atan.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_atan2.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
s_atangent.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_ceil.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_cos.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_cosh.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
s_erf.c mathfp: remove TRAD_SYNOPSIS 2017-12-01 03:41:54 -06:00
s_exp.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_exp2.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_fabs.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_floor.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_fmod.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
s_frexp.c mathfp: remove TRAD_SYNOPSIS 2017-12-01 03:41:54 -06:00
s_ispos.c
s_ldexp.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_log.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_log10.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_logarithm.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
s_mathcnst.c 2005-10-31 Darin Johnson <darin@usa.net> 2005-10-31 18:47:20 +00:00
s_numtest.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_pow.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
s_signif.c
s_sin.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_sincos.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_sine.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_sineh.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_sinf.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_sinh.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_sqrt.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_tan.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_tanh.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
s_tgamma.c
sf_acos.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_asin.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_asine.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_asinh.c
sf_atan.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_atan2.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_atangent.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_ceil.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_cos.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_cosh.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_erf.c
sf_exp.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_exp2.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_fabs.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_floor.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_fmod.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_frexp.c 2006-01-10 Jeff Johnston <jjohnstn@redhat.com> 2006-01-10 16:51:58 +00:00
sf_ispos.c
sf_ldexp.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_log.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_log10.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_logarithm.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_numtest.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_pow.c 2005-09-01 Jeff Johnston <jjohnstn@redhat.com> 2005-09-01 17:53:02 +00:00
sf_signif.c
sf_sin.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_sincos.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_sine.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_sineh.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_sinh.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_sqrt.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_tan.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_tanh.c ansification: remove _DEFUN 2018-01-17 11:47:26 -06:00
sf_tgamma.c
w_cabs.c
w_drem.c
w_jn.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
wf_cabs.c
wf_drem.c
wf_jn.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
zmath.h ansification: remove _EXFUN, _EXFUN_NOTHROW 2018-01-17 11:47:29 -06:00

README

This directory was an experiment to use floating-point operations to implement
the math library when a processor had a floating-point instruction set.  The
experiment was a failure in that some of the algorithms chosen (e.g. recursive
algorithms for sin/cos, etc..) are too simple and do not provide proper accuracy 
nor handle very large or very small inputs adequately.

The code is considered moth-balled.  The stable math library routines can be
found in libm/math and the configuration option to use this has been removed.

If you wish to experiment with the concept, please feel free and report back if
you have major improvements.