Commit Graph

513 Commits

Author SHA1 Message Date
Bruce Evans
8c950c10ca Fixed wrong magic numbers in scaling. hypotf() was very broken for large
and small values:

    hypotf(2.3819765e+38, 2.0416943e+38) was NaN instead of 3.1372484e+38
    hypotf(-3.4028235e+38, 3.3886450e+38) was NaN instead of Inf
    hypotf(-2.8025969e-45, -2.8025969e-45) was 0 instead of 4.2038954e-45

Found by:	ucbtest
1997-03-05 11:54:00 +00:00
Peter Wemm
7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Bruce Evans
2e6184e901 Split up the Bessel function wrapper files so that most wrapper functions
are in their own file.
1997-02-20 13:35:15 +00:00
Bruce Evans
5ddc00e218 Removed misplaced duplicate of comment about implementation details. 1997-02-20 13:14:06 +00:00
Bruce Evans
dab159e3d6 Select between the generic math functions and the i387-specific ones
at runtime.

etc/make.conf:
Nuked HAVE_FPU option.

lib/msun/Makefile:
Always build the i387 objects.  Copy the i387 source files at build
time so that the i387 objects have different names.  This is simpler
than renaming the files in the cvs repository or repeating half of
bsd.lib.mk to add explicit rules.

lib/msun/src/*.c:
Renamed all functions that have an i387-specific version by adding
`__generic_' to their names.

lib/msun/src/get_hw_float.c:
New file for getting machdep.hw_float from the kernel.

sys/i386/include/asmacros.h:
Abuse the ENTRY() macro to generate jump vectors and associated code.
This works much like PIC PLT dynamic initialization.  The PIC case is
messy.  The old i387 entry points are renamed.  Renaming is easier
here because the names are given by macro expansions.
1997-02-16 18:26:31 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Bruce Evans
2aa9f7ca2c Made rintf() actually work. It was completely broken (when s_rint.c
was compiled with -O) by the precision bug in the i386 version of
gcc (assignments and casts don't clip the precision).  E.g.,
rintf(12.3456789) was 12.125.

Avoid the same bug in rint().  It was only broken for the unusual
case when the i387 precision is 64 bits.  FreeBSD defaults to 53
bit precision to avoid problems like this, but the standard math
emulator always uses 64 bit precision.
1996-08-28 16:34:36 +00:00
Jordan K. Hubbard
51295a4d3e General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
1996-07-12 18:57:58 +00:00
Rodney W. Grimes
6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Bruce Evans
9f747fa23e Submitted by: J.T. Conklin <jtc@wimsey.com>
Second part of update to fdlibm 5.2: speed up argument reduction for trig
functions in the case pi/4 < |x| < 3pi/4.

Remove unused static constants ("one").
1995-04-07 23:23:27 +00:00
Bruce Evans
b29986e0f1 Submitted by: J.T. Conklin <jtc@wimsey.com>
First part of update to fdlibm 5.2: fix jn(n, x) and jnf(n, x).
jn(-1, x) was too large by a factor of 3.
1995-04-07 23:13:43 +00:00
L Jonas Olsson
dc400d8541 Add missing z_abs. In BSD tradition this is in libm.a. 1994-11-11 12:56:27 +00:00
Jordan K. Hubbard
3a8617a83f J.T. Conklin's latest version of the Sun math library.
-- Begin comments from J.T. Conklin:
The most significant improvement is the addition of "float" versions
of the math functions that take float arguments, return floats, and do
all operations in floating point.  This doesn't help (performance)
much on the i386, but they are still nice to have.

The float versions were orginally done by Cygnus' Ian Taylor when
fdlibm was integrated into the libm we support for embedded systems.
I gave Ian a copy of my libm as a starting point since I had already
fixed a lot of bugs & problems in Sun's original code.  After he was
done, I cleaned it up a bit and integrated the changes back into my
libm.
-- End comments

Reviewed by:	jkh
Submitted by:	jtc
1994-08-19 09:40:01 +00:00