| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Reviewed by: bde
MFC after: 3 days
|
|
|
|
|
|
|
| |
Tested with md5 sum of object code
Reported by: swildner@DragonFlyBSD.org
Submitted by: bde
|
|
|
|
| |
merge of the work done by bde and myself.
|
|
|
|
| |
Submitted by: bde
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as a fairly faithful implementation of the algorithm found in
PTP Tang, "Table-driven implementation of the Expm1 function
in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 18,
211-222 (1992).
Over the last 18-24 months, the code has under gone significant
optimization and testing.
Reviewed by: bde
Obtained from: bde (most of the optimizations)
|
|
|
|
| |
Submitted by: bde
|
|
|
|
|
|
|
|
| |
cacosh, casin, casinh, catan, and catanh. Thanks to stephen@ and bde@
for working on these.
Submitted by: stephen@
Reviewed by: bde
|
|
|
|
|
|
|
|
|
|
| |
are workarounds for various symptoms of the problem described in clang
bugs 3929, 8100, 8241, 10409, and 12958.
The regression tests did their job: they failed, someone brought it
up on the mailing lists, and then the issue got ignored for 6 months.
Oops. There may still be some regressions for functions we don't have
test coverage for yet.
|
|
|
|
|
|
|
|
|
|
|
| |
libc.a and libc_p.a. In addition, define isnan in libm.a and libm_p.a,
but not in libm.so.
This makes it possible to statically link executables using both isnan
and isnanf with libc and libm.
Tested by: kargl
MFC after: 1 week
|
| |
|
| |
|
| |
|
|
|
|
| |
changes to reflect differences in computation between the two.
|
|
|
|
|
| |
double version, with adaptations for the differences between it and
the float version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
. Change the API for the LD80C by removing the explicit passing
of the sign bit. The sign can be determined from the last
parameter of the macro.
. On i386, load long double by bit manipulations to work around
at least a gcc compiler issue. On non-i386 ld80 architectures,
use a simple assignment.
* ld80/s_expl.c:
. Update the only consumer of LD80C.
Submitted by: bde
Approved by: das (mentor)
|
|
|
|
|
|
|
|
|
| |
necessary, so that cosl(), sinl() and tanl() work on i386 even
for naive callers.
Suggested by: bde
Reviewed by: bde
Approved by: das (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
only affects i386. The double case was intentionally left broken
as an optimization, but we are getting closer to supporting
applications and/or kernels that change the (FreeBSD i386) default
rounding precision from FP_PD to FP_PE and never change it back,
and this requires the STRICT_ALIGN()s that were added to support
FP_PE to actually work in all precisions.
* Remove an extraneous semicolon at the end of a macro that was
supposed to be function-like.
Submitted by: bde
Approved by: das (mentor)
|
|
|
|
|
|
|
| |
since some older versions of gcc refuse to inline these otherwise.
Requested by: bde
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
they need to refer to static constants, which C99 does not allow for
extern inline functions.
While here, change a comment in e_rem_pio2f.c to mention the correct
number of bits.
Reviewed by: bde
MFC after: 1 week
|
|
|
|
|
| |
Submitted by: bde
Approved by: das (pre-approved)
|
|
|
|
|
| |
Submitted by: bde
Approved by: das (pre-approved)
|
|
|
|
|
|
|
|
| |
class hardware with the ENTERI and RETURNI macros, which
are now available in math_private.h.
Suggested by: bde
Approved by: das (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
format. These implementations are based on
PTP Tang, "Table-driven implementation of the exponential function
in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 15,
144-157 (1989).
PR: standards/152415
Submitted by: kargl
Reviewed by: bde, das
Approved by: das (mentor)
|
|
|
|
|
|
| |
Submitted by: Yamaya Takashi
Reviewed by: das
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
correct sign when the remainder was 0.
Fix a separate bug in remquo alone, in which the remainder and
quotient were both off by a bit in certain cases involving subnormal
remainders.
The bugs affected all platforms except amd64 and i386, on which the
routines are implemented in assembly.
PR: 166463
Submitted by: Ilya Burylov
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
| |
use softfloat.
Thanks to Ian Lepore for testing and debugging this patch. The fenv
regression tests pass (at least for Ian's arm chip) with this change.
|
| |
|
|
|
|
|
|
|
| |
C++'s <cmath> to work without the compiler complaining that the C++ versions are calling implicitly-declared functions. You will still get a linker error when they are called. OpenBSD 5.0 claims to fully implement the C99 <math.h> stuff, so might be worth investigating...
Reviewed by: das
Approved by: dim (mentor)
|
|
|
|
|
| |
exactly cancels with z, return the low part of x*y instead of
discarding it.
|
| |
|
|
|
|
|
|
|
|
|
| |
- Handle cases where exp(x) would overflow, but ccosh(x) ~= exp(x) / 2
shouldn't.
- Use the ccosh(x) ~= exp(x) / 2 approximation to simplify the calculation
when x is large.
Similarly for csinh(). Also fixed the return value of csinh(-Inf +- 0i).
|
|
|
|
| |
the overflow threshold.
|
|
|
|
|
|
|
|
|
|
|
| |
exp(x) scaled down by some factor, and the challenge is doing this
accurately when exp(x) would overflow. This change replaces all of
the tricks we've been using with common __ldexp_exp() and
__ldexp_cexp() routines that handle all the scaling.
bde plans to improve on this further by moving the guts of exp() into
k_exp.c and handling the scaling in a more direct manner. But the
current approach is simple and adequate for now.
|
|
|
|
|
|
| |
up by storing x in a wider type than it's supposed to.
Submitted by: bde
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
| |
bde and kargl.
|
|
|
|
|
|
| |
common, e.g., in DFT implementations.
Discussed with: bde, kargl
|
|
|
|
| |
math_private.h, so they can be used elsewhere in the math library.
|
| |
|
|
|
|
| |
Obtained from: DragonFlyBSD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Rename __kernel_log() to k_log1p().
- Move some of the work that was previously done in the kernel log into
the callers. This enables further refactoring to improve accuracy or
speed, although I don't recall the details.
- Use extra precision when adding the final scaling term, which improves
accuracy.
- Describe and work around compiler problems that break some of the
multiprecision calculations.
A fix for a small bug is also included:
- Add a special case for log*(1). This is needed to ensure that log*(1) == +0
instead of -0, even when the rounding mode is FE_DOWNWARD.
Submitted by: bde
|
|
|
|
| |
Submitted by: bde
|
|
|
|
|
|
| |
no longer "fast" on sparc64. (It really wasn't to begin with, since
the old implementation was using long doubles, and long doubles are
emulated in software on sparc64.)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
round-to-nearest mode when the result, rounded to twice machine
precision, was exactly halfway between two machine-precision
values. The essence of the fix is to simulate a "sticky bit" in
the pathological cases, which is how hardware implementations
break the ties.
MFC after: 1 month
|
|
|
|
|
| |
extra-precision add and multiply operations. This simplifies future
work but shouldn't result in any functional change.
|
|
|
|
|
|
|
|
| |
be used uninitialized. This can lead to spurious exceptions
and bit clobbering.
Submitted by: bde
Approved by: das (mentor)
|