Last change
on this file since 559 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
832 bytes
|
Line | |
---|
1 | |
---|
2 | /* @(#)z_atanf.c 1.0 98/08/13 */ |
---|
3 | /****************************************************************** |
---|
4 | * Arctangent |
---|
5 | * |
---|
6 | * Input: |
---|
7 | * x - floating point value |
---|
8 | * |
---|
9 | * Output: |
---|
10 | * arctan of x |
---|
11 | * |
---|
12 | * Description: |
---|
13 | * This routine returns the arctan of x. |
---|
14 | * |
---|
15 | *****************************************************************/ |
---|
16 | |
---|
17 | #include "fdlibm.h" |
---|
18 | #include "zmath.h" |
---|
19 | |
---|
20 | float |
---|
21 | atanf (float x) |
---|
22 | { |
---|
23 | switch (numtestf (x)) |
---|
24 | { |
---|
25 | case NAN: |
---|
26 | errno = EDOM; |
---|
27 | return (x); |
---|
28 | case INF: |
---|
29 | /* this should check to see if neg NaN or pos NaN... */ |
---|
30 | return (__PI_OVER_TWO); |
---|
31 | case 0: |
---|
32 | return (0.0); |
---|
33 | default: |
---|
34 | return (atangentf (x, 0, 0, 0)); |
---|
35 | } |
---|
36 | } |
---|
37 | |
---|
38 | #ifdef _DOUBLE_IS_32BITS |
---|
39 | double atan (double x) |
---|
40 | { |
---|
41 | return (double) atangentf ((float) x, 0, 0, 0); |
---|
42 | } |
---|
43 | |
---|
44 | #endif /* defined(_DOUBLE_IS_32BITS) */ |
---|
Note: See
TracBrowser
for help on using the repository browser.