Commit Graph

805 Commits

Author SHA1 Message Date
msaitoh 1316021699 s/argumetn/argument/ in comment. 2021-12-05 04:22:50 +00:00
andvar 9a662625bc fix typos, mainly in words minimum and maximum, but also few others. 2021-11-01 21:28:01 +00:00
andvar f9faf20aef fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/ 2021-09-03 21:54:58 +00:00
andvar 60f3bf6a63 s/memry/memory+s/softare/software/+s/grapics/graphics+s/ouput/output 2021-08-19 20:56:36 +00:00
andvar fbe76588ee fix typos in "environment" word. 2021-08-12 20:53:18 +00:00
tnn cadd46023e 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;"
2021-07-21 12:05:02 +00:00
thorpej 276edc129d Ensure that the stack is always 16-byte aligned by rounding sizes as needed.
All changes from rin@ except swapcontext.S, which is from me (added
symbolic constants to make the code clearer).
2021-07-06 12:38:40 +00:00
rin 749cec1f31 PR port-arm/55897
Fix ABI mismatch for armhf runtime routines for floating-point arithmetics;
For hard-float arm variants, provide

(1) generic runtime routines with correct calling convention, and
(2) EABI runtime routines at the same time.

I've confirmed that no binary changes for kernels.

LGTM by skrll
2021-06-16 05:21:08 +00:00
christos e8ee02e023 Use ${MACHINE_MIPS64} 2021-04-25 23:43:20 +00:00
mrg 72aaaacc35 add a default: case to __kernel_standard(), failing with EDOM 2021-04-12 09:15:52 +00:00
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