History log of /src/lib/libm/Makefile
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
# 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


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
# 1.238 10-Jun-2024 riastradh

branches: 1.238.2;
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.


Revision tags: netbsd-10-base
# 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;"


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.213 25-Apr-2021 christos

Use ${MACHINE_MIPS64}


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 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.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609
# 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


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625
# 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.


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 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.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.191 06-May-2017 christos

branches: 1.191.2;
Replace our rounding functions with the ones from FreeBSD


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 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().


Revision tags: pgoyette-localcount-20170320
# 1.188 23-Feb-2017 scole

Add fenv for ia64, imported from FreeBSD, compile tested only.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107
# 1.187 08-Dec-2016 christos

branches: 1.187.2;
more stuff needs -mfpu=vfp


Revision tags: pgoyette-localcount-20161104
# 1.186 21-Sep-2016 christos

deal with namespace issues and missing atanhf for vax.


Revision tags: localcount-20160914
# 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


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 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


Revision tags: netbsd-7-base tls-maxphys-base
# 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.


Revision tags: tls-earlyentropy-base
# 1.160 16-Jun-2014 joerg

Add modfl(3). From FreeBSD.


# 1.159 18-May-2014 martin

Re-enable alpha IEEE compiler options


Revision tags: yamt-pagecache-base9
# 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


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
# 1.156 01-Apr-2014 christos

branches: 1.156.2;
add -g to LINTFLAGS


Revision tags: riastradh-drm2-base3
# 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


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 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.


Revision tags: agc-symver-base
# 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.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.125 04-Aug-2012 matt

branches: 1.125.2;
Use COPTS instead of CFLAGS


Revision tags: yamt-pagecache-base5
# 1.124 05-May-2012 christos

Add tgamma{,f} from FreeBSD via rudolf, netbsd at eq dot cz


Revision tags: yamt-pagecache-base4
# 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.


Revision tags: netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 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.


Revision tags: cherry-xenmp-base
# 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.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
# 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.


Revision tags: matt-mips64-premerge-20101231
# 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


Revision tags: matt-premerge-20091211
# 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


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 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")?!?).


Revision tags: netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 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.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 wrstuden-revivesa-base
# 1.86 03-Jun-2008 ad

- Fold libm387 into libm.
- Leave libm387 as an empty shell.


Revision tags: yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2
# 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.


Revision tags: yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 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.


Revision tags: matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base
# 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.


Revision tags: matt-mips64-base
# 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


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 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


Revision tags: netbsd-3-0-3-RELEASE netbsd-3-0-2-RELEASE netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 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.)


Revision tags: netbsd-2-0-base fvdl_fs64_base
# 1.59 15-Jun-2002 matt

branches: 1.59.2;
Compile libm on VAX at WARNS=2; leave other architectures at WARNS=1


Revision tags: netbsd-1-6-base
# 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.


Revision tags: netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.52 13-Dec-1999 christos

branches: 1.52.4;
If we are not including i387 support in libm, build a separate libi387.


Revision tags: comdex-fall-1999-base
# 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.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 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


Revision tags: netbsd-1-3-base
# 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


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 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.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE
# 1.27 10-Oct-1995 ragge

Got Makefile to understand to use non-IEEE files on vax systems.


Revision tags: netbsd-1-1-base
# 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.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 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