diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /unix/hlib/libc/math.h | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'unix/hlib/libc/math.h')
-rw-r--r-- | unix/hlib/libc/math.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/unix/hlib/libc/math.h b/unix/hlib/libc/math.h new file mode 100644 index 00000000..6d151faf --- /dev/null +++ b/unix/hlib/libc/math.h @@ -0,0 +1,24 @@ +/* + * MATH.H -- Math functions for C. + */ + +double XEXP(), XLOG(), XLOG10(), XPOW(), XSQRT(); +double XSIN(), XCOS(), XASIN(), XACOS(), XTAN(), XATAN(), XATAN2(); + +static double um_x, um_y; + +#define nint(x) XNINT((um_x=(x),&um_x)) +#define exp(x) XEXP((um_x=(x),&um_x)) +#define log(x) XLOG((um_x=(x),&um_x)) +#define log10(x) XLOG10((um_x=(x),&um_x)) +#define pow(x,y) XPOW((um_x=(x),&um_x),(um_y=(y),&um_y)) +#define sqrt(x) XSQRT((um_x=(x),&um_x)) +#define sin(x) XSIN((um_x=(x),&um_x)) +#define cos(x) XCOS((um_x=(x),&um_x)) +#define tan(x) XTAN((um_x=(x),&um_x)) +#define asin(x) XASIN((um_x=(x),&um_x)) +#define acos(x) XACOS((um_x=(x),&um_x)) +#define atan(x) XATAN((um_x=(x),&um_x)) +#define atan2(x,y) XATAN2((um_x=(x),&um_x),(um_y=(y),&um_y)) + +#define D_math |