Home | History | Annotate | Download | only in libm
History log of /src/lib/libm/Makefile
RevisionDateAuthorComments
 1.242  06-Apr-2025  rillig all: remove 'constant in conditional context' from LINTFLAGS

Lint no longer emits this message, as it produced too many false
positives.
 1.241  15-Feb-2025  tsutsui libm: Add missing fma(3) and variants for hppa.

Fixes a build error on pkgsrc/lang/python312. Ok'ed by skrll@.
Should be pulled up to netbsd-10.
 1.240  29-Oct-2024  nat Pull in missing functions for MKSOFTFLOAT.
 1.239  03-Jul-2024  mrg move a COPTS setting after bsd.own.mk.

the riscv64 compat build trips on this saying:
bsd.rv32.mk" line 25: while evaluating variable "COPTS": while evaluating condition " == "gcc"": Bad condition
 1.238  10-Jun-2024  riastradh libm: Fix arm expected symbol list harder.

LIB is not defined by the time we need it in the m.expsym rule, so
just say m here like in the other lines.
 1.237  10-Jun-2024  riastradh libm: Fix mips and arm expected symbol lists.

Had forgotten that they were overriding LIB_EXPSYM. Use a new
intermediate variable EXPSYM_SRC_MD for that.
 1.236  09-Jun-2024  riastradh libm: Factor out common expected symbol list.

Should substantially reduce the maintenance burden.
 1.235  14-May-2024  riastradh libm: Fix powerpc64 build.

- Include fenv.c and fma(3) symbols (which just use the FMADD
instruction).
- Note the .FN symbols in libm for the asm functions. The FN symbols
point at the function _descriptors_; the .FN symbols point at the
first instruction of the function.

XXX Unclear why we have the .FN symbols for asm functions but not for
C functions. I'm not sure we should be exporting them.
 1.234  09-May-2024  riastradh libm: Add frexpf and frexpl on VAX.

These are trivial subroutines, not symbol aliases, for separate
reasons:

- frexpf has a different ABI from frexp (float vs double argument)

- frexp is defined in libc, not libm, so although long double is the
same as double, frexpl can't be an alias in libm of a symbol
defined in libc
 1.233  09-May-2024  riastradh libm: Split expected symbols in mips further by 32-bit vs 64-bit.

32-bit has binary64 long double, same as double; 64-bit has binary128
long double, which is implemented with a few more symbols in libm
(which should maybe be hidden internal symbols, but let's get this
diagnostic measure in the build working before we think about
possibly deleting private symbols).
 1.232  08-May-2024  riastradh libm: Split expected symbols on arm and mips by hard/soft float.
 1.231  05-May-2024  riastradh libm: long double is just double on hppa, so don't use s_rintl.c.

PR misc/58054
 1.230  05-May-2024  riastradh libm: No s_rintl.c on mips32.

This is only for machines where long double is not double.

Not 100% sure this is the right criterion, but there's a good chance
it is.
 1.229  05-May-2024  riastradh libm: long double is just double on arm, so don't use s_rintl.c.

PR misc/58054
 1.228  05-May-2024  riastradh libm: New s_rintl.S for x86.

Prompted by PR lib/58054.
 1.227  26-Mar-2024  rillig libm/s_logl: suppress lint warnings

Seen on sparc64.
 1.226  26-Jan-2024  nros sinhf is in the same manual page as sinh not sin
 1.225  26-Jan-2024  nros Add the long double math functions recently added from FreeBSD to their related man pages
 1.224  21-Jan-2024  christos Bring in more long double functions from FreeBSD.
 1.223  21-Dec-2023  jklos Fix building with M68040 and M68060 options.
 1.222  08-Oct-2023  he libm Makefile: add fma() functions for mips.

This pushed the ramdisk size, so that needed to be bumped as well.
Otherwise, there were no build issues for either 32 or 64 bit mips.
Sort-of OK'ed by simonb@.
 1.221  08-Aug-2023  rin libm: Add fma(3) and friends to m68k
 1.220  09-Jul-2023  rin libm: Add missing fma(3) and friends for sh3.
 1.219  10-Apr-2023  rillig libm: suppress lint warning about '>>' on signed integer

GCC has implementation-defined behavior for that case.
 1.218  27-Aug-2022  christos branches: 1.218.2;
Fix vax build.
 1.217  27-Aug-2022  christos Add sincos{,f,l} from FreeBSD
 1.216  23-Jun-2022  martin Use "fmadd" to implement fma(3) on ppc.
 1.215  23-Jun-2022  he libm: build fma(3), fmaf(3), fmal(3) on powerpc.

For now this builds the C version, for completeness, so
that e.g. lang/ocaml can be configured & built. However,
googling reveals that powerpc does have a "fused multiply add"
instruction, ref.
https://www.ibm.com/docs/en/aix/7.1?topic=set-fmadd-fma-floating-multiply-add-instruction
so this could probably be taken advantage of for a more
optimized version.
 1.214  21-Jul-2021  tnn libm: build fma(3), fmaf(3), fmal(3) on alpha

Alpha has no hardware-assisted fused multiply-add, so the fallback
C implementation must be used. A basic smoke test shows the
implementation works for
"x * x - 1.0f" vs "fmaf(x, x, -1.0f)" with "volatile float x = 1.0008f;"
 1.213  25-Apr-2021  christos Use ${MACHINE_MIPS64}
 1.212  11-Nov-2019  joerg Update LLVM to 10.0.0git (01f3a59fb3e2542fce74c768718f594d0debd0da)
 1.211  11-Oct-2019  nros Add manpage links for frexpf and frexpl.

Manpage links were missing for frexpf and frexpl even thogh they were
mentioned in the manpage for frexp.
 1.210  27-Apr-2019  kamil branches: 1.210.2;
Add a C99 symbol to libm: nexttowardl

It's an alias for an already existing symbol nextafterl.

Patch obtained from <mgorny>

Detected by the LLVM buildbot breakage in tests.
 1.209  25-Apr-2019  maya document cosl with MLINKS and in the man page
 1.208  17-Apr-2019  mrg also want s_nexttoward.c on riscv. now tests/lib/libm links.
 1.207  15-Apr-2019  maya we need rintl (long double) to link binaries
 1.206  22-Feb-2019  maya Default our libm to -frounding-math, if built with GCC.

The long-standing GCC default is to not respect rounding mode.
it looks like GCC 7 optimizes rint to a builtin, causing our few
rounding mode tests to fail.

Fixes PR port-amd64/54000: FP tests failing on amd64 since gcc7 import
 1.205  07-Nov-2018  riastradh Disable x87 implementations of sin, cos, tan.

The x87 hardware uses a bad approximation to pi for argument
reduction, and consequently yields bad answers for inputs near pi or
pi/2.

Tweak one tanf test whose doubly rounded output is a little too far
from the correct answer on the doubly rounded input.
 1.204  13-Jun-2018  kamil branches: 1.204.2;
Disable sanitizers for libm and librt

The sanitizers are designed to use pristine OS versions of these libraries,
install interceptors for public symbols in them and link with them in every
sanitized executable.

Having unmodified base libraries (c, m, rt, pthread) also makes the system
usable with programs linking with them and without sanitization, as there
are no fatal issues during the resolving of missing symbols.

The remaining libraries like libutil, libintl etc are prebuilt with
sanitization and all their users in the MKSANITIZER=yes distribution are
required to use the same sanitizer.

libc and libpthread are already marked with the NOSANITIZER flag.
 1.203  26-Sep-2017  maya branches: 1.203.2;
Add man page link for hypotl.3
 1.202  21-Aug-2017  christos add nexttoward for mips64 and aarch64
 1.201  17-Aug-2017  he Actually... s_nexttowardf.c appears to be usable on soft-float as well;
it was for arm earlier and briefly for all mips, so just move it into
COMMON_SRCS.
 1.200  17-Aug-2017  he Move the inclusion of s_nexttowardf.c into a common test for
MKSOFTFLOAT=="no". This brings us nexttowardf() for sparc, at least.
 1.199  16-Aug-2017  nisimura add s_rintl.c for aarch64. ok by ryo@.
 1.198  16-Aug-2017  he In the non-softfloat m68k part, add s_nexttoward.c and s_nexttowardf.c,
so that we get nexttoward() and nexttowardf() implemented here as well.
 1.197  15-Aug-2017  mlelstv rintl is required for archs that support long double.
 1.196  11-Aug-2017  he Move s_nearbyint.c out of the cpu ifdefs and into COMMON_SRCS,
which is used everywhere except on vax. This is to simplify and
to ensure the function is included in the build, allowing us to
re-add the nearbyint() test.
 1.195  27-Jul-2017  he The sparc port needs s_nearbyint.c as well.
 1.194  27-Jul-2017  he Non-softfloat m68k needs s_rintl.c.
 1.193  26-Jul-2017  he Add s_nearbyint.c to alpha, ia64, riscv, mips, powerpc, and sh3 ports.
 1.192  26-Jul-2017  he Add some blank lines to separate the different CPU archs,
for a minimal readability improvement.
 1.191  06-May-2017  christos branches: 1.191.2;
Replace our rounding functions with the ones from FreeBSD
 1.190  23-Mar-2017  chs branches: 1.190.2;
sun2 just has to be different, of course.
it doesn't use the libc softfloat and thus doesn't set MKSOFTFLOAT=yes.
enable the fenv functions here explicitly for now.
 1.189  22-Mar-2017  chs provide a common softfloat fenv implemenation and use it for softfloat builds.
restore ABI compatibility with previous releases for ieeefp.h on sh3.
add namespace.h protection for all the fenv interfaces.
use MKSOFTFLOAT on sh3 instead of assuming softfloat.
standardize on comparing MKSOFTFLOAT with "no".
remove the arm-specific softfloat fenv code (which also had several bugs).
fix logic errors in the arm hardfloat feraiseexcept() and feupdateenv().
 1.188  23-Feb-2017  scole Add fenv for ia64, imported from FreeBSD, compile tested only.
 1.187  08-Dec-2016  christos branches: 1.187.2;
more stuff needs -mfpu=vfp
 1.186  21-Sep-2016  christos deal with namespace issues and missing atanhf for vax.
 1.185  07-Sep-2016  jakllsch Actually get fma(3) and friends into ARM libm.
 1.184  27-Aug-2016  christos skip buggy assembly for libm_g.a
 1.183  26-Aug-2016  christos fix double merge.
 1.182  26-Aug-2016  christos do the FENV test consistently
 1.181  25-Aug-2016  christos more fenv for sh
 1.180  24-Aug-2016  christos fix ilogb*
 1.179  24-Aug-2016  christos add ilogb.
 1.178  23-Aug-2016  christos fenv.h for alpha
 1.177  30-Mar-2016  martin branches: 1.177.2;
No fenv for m68k with SOFTFLOAT for now - so at least it builds.
 1.176  17-Mar-2016  nros Added ldexpl to ldexp manpage since it is missing.
Also added ldexpf manpage link since it is missing.
 1.175  17-Mar-2016  nros Add fabsl to the manpage describing the fabs functions.
 1.174  29-Dec-2015  christos Add sqrtl
 1.173  21-Dec-2015  christos Add mips fenv.c (From FreeBSD)
 1.172  20-Dec-2015  christos Powerpc fenv.c from FreeBSD
 1.171  12-Dec-2015  nros Add manpage to the fma function in libm.
The manpage is taken from the FreeBSD project since the fma implementation is
based on the one in FreeBSD.
 1.170  13-Sep-2015  he Add entry for nexttowardf(3) and a link for the function name.
Bump manual page date.
 1.169  13-Sep-2015  he Add entries for rintl(3) and the nearbyint functions, and
make manual page links to the new functions.
Bump manual page date.
 1.168  27-Dec-2014  martin fenv(3) support for hppa
 1.167  17-Nov-2014  christos PR/49399: Henning Petersen: Add man pages for erfl and erfcl
 1.166  19-Sep-2014  matt Add RISC-V MD bits.
 1.165  26-Aug-2014  christos Adding extra dependencies does not affect the inference rule search anymore.
XXX[1]: should that be the case?
Simplify the code anyway via selective path search.
XXX[2]: Split arch portions to arch specific files, this is a mess
 1.164  11-Aug-2014  mrg branches: 1.164.2;
revert parts of 1.163 that affect the x86 build.

possibly, we want to build the i386 fenv.c for compat build, but they
seem largely compatible and for now, just go back to what we had before
that wasn't breaking the build or generating bug reports.
 1.163  10-Aug-2014  matt MKCOMPAT fixes for when compat MACHINE_CPU != normal MACHINE_CPU
 1.162  10-Aug-2014  joerg Add -mfpu=vfp for fenv.c, since it gets those instructions from
machdep/armreg.h
 1.161  10-Aug-2014  matt Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only. While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.
 1.160  16-Jun-2014  joerg Add modfl(3). From FreeBSD.
 1.159  18-May-2014  martin Re-enable alpha IEEE compiler options
 1.158  05-May-2014  martin Comment out the ieee fp flags for alpha for now - something (tm) is not
working right, see PR port-alpha/48782.
 1.157  28-Apr-2014  martin Tune COPTS for alpha
 1.156  01-Apr-2014  christos branches: 1.156.2;
add -g to LINTFLAGS
 1.155  06-Mar-2014  martin Include new/missing files for vax
 1.154  29-Jan-2014  joerg Include compiler-rt in libc, libm and libkern.
 1.153  18-Jan-2014  skrll Add various functions which need fenv support to arm.
 1.152  22-Nov-2013  martin Try to fix the build (again): move e_sqrtl.c to common soure, but
move the include of fenv.h into the #ifdef __HAVE_LONG_DOUBLE block
and also provide a -DHAVE_FENV_H from the makefile for archs that have
it - leaving out exception settings on architectures that do not provide
it.
 1.151  21-Nov-2013  martin e_sqrtl.c requires fenv.h, so only build it on platfomrs supporting that
 1.150  19-Nov-2013  joerg Add cbrtl(3) and sqrtl(3), from FreeBSD.
 1.149  13-Nov-2013  joerg truncl(3)
 1.148  13-Nov-2013  joerg Add FreeBSD's truncl and minimal testing.
 1.147  12-Nov-2013  joerg Add some fake long double -> double wrappers for various transcendental
functions. They are expected to be implement properly at a later time.
 1.146  12-Nov-2013  joerg Initial version of fmodl from FreeBSD.
Basic test case for the fmod family.
 1.145  12-Nov-2013  joerg Man page entries for ceill, floorl and roundl.
 1.144  11-Nov-2013  joerg Add initial version of ceill, floorl and roundl from FreeBSD.
 1.143  15-Oct-2013  joerg Hook complex operation support into libm when not using libgcc.
 1.142  21-Sep-2013  joerg Update LLVM/Clang snapshot to r191105. This brings in a better detection
of unused static variables and functions. Disable this for some external
code and for ioconf.c in the kernel.
 1.141  22-Aug-2013  martin s_nexttoward.c does not make sense compiling for 32 bit sparc (double ==
long double), so ifdef it out in the sparc64 compat library build. I hope
the nextafter alias is set up correctly (where?) - and someone please
suggest a better way for this if clause.
 1.140  21-Aug-2013  martin Add nexttoward, nearbyint and rintl for sparc64
 1.139  20-Jun-2013  christos Add missing .go and fix lint rule.
 1.138  24-May-2013  martin Fix POLYD/Mariah fallout and include the scalbn sources (which do not
use polyd).
Fix global names and weak aliases.
 1.137  01-May-2013  matt Use MKSOFTFLOAT = no for including arm hardfloat files.
When arm and MKSOFTFLOAT = yes, make explicit dependency to .c files
so .S won't be used.
 1.136  28-Apr-2013  joerg Drop s_scalbnl.c (and s_scalbln.S as side effect) and provide scalbnl in
s_scalbln.c.
 1.135  27-Apr-2013  joerg Retire ldexp sources. scalbn has the aliases.
 1.134  06-Apr-2013  uebayasi Pass a real file as MLINKS target; fix unnecessary (re)install.
 1.133  12-Feb-2013  martin Use __HAVE_LONG_DOUBLE instead of EXT_EXPBITS and include s_nextafterl.c
as well as s_frexpl.c in the global list of "common" sources - as we
seem to have no arch redefining the standard double variant, it seems
unlikely we will have on redefining the long double version in assembler.
 1.132  11-Feb-2013  matt any arch that has fenv.[ch] can have fma as well (since fma uses fenv).
 1.131  11-Feb-2013  matt Add VFP versions of lrint/lrintf/lrintl for earmhf*
 1.130  11-Feb-2013  christos add more functions required by fma
 1.129  11-Feb-2013  christos hook fma to the build
 1.128  09-Feb-2013  christos Hook to the build.
 1.127  09-Feb-2013  christos Make this work for NetBSD
 1.126  03-Feb-2013  matt Add support for the ARM hardfloat instructions vsqrt and vabs.
 1.125  04-Aug-2012  matt branches: 1.125.2;
Use COPTS instead of CFLAGS
 1.124  05-May-2012  christos Add tgamma{,f} from FreeBSD via rudolf, netbsd at eq dot cz
 1.123  04-Apr-2012  joerg Disable new -Wstring-plus-int warning where needed for now.
Adjust various places that add GCC-only options to check for the active
compiler first.
 1.122  21-Mar-2012  matt These directories default to WARNS?=5
 1.121  09-Mar-2012  njoly On alpha compile the math library with dynamic rounding mode instead
of fixed normal IEEE rounding mode. This makes function that depends on
the current rounding mode, such as rint(3), just work.
 1.120  17-Sep-2011  jruoho branches: 1.120.2; 1.120.4;
Split out pow(3) from exp(3).
 1.119  13-Sep-2011  jruoho Split out the logarithm functions from the perplex exp(3). Also remove some
useless notes in the latter (namely, no one cares that financial calculations
were done on Hewlett-Packard HP-71B, or that there is a LN1() in Pascal).
 1.118  06-Aug-2011  jruoho Deprecate ieee(3).
 1.117  06-Aug-2011  jruoho Split out the scalbn(3) family out from ieee(3) and properly document it.
 1.116  03-Aug-2011  joerg Add logbl(3).
 1.115  28-Jul-2011  joerg Add ilogbl(3).
 1.114  28-Jul-2011  joerg Add scalbnl(3) mlinks.
 1.113  28-Jul-2011  matt Add scalbn{,f,l} for VAX.
 1.112  26-Jul-2011  joerg Add scalbnl to libm.
 1.111  20-Jun-2011  mrg remove most of the remaining HAVE_GCC tests that are always true in
the modern world.
 1.110  20-May-2011  nakayama branches: 1.110.2;
Add fenv support for sparc. Mostly copied from sparc64 and share with it.
 1.109  10-May-2011  jruoho Remove trailing '\'.
 1.108  10-May-2011  jruoho Split out the ilogb(3) family out of ieee(3) and properly document it.
 1.107  16-Apr-2011  jruoho Merge floor(3) to ceil(3).
 1.106  13-Apr-2011  jruoho Split out from ieee(3) also the remainder(3) and copysign(3) families.
 1.105  12-Apr-2011  jruoho Split the nextafter(3) family of functions to their own page and properly
document these.
 1.104  06-Feb-2011  christos remquo{,f} from FreeBSD via Stathis Kamperis
 1.103  31-Jan-2011  christos not everyone has fenv.c, pointed by Havard Eidnes
 1.102  31-Jan-2011  christos fenv support for sparc64 from Stathis Kamperis
 1.101  12-Jan-2011  joerg branches: 1.101.2;
Remove NOMANDOC, the documents are at least parsed somewhat sensible.
 1.100  09-Jan-2011  jakllsch Imlementations of fmax, fmaxf, fmin and fminf libm functions for VAX.
 1.99  09-Dec-2010  abs Add noieee versions for lround(), lroundf(), lrint(), lrintf(),
llrint() and llrintf(). Code copied from round(), roundf() and
rint() and modified for return values. Its possible this may not
do the right things in edge cases, but if so its likely to have
the same issues as the existing round(), roundf() and rint().

All this used by vax (only), and should allow xnest to complete
build.
 1.98  15-Sep-2010  christos Commit SoC long double support from Stathis Kamperis
 1.97  10-Aug-2010  drochner two disgusting hacks:
-mk/bsd.lib.mk picks up a .S asm file behind our back (did it do so
always?). s_modf.S is incorrect; I'm undecided whether it makes sense
to fix it, so add a stupid rule to enforce the .c file to be used.
-on i386, s_tanh.c gets miscompiled. It works with -O0, so add
COPTS for exactly that file.
 1.96  07-Aug-2010  wiz Fix typo in MLINKS, from Stathis Kamperis. Adapt set lists, and run
them through sort while there.
 1.95  31-Jul-2010  joerg Add support for fenv.h interface for i386 and amd64.

Submitted by Stathis Kamperis as part of GSoC 2010 and ported from
FreeBSD.
 1.94  23-Apr-2010  drochner -build ldexp/frexp/modf locally again rather than relying on libc
reaching over, to get things into a sane state,
-do the usual namespace protection game with scalbn(f) because it
is used internally
(more symbol renamings are necessary)

The weak_alias change for mc68881 is untested.
 1.93  29-Mar-2010  mrg build s_frexp.c, s_ldexp.c and s_modf.c here for new platforms, since they
don't exist as compat functions in libc.

current list of new platforms: powerpc64.

from dennis.c.ferguson@gmail.com in PR#43042. idea to not put compat
functions into new platforms from drochner@netbsd.
 1.92  11-Jan-2010  christos Add exp2 and exp2m
 1.91  23-Oct-2009  joerg Disable the use of mandoc for now until support for conditional
expression exists.
 1.90  04-Oct-2009  christos add f{min,max,dim}{,l,f} from FreeBSD
 1.89  18-Jan-2009  he Change the use of formally undocumented features, which have now been
made to fail. Specifically, change
.ifdef(SYMBOL) -> .ifdef SYMBOL or .if defined(SYMBOL),
and corresponding for .ifndef.

Also correct one error in lib/libm/Makefile (.ifdef (${MKCOMPLEX} != "no")?!?).
 1.88  29-Aug-2008  gmcgarry branches: 1.88.4; 1.88.8;
Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC.
 1.87  12-Jul-2008  gmcgarry Check MKCOMPLEX variable to build complex support into libm.
 1.86  03-Jun-2008  ad - Fold libm387 into libm.
- Leave libm387 as an empty shell.
 1.85  26-Apr-2008  christos branches: 1.85.2;
Remove 3 functions that exist in libc. This does not break binary compatibility
since we always link with libc.
 1.84  26-Apr-2008  christos Put back USE_SHLIBDIR and remove the confusing lint comment that made me
comment it out in the first place.
 1.83  25-Apr-2008  christos avoid shadow variables, and enable lint.
 1.82  20-Feb-2008  drochner branches: 1.82.4;
Add manpages for the complex math functions, originally from SUSv3,
roff source from the Linux documentation project.
Modifications before import:
-added NetBSD RCS ID
-removed Linux PROLOG and declarations with "long double"
-ran the "deshallify" script as required by The Open Group
Split out complex related things into an own Makefile fragment.
Thanks to hubertf for directions.
 1.81  09-Feb-2008  mrg make all sun2 use -O0 and move most of the hacks out into just 3 files.
 1.80  05-Feb-2008  mrg make sun2 build again with liberal use of -O0.
 1.79  20-Aug-2007  drochner branches: 1.79.2;
Add C99 complex support, for double and float.
Most complex function implementations are from the "c9x-complex" library,
originating from the "cephes" math library, see
http://www.netlib.org/cephes/, from Stephen L. Moshier, incorporated and
redistributed with the NetBSD license by permission of the author.

Error behaviour and other boundary conditions (branch cuts)
need to be looked at.

For namespace sanity, I've done the rename/weak alias procedure to
most of the exported functions which are also used internally.
Didn't do so for sin/cos(f) yet because assembler implementations use
them directly, and renaming functions shared between the main libm
and the machine specific "overlay" might raise binary compatibility
issues.
 1.78  22-Feb-2007  drochner -get cabs() and cabsf() out of public view - these are historical and
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
 1.77  03-Jul-2006  drochner move manpages for frexp/ldexp/modf to libm -- the (most) implementation is
already there
 1.76  01-Jul-2006  mrg noieee src is not strict-aliasing compliant. apply -fno-strict-aliasing.
 1.75  11-May-2006  mrg build w_cabs.c/w_cabsf.c with -fno-builtin-cabs[f]

XXX: our cabs()/cabsf() are different to others.
 1.74  25-Mar-2006  xtraeme Add trunc() and truncf() C99 functions, from FreeBSD.
 1.73  21-Mar-2006  drochner Build the sun versions of frexp(), ldexp() and modf().
While the versions in libc/gen are prettier to look at, having single
precision versions in libm and double precision versions in libc causes
a lot of confusion, and to favor libm gets us coprocessor support.
 1.72  15-Mar-2006  kleink Add nan(3), nanf(3), and nanl(3); welcome libm.so.0.4.
 1.71  17-Jan-2006  is C versions of non-IEEE round() / roundf(). Alas, using the VAX
cvtrdl; cvtld doesn't work for big numbers.
 1.70  15-Jan-2006  is Implement round(3), so that jot(1) can link again.
 1.69  16-Sep-2005  wiz Add man page for l{,l}rint{,f}(3), very loosely based on the FreeBSD one.
Requested by martin@
Reviewed by drochner@
 1.68  21-Jul-2005  rpaulo Add i387 FPU routines for log2(3) and log2f(3).

ok christos@
 1.67  21-Jul-2005  christos Add wrappers for the newly added functions. Thanks Klaus!
 1.66  21-Jul-2005  christos Add log2 and log2f from FreeBSD PR 83845
 1.65  13-Nov-2004  jmmv branches: 1.65.2;
Add a conditional for proper m68k softfloat operation. It looks like I
forgot to commit this file back when this functionality was added.
Noted by Bruce O'Neel (the original author) in port-mac68k@.
 1.64  10-Jul-2004  junyoung lib/24252: Add C99 functions round(3) and roundf(3).
libm minor unchanged; ride a recent bump.

From FreeBSD.
 1.63  01-Jul-2004  drochner also provide an alpha assembler implemtation of lrint()
 1.62  01-Jul-2004  drochner enable lrint.S for amd64 (which doesn't build libm387),
and tighten the generic->machdep source distribution a bit to avoid
unwanted substitutions
 1.61  01-Jul-2004  drochner being here, add the (l)lround(f) functions to libm
(almost the same like lrint)
 1.60  30-Jun-2004  drochner Implement (l)lrint(f).
(Could get some optimization for LP64; this would need a change to
the float access macros in math_private.h.)
 1.59  15-Jun-2002  matt branches: 1.59.2;
Compile libm on VAX at WARNS=2; leave other architectures at WARNS=1
 1.58  27-Jan-2002  ross branches: 1.58.2;
Drink ALL the Kool-Aid.

(Move -mieee from lib/ to bsd.*.mk; new var MKIEEEFP defaults to yes.)
 1.57  27-Jan-2002  thorpej On Alpha, build libc and libm with -mieee ... A metric crapload
of 3rd party software expects this.

XXX TODO: consider libm-fast for alpha that is not -mieee. Possibly
determine -mieee or not at run-time based on a bit in the executable
headers.
 1.56  28-Dec-2001  lukem * Add user-controlled mk.conf variables
- SHLIBDIR Location to install shared libraries if ${USE_SHLIBDIR}
is "yes". Defaults to "/usr/lib".

- USE_SHLIBDIR If "yes", install shared libraries in ${SHLIBDIR}
instead of ${LIBDIR}. Defaults to "no".
Sets ${_LIBSODIR} to the appropriate value.
This may be set by individual Makefiles as well.

- SHLINKDIR Location of shared linker. Defaults to "/usr/libexec".
If != "/usr/libexec", change the dynamic-linker
encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

1.) If nothing is set or changed, there is no change from the
current behaviour:
- Static /bin, /sbin, and bits of /usr/*
- Dynamic rest
- Shared linker is /usr/libexec/ld*so

2.) If the following make variables are set:
LDSTATIC=
SHLINKDIR=/lib
SHLIBDIR=/lib
Then the behaviour becomes:
- Dynamic tools
- .so libraries used by /bin and /sbin are installed to /lib,
with symlinks from /usr/lib/lib*so to -> /lib/lib*so
where appropriate
- Shared linker is /lib/ld*so

3.) As per 2.), but add the following variable:
USE_SHLIBDIR=yes
This forces all .so's to be instaleld in /lib (with compat
symlinks), not just those tagged by their Makefiles to be.
Again, compat symlinks are installed
 1.55  12-Dec-2001  tv Readability cleanups; MKfoo=no -> NOfoo.
 1.54  05-Nov-2001  lukem explicitly set to WARNS?=1
 1.53  19-Jun-2001  fvdl Use arch/i387 for x86_64.
 1.52  13-Dec-1999  christos branches: 1.52.4;
If we are not including i387 support in libm, build a separate libi387.
 1.51  22-Aug-1999  is branches: 1.51.4;
Use arch/m68k copies of the common functions even for mc68881 hardware.
 1.50  19-Aug-1999  is Pull in Motorola 68060 floating point library support package based
libm code, .ifdef M68060.
 1.49  16-Aug-1999  kleink Document isinff(3) and isnanf(3), cloned from the corresponding double-
precision manual page. It is kept separately since the latter are part of
libc and thus impose different linkage instructions.
 1.48  16-Aug-1999  kleink Document reentrant log gamma interfaces.
 1.47  15-Aug-1999  kleink Add single-precision versions of interfaces to their manual pages' NAME section
and install links as appropriate.
 1.46  02-Jul-1999  simonb More trailing white space.
 1.45  01-Jul-1999  is Quick and dirty hook to compile a non-6888[12] libm for 68040 and 68060.
This is switched to by the M68040 or M68060 defines.
XXX Eventually, a M060SP based libm should be built for M68060.
 1.44  15-Feb-1999  he NOLINT -> MKLINT=no.
 1.43  11-Nov-1998  matt Fix PIC code and fix problem with obj dirs.
 1.42  10-Oct-1998  matt Actually build __setjmp.S/__sigsetjmp.S for vax. PICifiy the setjmp code.
Fix libm Makefile to handle obj directories.
 1.41  22-Aug-1998  ragge The Mariah chip lacks the POLYD instruction, so some assembly coded
calculations must be done in C instead. Fast fix until the POLY{D,F,G,H}
insn's are written.
 1.40  09-Aug-1998  perry on i386, use FPU instructions in libm if I387_LIBM is set, from dan@geek.com.au
 1.39  19-Feb-1998  cgd move NOLINT definition
 1.38  19-Feb-1998  cgd Make sure the reason that NOLINT is set is documented. Additionally
in places where it should be set (or has to be set right now), do so.
 1.37  23-Oct-1997  lukem use CPPFLAGS instead of CFLAGS
 1.36  18-Oct-1997  mikel branches: 1.36.2;
kill tab on line by itself, keep contents within 80 columns
 1.35  09-Oct-1997  lukem rcsid facism, WARNSify
 1.34  19-Dec-1996  cgd force NOLINT on the Alpha, at least until we fix FP underflow/denorm handling
 1.33  12-Oct-1996  ragge Non-IEEE assembler files wasn't handled correctly. Trouble pointed out by
Robin Birch, fix by Mats O Jansson/Christos Zoulas.
 1.32  05-Jul-1996  explorer Add a continuation slash in the commented-out i387 section
 1.31  03-Jul-1996  jtc Add new i387 math functions to ARCH_SRCS
 1.30  26-Jun-1996  jtc Enable mc68881 version of fmod
 1.29  26-Jun-1996  jtc enable alpha-specific libm files
 1.28  20-Nov-1995  jtc Changed w_gamma.c, w_gamma_r.c, w_gammaf.c, w_gammaf_r.c to call
__ieee754_lgamma_r or __ieee754_lgammaf_r.
Removed e_gamma.c, e_gamma_r.c, e_gammaf.c, e_gammaf_r.c, e_lgamma.c,
e_lgamma_f.c.
 1.27  10-Oct-1995  ragge Got Makefile to understand to use non-IEEE files on vax systems.
 1.26  03-May-1995  jtc Add i387 "float" functions to the makefile
 1.25  18-Feb-1995  jtc Enable mc68881 versions of remainder() and scalb().
 1.24  22-Dec-1994  cgd specify man pages the new way.
 1.23  25-Sep-1994  jtc Added s_isinff.c
 1.22  10-Aug-1994  jtc Float versions of math functions. From Ian Taylor (ian@cygnus.com), with
minor changes by me.
 1.21  12-Mar-1994  jtc Update for mc68881 ceil(), floor(), & rint(), and s_sqrt.S -> e_sqrt.S
naming mistake.
 1.20  11-Mar-1994  jtc Added a ieee_test(3) man page (Like SunOS) derrived from an earlier copy
of ieee(3). This man page describes logb, scalb, and significand, which
are really only useful for verifying IEEE754 compliance.
 1.19  11-Mar-1994  jtc infnan was a vaxism.
 1.18  10-Mar-1994  jtc Added i387 version of significand().
 1.17  08-Mar-1994  jtc Christos Zoulas' Makefile fixes.
 1.16  01-Mar-1994  jtc Add cabs() & drem() for BSD libm compatibility.
 1.15  25-Feb-1994  jtc Update manpages for new math library.
 1.14  15-Feb-1994  jtc Compiled shared too.
 1.13  14-Feb-1994  jtc Comment out all functions that are also provided by our C library: fabs(),
frexp(), isnan(), ldexp(), and modf().
 1.12  14-Feb-1994  jtc isnan() was provided by both C and Math libraries.
 1.11  11-Feb-1994  jtc Changes for fdlibm based math library
 1.10  06-Dec-1993  cgd use .S not .s
 1.9  05-Dec-1993  cgd update for MACHINE_ARCH
 1.8  21-Oct-1993  jtc Use BYTE_ORDER == LITTLE_ENDIAN instead of -Dnational to select byte order
of floating point numbers.

The assumption that a processor's floats use the same order as its integers
is probably unwarranted, but it is better than requiring non-national CPUs
to #define national, as that drags in national-specific code too.
(According to a comment in the code, the national FPU does not do infinity)
 1.7  11-Oct-1993  jtc Install cbrt link to sqrt manpage.
 1.6  05-Oct-1993  pk No PIC, you probably don't want the overhead in these functions.
 1.5  01-Oct-1993  cgd put gamma.c into libm (because it's missing)...
 1.4  14-Aug-1993  mycroft Split log() and log__D() into separate files. Add logtab.c for logarithm
tables and log.h for common definitions.
Split exp() and exp__D() into separate files.
 1.3  14-Aug-1993  mycroft New code from uunet.
 1.2  01-Aug-1993  mycroft Add RCS identifiers.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.36.2.1  09-Nov-1997  lukem sync with trunk (approved by thorpej)
 1.51.4.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.52.4.1  14-Aug-2000  ragge Apply patch (requested by user, approved by thorpej):

Dynamic linked JSB called global labels don't work, subroutines
must be called with CALLS instead. This patch fixes it for the 1.5 release.
 1.58.2.1  18-Jun-2002  lukem Pull up revision 1.59 (requested by matt in ticket #285):
Compile libm on VAX at WARNS=2; leave other architectures at WARNS=1
 1.59.2.1  15-Jul-2004  he Pull up revision 1.64 (requested by junyoung in ticket #664):
Add C99 functions round(3) and roundf(3).
Bump the teeny version number for libm.
 1.65.2.1  24-Mar-2006  riz Pull up following revision(s) (requested by drochner in ticket #1213):
lib/libm/man/lrint.3: revision 1.1
distrib/sets/lists/comp/mi: revision 1.815
lib/libm/Makefile: revision 1.69
Add man page for l{,l}rint{,f}(3), very loosely based on the FreeBSD one.
Requested by martin@
Reviewed by drochner@
 1.79.2.1  23-Mar-2008  matt sync with HEAD
 1.82.4.2  17-Jun-2008  yamt sync with head.
 1.82.4.1  18-May-2008  yamt sync with head.
 1.85.2.2  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.85.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.88.8.1  21-Apr-2010  matt sync to netbsd-5
 1.88.4.1  12-Mar-2010  riz Pull up following revision(s) (requested by snj in ticket #1330):
lib/libm/man/fmax.3: revision 1.1-1.2
lib/libm/src/s_fmin.c: revision 1.1-1.2
lib/libm/src/s_fdim.c: revision 1.1
lib/libm/src/s_fmaxl.c: revision 1.1
lib/libm/Makefile: revision 1.90
include/math.h: revision 1.49
lib/libm/src/s_fmaxf.c: revision 1.1
lib/libm/src/s_fmax.c: revision 1.1
lib/libm/shlib_version: revision 1.10
distrib/sets/lists/base/md.sparc64: revision 1.63 (via patch)
distrib/sets/lists/base/shl.mi: revision 1.495 (via patch)
lib/libm/src/s_fminl.c: revision 1.1
distrib/sets/lists/comp/mi: revision 1.1317
lib/libm/man/fdim.3: revision 1.1-1.3
lib/libm/src/s_fminf.c: revision 1.1
distrib/sets/lists/base/md.amd64: revision 1.70 (via patch)
add f{min,max,dim}{,l,f} from FreeBSD
These functions are going to first appear in 5.1, not 6.0.
 1.101.2.1  08-Feb-2011  bouyer Sync with HEAD
 1.110.2.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.120.4.1  09-May-2012  riz Pull up following revision(s) (requested by christos in ticket #232):
distrib/sets/lists/comp/mi: revision 1.1756
lib/libm/Makefile: revision 1.124
lib/libm/src/math_private.h: revision 1.17
lib/libm/src/b_tgamma.c: revision 1.1
lib/libm/man/lgamma.3: revision 1.22
lib/libm/src/b_log.c: revision 1.1
lib/libm/src/b_exp.c: revision 1.1
include/math.h: revision 1.58
lib/libm/src/s_tgammaf.c: revision 1.1
add tgamma{,f}
Add tgamma{,f} from FreeBSD via rudolf, netbsd at eq dot cz
oops, forgot to commit: add tgamma and tgammaf
 1.120.2.4  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.120.2.3  30-Oct-2012  yamt sync with head
 1.120.2.2  23-May-2012  yamt sync with head.
 1.120.2.1  17-Apr-2012  yamt sync with head
 1.125.2.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.125.2.2  23-Jun-2013  tls resync from head
 1.125.2.1  25-Feb-2013  tls resync with head
 1.156.2.1  10-Aug-2014  tls Rebase.
 1.164.2.4  25-Sep-2016  bouyer Pull up following revision(s) (requested by jakllsch in ticket #1253):
lib/libm/Makefile: revision 1.185 via patch
Actually get fma(3) and friends into ARM libm.
 1.164.2.3  08-Nov-2015  riz branches: 1.164.2.3.2;
Pull up following revision(s) (requested by dholland in ticket #1009):
lib/libm/man/erf.3: revision 1.13
distrib/sets/lists/comp/mi: revision 1.1921
lib/libm/Makefile: revision 1.167
PR/49399: Henning Petersen: Add man pages for erfl and erfcl
fix sets for new erf{c,}l man pages.
 1.164.2.2  20-Jan-2015  snj Pull up following revision(s) (requested by martin in ticket #416):
distrib/sets/lists/comp/md.hppa: revision 1.3
include/fenv.h: revision 1.13 via patch
lib/libm/Makefile: revision 1.168
lib/libm/arch/hppa/fenv.c: revisions 1.1, 1.2
sys/arch/hppa/include/Makefile: revision 1.12
sys/arch/hppa/include/fenv.h: revisions 1.1, 1.2
sys/arch/hppa/include/ieeefp.h: revisions 1.5-1.7
tests/lib/libm/Makefile: revision 1.29 via patch
fenv(3) support for hppa
--
use unsigned over uint32_t so that this file works without stdint.h
being included before hand.
fixes mknative-gcc problems, and likely others.
--
Properly separate fenv.h and ieeefp.h by moving all fenv defines
over to the former.
Now that they are decoupled, make rounding modes match the hardware bits.
--
Simplify, now that rounding mode defines match the hardware bits.
 1.164.2.1  13-Oct-2014  martin Pullup the following revisions, requested by christos in #138:

src/lib/libm/Makefile 1.165-1.166
src/lib/libm/shlib_version 1.14
src/lib/libm/arch/vax/n_atan2.S 1.9
src/lib/libm/arch/vax/n_cabs.S 1.7
src/lib/libm/arch/vax/n_sincos.S 1.9
src/lib/libm/arch/vax/n_sqrt.S 1.10-1.11
src/lib/libm/complex/Makefile.inc 1.5-1.8
src/lib/libm/complex/cabsl.c 1.1
src/lib/libm/complex/cacoshl.c 1.1
src/lib/libm/complex/cacosl.c 1.1
src/lib/libm/complex/cargl.c 1.1
src/lib/libm/complex/casinhl.c 1.1
src/lib/libm/complex/casinl.c 1.1
src/lib/libm/complex/catanhl.c 1.1
src/lib/libm/complex/catanl.c 1.1
src/lib/libm/complex/ccoshl.c 1.1
src/lib/libm/complex/ccosl.c 1.1
src/lib/libm/complex/cephes_subrl.c 1.1
src/lib/libm/complex/cephes_subrl.h 1.1
src/lib/libm/complex/cexpl.c 1.1
src/lib/libm/complex/clogl.c 1.1
src/lib/libm/complex/cpowl.c 1.1
src/lib/libm/complex/cprojl.c 1.7
src/lib/libm/complex/csinhl.c 1.1
src/lib/libm/complex/csinl.c 1.1
src/lib/libm/complex/csqrtl.c 1.1
src/lib/libm/complex/ctanhl.c 1.1
src/lib/libm/complex/ctanl.c 1.1
src/lib/libm/man/acosh.3 1.17
src/lib/libm/man/asinh.3 1.17
src/lib/libm/man/atanh.3 1.17
src/lib/libm/noieee_src/n_atan2.c 1.7
src/lib/libm/noieee_src/n_cosh.c 1.9
src/lib/libm/noieee_src/n_exp.c 1.9
src/lib/libm/noieee_src/n_log.c 1.8
src/lib/libm/noieee_src/n_pow.c 1.10-1.11
src/lib/libm/noieee_src/n_sincos.c 1.7
src/lib/libm/noieee_src/n_sinh.c 1.8

Import the missing complex support routines from FreeBSD so we can
enable C++ 2011 mode for libstc++.
 1.164.2.3.2.1  18-Jan-2017  skrll Sync with netbsd-5
 1.177.2.4  26-Apr-2017  pgoyette Sync with HEAD
 1.177.2.3  20-Mar-2017  pgoyette Sync with HEAD
 1.177.2.2  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.177.2.1  04-Nov-2016  pgoyette Sync with HEAD
 1.187.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.190.2.1  11-May-2017  pgoyette Sync with HEAD
 1.191.2.3  29-Aug-2017  martin Actually apply revision 1.201 (as the previous pullup claimed to do already).
 1.191.2.2  29-Aug-2017  martin Pull up the following, requested by he in ticket #217:

lib/libm/Makefile 1.197-1.201
tests/lib/libm/t_fe_round.c 1.7

Ensure nexttowardf() is included on all IEEE targets.
Add rintl() for aarch64 and mips, and nexttoward() for m68k.
Add a test which verifies that nextafter() and nexttoward() are
present in the implementation.
 1.191.2.1  29-Aug-2017  martin Pull up the following, requested by he in ticket #212:

lib/libm/Makefile 1.192-1.196
tests/lib/libm/t_fe_round.c 1.3-1.6

Ensure that nearbyint() is included in all targets except for vax,
and add a test case for nearbyint(), stubbed out for non-IEEE (vax).
 1.203.2.2  26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.203.2.1  25-Jun-2018  pgoyette Sync with HEAD
 1.204.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.204.2.1  10-Jun-2019  christos Sync with HEAD
 1.210.2.1  08-Oct-2023  martin Pull up following revision(s) (requested by he in ticket #1747):

lib/libm/Makefile: revision 1.222
distrib/evbmips/instkernel/ramdisk/Makefile: revision 1.19

libm Makefile: add fma() functions for mips.

This pushed the ramdisk size, so that needed to be bumped as well.
Otherwise, there were no build issues for either 32 or 64 bit mips.
Sort-of OK'ed by simonb@.
 1.218.2.5  22-Feb-2025  martin Pull up following revision(s) (requested by tsutsui in ticket #1061):

lib/libm/Makefile: revision 1.241

libm: Add missing fma(3) and variants for hppa.

Fixes a build error on pkgsrc/lang/python312. Ok'ed by skrll@.
 1.218.2.4  14-Jan-2024  martin Pull up following revision(s) (requested by riastradh in ticket #547):

lib/libm/Makefile: revision 1.221 (patch)

libm: Add fma(3) and friends to m68k
 1.218.2.3  31-Dec-2023  martin Pull up following revision(s) (requested by jklos in ticket #529):

lib/libm/Makefile: revision 1.223

Fix building with M68040 and M68060 options.
 1.218.2.2  08-Oct-2023  martin Pull up following revision(s) (requested by he in ticket #397):

lib/libm/Makefile: revision 1.222
distrib/evbmips/instkernel/ramdisk/Makefile: revision 1.19

libm Makefile: add fma() functions for mips.

This pushed the ramdisk size, so that needed to be bumped as well.
Otherwise, there were no build issues for either 32 or 64 bit mips.
Sort-of OK'ed by simonb@.
 1.218.2.1  11-Aug-2023  martin Pull up following revision(s) (requested by riastradh in ticket #320):

lib/libm/src/ldbl_dummy.c: revision 1.3
distrib/sets/lists/debug/shl.mi: revision 1.303
lib/libm/src/ldbl_dummy.c: revision 1.4
lib/libm/src/namespace.h: revision 1.17
lib/libm/src/s_llrintl.c: revision 1.3
lib/libm/Makefile: revision 1.220
lib/libm/src/s_lrintl.c: revision 1.3
lib/libm/man/sincos.3: revision 1.2
lib/libm/man/math.3: revision 1.29
distrib/sets/lists/base/shl.mi: revision 1.946
lib/libm/shlib_version: revision 1.18

libm: Fill in more dummy long double transcendental functions.
This should cover everything from C99.

libm: Need <math.h> for __HAVE_LONG_DOUBLE.
Fixes missing definitions of lrintl, llrintl on various platforms.

Add (newly added): expm1l log1pl log2l lgammal tgammal
so that the library gets the correct symbols defined in it.

libm: Bump minor for new long double transcendental functions.
XXX Still missing: remquol, remainderl.

fix cross references (from Anon Ymous)

Correct history (Brad Smith)

libm: Add missing fma(3) and friends for sh3.

libm: Add dummy remainderl and remquol.
These are pretty bad -- these aren't transcendental functions; not
rocket science to make them correctly rounded -- but let's just make
sure they're available in libm for netbsd-10.

RSS XML Feed