mirror of
https://github.com/adtools/clib2.git
synced 2026-09-23 01:29:23 +00:00
c.lib 1.172 (21.8.2004)
- acos() now returns 0 for a domain error. - asin() now returns 0 for a domain error. - atan2() now returns 0 for a domain error. - fmod() now returns x if y == 0 and sets a domain error. - sqrt() now returns 0 for a domain error. - Added NaN and +Inf constants to the math library initialization code which could come in handy later. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14713 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
+4
-15
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: math_atan2.c,v 1.1.1.1 2004-07-26 16:30:39 obarthel Exp $
|
||||
* $Id: math_atan2.c,v 1.2 2004-08-21 18:57:40 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@@ -107,7 +107,7 @@ __atan2(double x,double y)
|
||||
}
|
||||
else
|
||||
{
|
||||
result = HUGE_VAL;
|
||||
result = 0;
|
||||
errno = EDOM;
|
||||
}
|
||||
}
|
||||
@@ -186,7 +186,7 @@ __atan2(double x,double y)
|
||||
}
|
||||
else
|
||||
{
|
||||
result = HUGE_VAL;
|
||||
result = 0;
|
||||
errno = EDOM;
|
||||
}
|
||||
}
|
||||
@@ -201,9 +201,6 @@ __atan2(double x,double y)
|
||||
|
||||
#if defined(PPC_FLOATING_POINT_SUPPORT)
|
||||
|
||||
|
||||
|
||||
|
||||
static const double
|
||||
tiny = 1.0e-300,
|
||||
zero = 0.0,
|
||||
@@ -326,15 +323,7 @@ atan2(double x,double y)
|
||||
{
|
||||
double result;
|
||||
|
||||
if(x != 0.0 && y != 0.0)
|
||||
{
|
||||
result = __atan2(x,y);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = HUGE_VAL;
|
||||
errno = EDOM;
|
||||
}
|
||||
result = __atan2(x,y);
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user