diff options
author | das <das@FreeBSD.org> | 2004-07-18 21:23:39 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2004-07-18 21:23:39 +0000 |
commit | 1a69fc33708b18800fc764be0248de78b4bc35c0 (patch) | |
tree | eb35ae876a43222fec2d90dbf20674666f760ca7 /lib/libc/ia64 | |
parent | 8fe12ef8db88fe5b261b6c7b14bbc330def59245 (diff) | |
download | FreeBSD-src-1a69fc33708b18800fc764be0248de78b4bc35c0.zip FreeBSD-src-1a69fc33708b18800fc764be0248de78b4bc35c0.tar.gz |
Replace seven nominally MD implementations of frexp() that are broken
for subnormals with one implementation that works.
Diffstat (limited to 'lib/libc/ia64')
-rw-r--r-- | lib/libc/ia64/gen/Makefile.inc | 2 | ||||
-rw-r--r-- | lib/libc/ia64/gen/frexp.c | 56 |
2 files changed, 1 insertions, 57 deletions
diff --git a/lib/libc/ia64/gen/Makefile.inc b/lib/libc/ia64/gen/Makefile.inc index 3f68eeb..30bb45e 100644 --- a/lib/libc/ia64/gen/Makefile.inc +++ b/lib/libc/ia64/gen/Makefile.inc @@ -2,7 +2,7 @@ SRCS+= __divdf3.S __divdi3.S __divsf3.S __divsi3.S __moddi3.S __modsi3.S \ __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S _setjmp.S fabs.S \ - fpgetmask.c fpgetround.c fpsetmask.c fpsetround.c frexp.c infinity.c \ + fpgetmask.c fpgetround.c fpsetmask.c fpsetround.c infinity.c \ ldexp.c makecontext.c modf.c setjmp.S signalcontext.c sigsetjmp.S # The following may go away if function _Unwind_FindTableEntry() diff --git a/lib/libc/ia64/gen/frexp.c b/lib/libc/ia64/gen/frexp.c deleted file mode 100644 index d4f5139..0000000 --- a/lib/libc/ia64/gen/frexp.c +++ /dev/null @@ -1,56 +0,0 @@ -/* $NetBSD: frexp.c,v 1.1 1995/02/10 17:50:22 cgd Exp $ */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -double -frexp(value, eptr) - double value; - int *eptr; -{ - union doub { - double v; - struct ieee_double s; - } u; - - if (value) { - u.v = value; - *eptr = u.s.dbl_exp - (DBL_EXP_BIAS - 1); - u.s.dbl_exp = DBL_EXP_BIAS - 1; - return(u.v); - } else { - *eptr = 0; - return((double)0); - } -} |