David Schultz
57276bb6ea
Un-document the non-extant exp10() and exp10f() functions.
...
exp10() was a casualty of the transition away from the VAX.
2005-02-26 08:54:45 +00:00
David Schultz
aa28340df9
Revert rev 1.8, which causes small (e.g. 2 ulp) errors for some
...
inputs. The trouble with replacing two floats with a double is that
the latter has 6 extra bits of precision, which actually hurts
accuracy in many cases. All of the constants are optimal when float
arithmetic is used, and would need to be recomputed to do this right.
Noticed by: bde (ucbtest)
2005-02-24 06:32:13 +00:00
David Schultz
adec44c08b
Use hardware instructions for sqrt() and sqrtf().
2005-02-21 18:27:57 +00:00
David Schultz
96efaf6c36
Use double arithmetic instead of simulating it with two floats. This
...
results in a performance gain on the order of 10% for amd64 (sledge),
ia64 (pluto1), i386+SSE (Pentium 4), and sparc64 (panther), and a
negligible improvement for i386 without SSE. (The i386 port still
uses the hardware instruction, though.)
2005-02-21 17:44:57 +00:00
David Schultz
f674c13c78
Remove the i387 versions of atan(), atan2(), and atan2f().
...
They are slower than the MI routines on modern hardware,
except for degenerate cases such as the Pentium 4.
PR: 67469
2005-02-21 16:04:23 +00:00
David Schultz
c4691a5da9
Remove i387 versions of asin() and acos(). Although the hardware
...
instruction was faster on the 486, it's slower than our MD version on
modern processors.
Determined by: bde
PR: 67469
2005-02-20 22:51:08 +00:00
David Schultz
dab1571b90
Remove the float versions of the i387 trig functions obtained from
...
NetBSD. They're buggy, giving particularly for inputs larger in
magnitude than 2**63.
Noticed by: bde
PR: 67469
2005-02-20 22:50:40 +00:00
David Schultz
e02846ce13
Fix a small scripting snafu in the previous revision.
2005-02-04 20:05:39 +00:00
David Schultz
b21154f677
Remove another vestige of support for a non-IEEE libm.
2005-02-04 18:32:13 +00:00
David Schultz
3f70824172
Reduce diffs against vendor source (Sun fdlibm 5.3).
2005-02-04 18:26:06 +00:00
David Schultz
79b990338f
Move machine-dependent crud to its own makefile.
2005-02-04 14:33:39 +00:00
David Schultz
e1b61b5b93
Remove wrappers and other cruft intended to support SVID, mistakes in
...
C90, and other arcana. Most of these features were never fully
supported or enabled by default.
Ok: bde, stefanf
2005-02-04 14:08:32 +00:00
Ruslan Ermilov
1f8ee0e102
Typo.
2005-01-28 21:14:16 +00:00
Ruslan Ermilov
d7a604cc33
Properly terminate sentence.
2005-01-28 21:13:34 +00:00
David Schultz
29bf6af890
- Move the functions presently described in in ieee(3) to their own
...
manpages. They are not very related, so separating them makes it
easier to add meaningful cross-references and extend some of the
descriptions.
- Move the part of math(3) that discusses IEEE 754 to the ieee(3)
manpage.
2005-01-27 05:46:17 +00:00
Olivier Houchard
15d3b4db61
Define FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD and _ROUND_MASK to
...
unbreak the build for arm.
2005-01-24 00:35:02 +00:00
David Schultz
cb2d2321cd
Update comment to reflect the code change in the previous revision.
...
Noticed by: ceri
2005-01-23 22:56:08 +00:00
David Schultz
52611c608e
Many changes, including the following major ones:
...
- Rearrange the list of functions into categories.
- Remove the ulps column. It was appropriate for only some
of the functions in the list, and correct for even fewer
of them.
- Add some new paragraphs, and remove some old ones about
NaNs that may do more harm than good.
- Document precisions other than double-precision.
2005-01-23 22:05:33 +00:00
David Schultz
3c4d0a0973
If x == y, return y, not x. C99 (though not IEEE 754) requires that
...
nextafter(+0.0, -0.0) returns -0.0 and nextafter(-0.0, +0.0) returns +0.0.
2005-01-23 15:46:22 +00:00
David Schultz
d5580d091a
Add fma() and fmaf(), which implement a fused multiply-add operation.
2005-01-22 09:53:18 +00:00
Ruslan Ermilov
24a0682c64
Sort sections.
2005-01-20 09:17:07 +00:00
Ruslan Ermilov
5391441c05
Use the \*(If string provided by mdoc(7), to represent infinity.
2005-01-16 16:49:10 +00:00
Ruslan Ermilov
1fbb01b7f0
Removed redundant .br call.
2005-01-16 16:46:14 +00:00
David Schultz
cd3cc47033
amd64 assembly versions of sqrt(), lrint(), and llrint() using SSE2.
2005-01-15 03:32:28 +00:00
David Schultz
b6e65225a6
Most libm routines depend on the rounding mode and/or set exception
...
flags, so they are not pure. Remove the __pure2 annotation from them.
I believe that the following routines and their float and long double
counterparts are the only ones here that can be __pure2:
copysign is* fabs finite fmax fmin fpclassify ilogb nan signbit
When gcc supports FENV_ACCESS, perhaps there will be a new annotation
that allows the other functions to be considered pure when FENV_ACCESS
is off.
Discussed with: bde
2005-01-15 02:55:10 +00:00
David Schultz
71936f351e
Braino. Revert rev 1.50.
...
Pointy hat to: das
2005-01-15 00:37:31 +00:00
David Schultz
8e26469445
Remove numerous references to VAX floating-point and the setting of
...
errno, replacing them with a discussion of IEEE exceptions where
appropriate. Cross-reference fenv(3) whenever exceptions are
mentioned.
2005-01-14 23:28:28 +00:00
David Schultz
ce4e53c460
Set math_errhandling to MATH_ERREXCEPT. Now that we have fenv.h, we
...
basically support this, subject to gcc's lack of FENV_ACCESS support.
In any case, the previous setting of math_errhandling to 0 is not
allowed by POSIX.
2005-01-14 22:03:27 +00:00
David Schultz
c165c4b9aa
Remove some #if 0'd code.
2005-01-14 21:51:46 +00:00
Ruslan Ermilov
e880667b92
Tiny markup nits.
2005-01-14 09:12:05 +00:00
David Schultz
f365db00e5
Mark all inline asms that read the floating-point control or status
...
registers as volatile. Instructions that *wrote* to FP state were
already marked volatile, but apparently gcc has license to move
non-volatile asms past volatile asms. This broke amd64's feupdateenv
at -O2 due to a WAR conflict between fnstsw and fldenv there.
2005-01-14 07:09:23 +00:00
Stefan Farfeleder
749f5f532e
Fixed too many of "the", and enclose multi-word argument in double quotes.
...
Obtained from: ru
2005-01-13 20:33:42 +00:00
David Schultz
fe69257da2
Import the subset of J.T. Conklin's single-precision x86-optimized
...
math routines that appear to be (a) correct and (b) faster than their
MI counterparts on my Pentium 4.
Obtained from: NetBSD
2005-01-13 18:58:25 +00:00
David Schultz
0d8f9eca28
The isnormal() in rev 1.2 should have been isfinite() so subnormals
...
round correctly.
Noticed by: stefanf
2005-01-13 15:43:41 +00:00
David Schultz
3cdb8115d7
Things that are broken, unneeded, and unused since 1997 belong in the attic.
2005-01-13 15:43:22 +00:00
Ruslan Ermilov
83e0359d53
Markup nits.
2005-01-13 10:43:01 +00:00
Ruslan Ermilov
113ed1bb1d
Fixed too many of "the", and enclose multi-word argument in double quotes.
2005-01-13 09:35:47 +00:00
Stefan Farfeleder
43295fac79
Implement and document ceill().
2005-01-13 09:11:41 +00:00
Stefan Farfeleder
4067ee86a5
Bump .Dd for the last commit.
2005-01-13 09:08:16 +00:00
Stefan Farfeleder
7e2ee1f065
Hook up and document floorl().
2005-01-12 22:16:26 +00:00
Stefan Farfeleder
17f418f9f4
Implement floorl().
2005-01-12 22:10:46 +00:00
Stefan Farfeleder
a7d82b7150
Whitespace nit.
2005-01-12 22:05:41 +00:00
David Schultz
10c9ffa425
Add MI implementations of [l]lrint[f]() and [l]lround[f]().
...
Discussed with: bde
2005-01-11 23:12:55 +00:00
David Schultz
2aac156d2e
Document [l]lrint[f]() and [l]lround[f]().
2005-01-11 23:12:17 +00:00
David Schultz
439e59cf85
Faster lrint() and llrint() implementations for x86.
2005-01-11 23:10:53 +00:00
David Schultz
c1b70ced4f
Mark inline stmxcsr instructions as volatile, since this appears to be
...
the only way to convince gcc that they read the MXCSR. The volatile
annotation may be needed elsewhere as well.
2005-01-11 22:10:43 +00:00
Ruslan Ermilov
2d82ac3110
Scheduled mdoc(7) sweep.
2005-01-11 20:50:51 +00:00
Ruslan Ermilov
4e05ab77a8
Sanitize the markup, as prompted.
2005-01-11 20:16:03 +00:00
David Schultz
527055d12f
GC unused declaration
2004-12-16 20:40:49 +00:00
David Schultz
17519e9b79
Cosmetic changes only:
...
- style
- remove unused variables
- de-support VAX
Inspired by: bin/42388
2004-12-16 20:40:37 +00:00