Age | Commit message (Collapse) | Author |
|
|
|
Avoids segfaults with an argument of 0, NaN, or Inf.
Problem reported by Colin Ian King. ok miod@ kettenis@
|
|
md files lists.
ok guenther@ deraadt@
|
|
libm symbol visibility rework.
This would warrant a libm.so minor bump, but as 7.5 packages build have
started, this won't happen (and hopefully noone will notice since this
only affects landisk).
ok deraadt@
|
|
|
|
Reported by Willemijn Coene.
|
|
on the floating-point control register.
|
|
round in the right direction for halfway values.
(noticed in the perl test results thanks to afresh1@)
|
|
any changes not taken noted on tech, but chiefly here i did not take the
cancelation - cancellation changes;
|
|
ok miod@ guenther@
|
|
Since llvm 13, there are compiler warnings in libm on amd64 and i386 due
to .weak overriding an earlier .globl. Use ENTRY_NB() instead of ENTRY()
to avoid emitting the .globl.
ok deraadt jca (for amd64)
ok guenther
|
|
UNIX System V mention it. Only do so in manual pages with a
pre-existing HISTORY section.
Prompted by the comparison of System V and BSD commands and interfaces
in Sun's "System V Enhancements Overview" document.
checked against manuals on bitsavers, TUHS archive and CSRG archive CDs
ok jmc@ schwarze@
|
|
ok jmc@ schwarze@
|
|
|
|
bcallah@ had same diff
ok guenther@
|
|
Subset of FreeBSD commit 4339c67c485f0b1f7699863fc29f6c06862d1dde:
Moved the optimization for tiny x from __kernel_{cos,sin}[f](x) to
{cos_sin}[f](x) so that x doesn't need to be reclassified in the
"kernel" functions to determine if it is tiny (it still needs to be
reclassified in the cosine case for other reasons that will go away).
...
Parts of the original change were applied separately before.
Suggested by kettenis@
OK mbuhl@, tested by mbuhl@ and phessler@
|
|
The same change was done by NetBSD some time back as:
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.
OK mbuhl@, tested by mbuhl@ and phessler@
|
|
The result passes more tests from msun suite. In particular,
testacc(cos, -0.34061437849088045332L, 0.94254960031831729956L,
ALL_STD_EXCEPT, FE_INEXACT);
matches instead of being 1e-16 off.
OK mbuhl@, tested by mbuhl@ and phessler@
|
|
the same implementation that we're already using for lrintl(3) and llrintl(3).
The old implementations were derived from code from NetBSD that didn't pass
the lib/libm/msun/lrint_test regress test. NetBSD replaced their
implementation with the FreeBSD implementation of this code which we were
already using for lrintl(3) and llrintl(3). This fixes the regress test.
ok bluhm@, millert@
|
|
|
|
mostly mechanical diff similar to what Emil Engler just sent for sqrt(3)
|
|
|
|
|
|
|
|
When converting a long or long long to a double, there may be loss
of precision and clang >= 10 warns about this unless there is a cast.
Add casts to silence this warning - the code is designed to handle
precisely this loss of precision, so this is harmless.
From CheriBSD via FreeBSD
ok millert
|
|
from unsigned long long to unsigned int.
ok kettenis@
|
|
|
|
ok kettenis@
|
|
-width ".Dv BOB" -> -width "BOB"
although they are not errors, they are misleading and probably should
not get pasted around
|
|
FP_ILOGBNAN which isn't the case for the amd64 and i386 assembly versions.
Drop these in favour of C implementations. Als reimplement ilogbl(3)
by providing separate ld80 and ld128 implementations that replace the
existing implementation which may hit an infinite loop when built for
quad-precision long double.
ok patrick@, gkoehler@
|
|
FP_ILOGBNAN which isn't the case for the amd64 and i386 assembly versions.
Drop these in favour of C implementations. Als reimplement ilogbl(3)
by providing separate ld80 and ld128 implementations that replace the
existing implementation which may hit an infinite loop when built for
quad-precision long double.
ok patrick@, gkoehler@
|
|
NaN and 0 arguments using FP_ILOGB0 and FP_ILOGBNAN.
|
|
Brings arm64 in line with all the other architectures.
ok millert@
|
|
|
|
|
|
Starting from "Combined Table of Contents" in Doug McIlroy's
"A Research UNIX Reader" a table of which edition manuals appeared in.
Checked against manuals from bitsavers/TUHS and source from TUHS where
available.
Ingo points out there are cases where something is included but not
documented until a later release.
bcd(6) v6 v7
printf(3) v2 v4
abort(3) v5 v6
system(3) v6 v7
fmod(3) v5 v6
ok schwarze@
|
|
This is inside !(defined(__amd64__) || defined(__i386__)),
while the file is only used on those two architectures.
"Free commit! No strings attached! No hidden tricks!" from miod
|
|
This became possible because copies of the original v1 manuals
have shown up on the Internet some time ago.
Reminded by Sevan Janiyan <venture37 at geeklan dot co dot uk>.
|
|
|
|
ok deraadt@
|
|
in libm since the rounding mode is in fpcr, not fpsr. Since both FPU
registers are 32-bit we can store them in the 64-bit fenv_t to make
handling the bits easier.
While there add FE_DENORMAL, which also exists on x86. Also make sure
that whenever we are being passed an exception mask, we only allow the
bits that are supported by hardware.
Found by regression tests
Debugged with Moritz Buhl
ok kettenis@
|
|
|
|
on non-IEEE platforms. Since the VAX port was discontinued, all
our remaining architectures use IEEE floating point, as will any
future ones.
ok millert@ tb@
|
|
ok deraadt
|
|
ok deraadt
|
|
|
|
floating-point exceptions, simplify the functions that control the exception
masks just like we did on armv7.
ok tom@
|
|
a cloning a non-standard, long double function which _is_ used from the
matching plain double function
build failured pointed out by deraadt@
|
|
'weak' in the static libm.a
ok deraadt@
|
|
|