Importing cargl.c from NetBSD.
This commit is contained in:
parent
436bf2929c
commit
3f1f3a2299
@ -11,7 +11,7 @@ src = cabs.c cacos.c cacosh.c carg.c casin.c casinh.c \
|
|||||||
csin.c csinh.c csqrt.c ctan.c ctanh.c
|
csin.c csinh.c csqrt.c ctan.c ctanh.c
|
||||||
|
|
||||||
lsrc = cabsl.c creall.c cimagl.c ccoshl.c cacoshl.c \
|
lsrc = cabsl.c creall.c cimagl.c ccoshl.c cacoshl.c \
|
||||||
clogl.c csqrtl.c
|
clogl.c csqrtl.c cargl.c
|
||||||
|
|
||||||
fsrc = cabsf.c casinf.c ccosf.c cimagf.c cprojf.c \
|
fsrc = cabsf.c casinf.c ccosf.c cimagf.c cprojf.c \
|
||||||
csqrtf.c cacosf.c casinhf.c ccoshf.c clogf.c clog10f.c \
|
csqrtf.c cacosf.c casinhf.c ccoshf.c clogf.c clog10f.c \
|
||||||
|
18
newlib/libm/complex/cargl.c
Executable file
18
newlib/libm/complex/cargl.c
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
/* $NetBSD: cargl.c,v 1.1 2014/10/10 00:48:18 christos Exp $ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Public domain.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <complex.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
long double
|
||||||
|
cargl(long double complex z)
|
||||||
|
{
|
||||||
|
#ifdef _LDBL_EQ_DBL
|
||||||
|
return carg (z);
|
||||||
|
#else
|
||||||
|
return atan2l (imag (z), real (z));
|
||||||
|
#endif
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user