about summary refs log tree commit diff
path: root/sysdeps/generic/asincos.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-04-15 01:38:39 +0000
committerUlrich Drepper <drepper@redhat.com>1997-04-15 01:38:39 +0000
commit7799b7b3350fdcadc6dfb8821fb49b7772c96701 (patch)
tree21a6a07547c0e58dee9fef4082a7e7d27ddece7e /sysdeps/generic/asincos.c
parent9d8067d8f20139548df2a29b8800975ea410bc4c (diff)
downloadglibc-cvs/libc-970425.tar.gz
glibc-cvs/libc-970425.tar.xz
glibc-cvs/libc-970425.zip
1997-04-15 03:14  Ulrich Drepper  <drepper@cygnus.com>

	* wcsmbs/wcsstr.c: Add weak alias wcswcs for Unix98 compliance.

	* math/Makefile (libm-calls): Add s_sincos and s_cproj.
	* math/mathcalls.h: Add prototype for sincos.
	* sysdeps/i386/fpu/__math.h: Warn about restriction on arguments to
	inlined sin and cos function.
	Define functions new in ISO C 9X when __USE_ISOC9X is defined.
	Add optimized version of finite.
	Rewrite sincos function to handle too large arguments.
	* sysdeps/libm-i387/s_cos.S: Better code alignment.
	* sysdeps/libm-i387/s_cosl.S: Likewise.
	* sysdeps/libm-i387/s_sin.S: Likewise.
	* sysdeps/libm-i387/s_sinl.S: Likewise.
	* sysdeps/libm-i387/s_finite.S: Yet better code.
	* sysdeps/libm-i387/s_finitef.S: Likewise.
	* sysdeps/libm-i387/s_sincos.S: New file.
	* sysdeps/libm-i387/s_sincosf.S: New file.
	* sysdeps/libm-i387/s_sincosl.S: New file.
	* sysdeps/libm-ieee754/s_sincos.c: New file.
	* sysdeps/libm-ieee754/s_sincosf.c: New file.
	* sysdeps/libm-ieee754/s_sincosl.c: New file.

	* sysdeps/libm-ieee754/s_ccosh.c: Change to use sincos function.
	* sysdeps/libm-ieee754/s_ccoshf.c: Likewise.
	* sysdeps/libm-ieee754/s_ccoshl.c: Likewise.
	* sysdeps/libm-ieee754/s_cexp.c: Likewise.
	* sysdeps/libm-ieee754/s_cexpf.c: Likewise.
	* sysdeps/libm-ieee754/s_cexpl.c: Likewise.
	* sysdeps/libm-ieee754/s_csinh.c: Likewise.
	* sysdeps/libm-ieee754/s_csinhf.c: Likewise.
	* sysdeps/libm-ieee754/s_csinhl.c: Likewise.
	* sysdeps/libm-ieee754/s_ctan.c: Likewise.
	* sysdeps/libm-ieee754/s_ctanf.c: Likewise.
	* sysdeps/libm-ieee754/s_ctanl.c: Likewise.
	* sysdeps/libm-ieee754/s_ctanh.c: Likewise.
	* sysdeps/libm-ieee754/s_ctanhf.c: Likewise.
	* sysdeps/libm-ieee754/s_ctanhl.c: Likewise.

	* sysdeps/libm-ieee754/s_cosl.c: Correct check for range.
	* sysdeps/libm-ieee754/s_sinl.c: Likewise.

	* sysdeps/libm-ieee754/s_roundtol.c: Fix typos.
	* sysdeps/libm-ieee754/s_roundtoll.c: Likewise.

	* nis/Makefile (services): Mention nisplus before compat.
	* nis/nis_call.c (__do_niscall): Change type of variable server_len
	to prevent warning.
	* nis/nss_compat/compat-grp.c (getgrent_next_file_plusgroup): Add
	cast to prevent warning.
	* nis/nss_compat/compat-pwd.c (getpwent_next_file_plususer): Likewise.
	* nis/nss_compat/compat-spwd.c (getspent_next_file_plususer): Likewise.
	* nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_parse_hostent): Change
	type of variable `i' to prevent warning.
	* nis/nss_nisplus/nisplus-network.c (_nss_nisplus_parse_netent):
	Likewise.
	* nis/nss_nisplus/nisplus-proto.c (_nss_nisplus_parse_protoent):
	Likewise.
	* nis/nss_nisplus/nisplus-rpc.c (_nss_nisplus_parse_rpcent): Likewise.
	* nis/nss_nisplus/nisplus-service.c (_nss_nisplus_parse_servent):
	Likewise.

	* sysdeps/generic/Dist: Remove old math implementation files.
	* sysdeps/generic/mathimpl.h: Removed.
	* sysdeps/generic/trig.h: Removed.
	* sysdeps/generic/sincos.c: Removed.
	* sysdeps/generic/asincos.c: Removed.
	* sysdeps/generic/exp__E.c: Removed.
	* sysdeps/generic/log__L.c: Removed.

1997-04-13 17:18  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>

	* malloc/malloc.c (fREe): Small optimization.  Before returning,
	add fast check whether the heap containing top can go away.

1997-04-11 16:46  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>

	* malloc/malloc.c (mALLOc, rEALLOc, cALLOc, mEMALIGn): When
	failing to allocate a new chunk, also try the main_arena.  It may
	be that we are only running out of mmapped regions, and other
	arenas cannot be enlarged sufficiently.
	(new_heap, malloc_extend_top): Handle top_pad more consistently,
	i.e. only in new_heap().

1997-04-13 21:10  Philip Blundell  <pjb27@cl.cam.ac.uk>

	* sysdeps/posix/Makefile: Don't try to build and run mk-stdiolim
	if cross-compiling.

	* configure.in: Recognise "...linuxaout" OS names and turn off ELF.

	* configure.in: Add ARM support.
	* sysdeps/arm/Implies: New file.
	* sysdeps/arm/__longjmp.S: New file.
	* sysdeps/arm/bsd-_setjmp: New file.
	* sysdeps/arm/bsd-setjmp: New file.
	* sysdeps/arm/bytesex.h: New file.
	* sysdeps/arm/fpu_control.h: New file.
	* sysdeps/arm/jmp_buf.h: New file.
	* sysdeps/arm/setjmp.h: New file.
	* sysdeps/arm/sysdep.h: New file.
	* sysdeps/unix/arm/config.h: New file.

1997-04-14 04:03  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/libm-ieee754/s_cproj.c: New file.
	* sysdeps/libm-ieee754/s_cprojf.c: New file.
	* sysdeps/libm-ieee754/s_cprojl.c: New file.
Diffstat (limited to 'sysdeps/generic/asincos.c')
-rw-r--r--sysdeps/generic/asincos.c169
1 files changed, 0 insertions, 169 deletions
diff --git a/sysdeps/generic/asincos.c b/sysdeps/generic/asincos.c
deleted file mode 100644
index c746b1652a..0000000000
--- a/sysdeps/generic/asincos.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)asincos.c	8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* ASIN(X)
- * RETURNS ARC SINE OF X
- * DOUBLE PRECISION (IEEE DOUBLE 53 bits, VAX D FORMAT 56 bits)
- * CODED IN C BY K.C. NG, 4/16/85, REVISED ON 6/10/85.
- *
- * Required system supported functions:
- *	copysign(x,y)
- *	sqrt(x)
- *
- * Required kernel function:
- *	atan2(y,x) 
- *
- * Method :                  
- *	asin(x) = atan2(x,sqrt(1-x*x)); for better accuracy, 1-x*x is 
- *		  computed as follows
- *			1-x*x                     if x <  0.5, 
- *			2*(1-|x|)-(1-|x|)*(1-|x|) if x >= 0.5.
- *
- * Special cases:
- *	if x is NaN, return x itself;
- *	if |x|>1, return NaN.
- *
- * Accuracy:
- * 1)  If atan2() uses machine PI, then
- * 
- *	asin(x) returns (PI/pi) * (the exact arc sine of x) nearly rounded;
- *	and PI is the exact pi rounded to machine precision (see atan2 for
- *      details):
- *
- *	in decimal:
- *		pi = 3.141592653589793 23846264338327 ..... 
- *    53 bits   PI = 3.141592653589793 115997963 ..... ,
- *    56 bits   PI = 3.141592653589793 227020265 ..... ,  
- *
- *	in hexadecimal:
- *		pi = 3.243F6A8885A308D313198A2E....
- *    53 bits   PI = 3.243F6A8885A30  =  2 * 1.921FB54442D18	error=.276ulps
- *    56 bits   PI = 3.243F6A8885A308 =  4 * .C90FDAA22168C2    error=.206ulps
- *	
- *	In a test run with more than 200,000 random arguments on a VAX, the 
- *	maximum observed error in ulps (units in the last place) was
- *	2.06 ulps.      (comparing against (PI/pi)*(exact asin(x)));
- *
- * 2)  If atan2() uses true pi, then
- *
- *	asin(x) returns the exact asin(x) with error below about 2 ulps.
- *
- *	In a test run with more than 1,024,000 random arguments on a VAX, the 
- *	maximum observed error in ulps (units in the last place) was
- *      1.99 ulps.
- */
-
-double asin(x)
-double x;
-{
-	double s,t,copysign(),atan2(),sqrt(),one=1.0;
-#if !defined(vax)&&!defined(tahoe)
-	if(x!=x) return(x);	/* x is NaN */
-#endif	/* !defined(vax)&&!defined(tahoe) */
-	s=copysign(x,one);
-	if(s <= 0.5)
-	    return(atan2(x,sqrt(one-x*x)));
-	else 
-	    { t=one-s; s=t+t; return(atan2(x,sqrt(s-t*t))); }
-
-}
-
-/* ACOS(X)
- * RETURNS ARC COS OF X
- * DOUBLE PRECISION (IEEE DOUBLE 53 bits, VAX D FORMAT 56 bits)
- * CODED IN C BY K.C. NG, 4/16/85, REVISED ON 6/10/85.
- *
- * Required system supported functions:
- *	copysign(x,y)
- *	sqrt(x)
- *
- * Required kernel function:
- *	atan2(y,x) 
- *
- * Method :                  
- *			      ________
- *                           / 1 - x
- *	acos(x) = 2*atan2(  / -------- , 1 ) .
- *                        \/   1 + x
- *
- * Special cases:
- *	if x is NaN, return x itself;
- *	if |x|>1, return NaN.
- *
- * Accuracy:
- * 1)  If atan2() uses machine PI, then
- * 
- *	acos(x) returns (PI/pi) * (the exact arc cosine of x) nearly rounded;
- *	and PI is the exact pi rounded to machine precision (see atan2 for
- *      details):
- *
- *	in decimal:
- *		pi = 3.141592653589793 23846264338327 ..... 
- *    53 bits   PI = 3.141592653589793 115997963 ..... ,
- *    56 bits   PI = 3.141592653589793 227020265 ..... ,  
- *
- *	in hexadecimal:
- *		pi = 3.243F6A8885A308D313198A2E....
- *    53 bits   PI = 3.243F6A8885A30  =  2 * 1.921FB54442D18	error=.276ulps
- *    56 bits   PI = 3.243F6A8885A308 =  4 * .C90FDAA22168C2    error=.206ulps
- *	
- *	In a test run with more than 200,000 random arguments on a VAX, the 
- *	maximum observed error in ulps (units in the last place) was
- *	2.07 ulps.      (comparing against (PI/pi)*(exact acos(x)));
- *
- * 2)  If atan2() uses true pi, then
- *
- *	acos(x) returns the exact acos(x) with error below about 2 ulps.
- *
- *	In a test run with more than 1,024,000 random arguments on a VAX, the 
- *	maximum observed error in ulps (units in the last place) was
- *	2.15 ulps.
- */
-
-double acos(x)
-double x;
-{
-	double t,copysign(),atan2(),sqrt(),one=1.0;
-#if !defined(vax)&&!defined(tahoe)
-	if(x!=x) return(x);
-#endif	/* !defined(vax)&&!defined(tahoe) */
-	if( x != -1.0)
-	    t=atan2(sqrt((one-x)/(one+x)),one);
-	else
-	    t=atan2(one,0.0);	/* t = PI/2 */
-	return(t+t);
-}