Commit Graph

795 Commits

Author SHA1 Message Date
joerg 782b126d2c Provide frexpl on non-long-double systems as alias to frexp. 2020-01-30 20:31:50 +00:00
joerg 76c7fc5f6b Update LLVM to 10.0.0git (01f3a59fb3e2542fce74c768718f594d0debd0da) 2019-11-11 22:44:56 +00:00
christos f20a32fee4 Separate the NetBSD-specific fenv functions from the standard ones.
No functional change.
2019-10-26 17:57:20 +00:00
nros 951054b00a 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.
2019-10-11 18:36:22 +00:00
sevan d284e45ce6 Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf
2019-09-02 00:51:48 +00:00
sevan e7c2f0e667 log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf
2019-09-02 00:37:47 +00:00
sevan a8ce1a4d96 exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf
2019-09-02 00:25:47 +00:00
riastradh ab94299db0 Fix feraiseexcept.
- Don't touch the trap flags (though on all ARMv8 I know they have no
  effect anyway).

- Don't clear any existing raised exception flags; just add to them.

XXX atf test
XXX pullup-9
2019-08-25 18:59:52 +00:00
riastradh f527f35001 Fix fesetenv and feupdateenv.
- fesetenv is supposed to set the stored rounding mode (and stored trap
  settings, but they have no effect on any ARMv8 I know).

- feupdateenv is supposed to re-raise the exceptions that were raised
  in the environment when it was called.

XXX atf test
XXX pullup-9
2019-08-25 18:31:30 +00:00
mgorny c1c809ed5e Explicitly indicate that nexttowardl() is identical to nextafterl().
Requested by kamil.
2019-05-02 15:08:35 +00:00
wiz 6d61444732 Remove undefined \*H 2019-04-28 07:33:02 +00:00
kamil 0c003f5999 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.
2019-04-27 23:04:31 +00:00
maya 6717e848e2 Remove unused 387 implementations.
These were removed from the build for being wrong, but the implementation
stayed around. This is confusing, we have the attic for old code,
let's delete the unused implementations.
2019-04-26 10:11:14 +00:00
maya 3cdbcb3e1b document cosl with MLINKS and in the man page 2019-04-25 23:17:24 +00:00
mrg 261a15423e also want s_nexttoward.c on riscv. now tests/lib/libm links. 2019-04-17 07:45:23 +00:00
maya 085f60235e we need rintl (long double) to link binaries 2019-04-15 18:44:26 +00:00
maya a0aab386b6 Don't alias the long double version to the double version.
We now have 128bit long double (by the upstream GCC changing things)
2019-04-13 17:18:26 +00:00
maya 92e1c52520 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
2019-02-22 18:17:22 +00:00
mrg fd676684f8 - avoid uninitialised memory usage 2019-02-04 04:37:50 +00:00
mrg 2c04daffef add some fallthru comments. 2019-02-04 03:30:20 +00:00
martin 6b62e867ad Add modfl alias. 2018-11-09 10:19:47 +00:00
riastradh 7374a22668 When hardware subnormal support is available, disable flush-to-zero.
Similarly, when hardware NaN propagation is available, disable
default-NaN substitution.

This enables IEEE 754 semantics on any hardware that supports it by
default.  Programs that want flush-to-zero or default-NaN substitution
can enable them explicitly.

ok ryo@
2018-11-07 06:47:38 +00:00
riastradh 6059a086c9 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.
2018-11-07 04:00:12 +00:00
kamil 0d6563db8b 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.
2018-06-13 08:19:36 +00:00
martin 4e1ffbe979 Add missing alias for ldexpl on ! __HAVE_LONG_DOUBLE architectures.
Pointed out by Hal Murray on port-arm.
2018-03-27 11:59:49 +00:00
eadler 736570df7c Fix signed overflow in atan2
As a component of atan2(y, x), the case of x == 1.0 is farmed out to
atan(y). The current implementation of this comparison is vulnerable
to signed integer underflow (that is, undefined behavior), and it's
performed in a somewhat more complicated way than it need be. Change
it to not be quite so cute, rather directly comparing the high/low
bits of x to the specific IEEE-754 bit pattern that encodes 1.0.

ok martin@ pgoyette@ maya@
obtained from FreeBSD
2018-03-10 09:44:47 +00:00
christos 462103bc5a avoid negative shift 2018-03-06 01:14:41 +00:00
christos 0efaeed61f comment out unused variable. 2018-03-05 23:00:55 +00:00
christos 26ca7efe45 use named initializers 2018-01-25 03:54:21 +00:00
martin 5e52dad13c Fix usage of sysarch(ALPHA_FPGETMASK) 2017-12-30 17:59:24 +00:00
maya ab208a3dad Restore CAVEATS section unmodified.
It apparently refers to VAX and its lack of a negative zero.
2017-09-28 15:03:18 +00:00
maya cf91bfe7da List a few more functions 2017-09-28 11:18:41 +00:00
maya f56039ca90 Remove CAVEATS section
The man page for an individual function is not the right place to discuss
the issues with negative zero
2017-09-28 11:09:05 +00:00
wiz e4dcc564b8 Remove Tn. 2017-09-28 05:51:26 +00:00
maya 943496d3b4 Fix typo 2017-09-27 10:12:47 +00:00
maya 411564dc9a Mention tgmath cproj, creal, cabs
following copysign example use of "real-floating" with "complex-floating"
2017-09-27 09:20:27 +00:00
maya 166de49ccc Mention wanting to remove isnanf too, reword 2017-09-26 18:03:30 +00:00
maya 14e90145c6 Add man page link for hypotl.3 2017-09-26 16:01:58 +00:00
maya 3c4aaf3f6f omit mention of cabs (not relevant to this man page)
mention type-generic hypot
mention hypotl
2017-09-26 15:42:54 +00:00
maya 69be559832 Mention there's a type generic variant in tgmath.h
(XXX and in math.h, if you're netbsd)
2017-09-26 15:12:57 +00:00
christos c2e78b1bda add nexttoward for mips64 and aarch64 2017-08-21 17:10:34 +00:00
he 7659ce9cff 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.
2017-08-17 13:58:39 +00:00
he 9de3bc60de Move the inclusion of s_nexttowardf.c into a common test for
MKSOFTFLOAT=="no".  This brings us nexttowardf() for sparc, at least.
2017-08-17 09:06:21 +00:00
nisimura 25f03d5f57 add s_rintl.c for aarch64. ok by ryo@. 2017-08-16 13:34:59 +00:00
he 61fdebe2ec On second thought, don't introduce nexttowardl() since we don't have that
yet elsewhere.
2017-08-16 11:22:52 +00:00
he b2720bf72a 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.
2017-08-16 09:18:24 +00:00
he 4ca6be884d On systems without __HAVE_LONG_DOUBLE, also alias nexttoward() and
nexttowardl() to nextafter().
2017-08-16 09:15:48 +00:00
mlelstv 7d91d16de6 rintl is required for archs that support long double. 2017-08-15 10:40:28 +00:00
he 900a3d47b2 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.
2017-08-11 20:24:56 +00:00
he 0cac3e13d5 The sparc port needs s_nearbyint.c as well. 2017-07-27 10:03:10 +00:00